Programming manual
CNC 8070
STATEMENTS AND INSTRUCTIONS
Programming statements
15.
(SOFT V02.0X)
425
15.1.5 Program instructions
It is possible to execute blocks and even programs in a channel from
a program being executed in another channel.
#EXEC Executes a program in the indicated channel
With this instruction, it is possible to execute a program in the indicated
channel. The execution of the program starts in the indicated channel
in parallel (at the same time) with the block following the #EXEC
instruction.
If the channel where it is to be executed is busy, it will issue the relevant
error message.
The programming format is:
#EXEC [<path><prg>,<channel>]
Program location
The program to be executed may be defined by either writing the full
path or without it. When a call indicates the full path, it will only look
for it in the indicated directory. If the path is not indicated, the search
is carried out in this order and in these directories:
1. Directory selected with the #PATH instruction.
2. Directory of the program that executes the #EXEC instruction.
3. Directory defined by machine parameter SUBPATH.
Considerations
If the channel is not indicated or it coincides with the channel where
the #EXEC instruction is executed, the indicated program will be
executed as a subroutine. In this case, functions M02 and M30 will
carry out all the associated actions (initialization, sending to the PLC,
etc.) except the one for finishing the program. After executing function
M02 or M30, it goes on executing the blocks programmed after the
#EXEC instruction.
A program containing the #EXEC instruction may be executed,
simulated, syntax checked or searched for a particular block. In all the
cases, programs called upon using the #EXEC instruction are
executed in the same conditions as the original program
Parameter Meaning
<path> File location
<prg> Program to be executed.
<channel> Channel where the block is to be executed.
#EXEC [PRG1.NC,2]
(It executes in channel 2 the indicated program)
#EXEC [C:\CNC8070\USERS\PRG\EXAMPLE.NC,3]
(It executes in channel 3 the indicated program)