PEXE
Execute a Compiled Program
Type
PLC Mode Compiled Program Execution
Syntax
i%PEXEt
Units
i = Task Number
t = Program Name (6 characters or less)
Range
i = 1-10
Default
n/a
Response
n/a
See Also
EXE, GOBUF, PCOMP, PLCP, SCANP
Use the
command to start a compiled
PEXE
compiled
program. The
PLCP
which it will be launched. The program named in the
the time the
program is compiled; however, the program must be defined and compiled before the
PLCP
or
is issued. If no task number is assigned with a
SCANP
PRUN
program is compiled (
PCOMP
program cannot be executed in the Task Supervisor (task 0).
PEXE
The
program will ignore the
PLCP
specified task; therefore, the
program it is launching. Like the
interrupt a currently running program, nor will it interrupt a
profile, the
will not interrupt motion already in progress.
GOBUF
PEXE
CAUTION: Using the
SCANP
to execute as often as every system update period (2 ms). A
running in Scan mode could therefore attempt to launch a program in the specified task as often as every
2 ms. This may not allow enough time for the program launched in the specified task by the
command to complete before the same
ignore the
command if a currently running program is detected or motion is in progress, so timing
PEXE
must be considered when launching programs with the
To execute a non-compiled program from within a compiled
Example:
DEF PLCP1
; Define PLC program PLCP1
1%PEXE PLCP2
; Launch compiled program PLCP2 in task 1
END
DEF PLCP2
; Define PLC program PLCP2
OUT(VARB1)
; Modify outputs
END
PCOMP PLCP1
; Compile PLCP1
PCOMP PLCP2
; Compile PLCP2
SCANP PLCP1
; Scan with program PLCP1
VARB1=h0000
; Set VARB1
TOUT
; Check outputs (response is *TOUT0000_000)
VARB1=b1010
; Reassign VARB1
TOUT
; Check outputs again (response is *TOUT1010_000)
program, or compiled
PLCP
command specifies the name of the compiled program, and the task in
PEXE
PEXE
) will be the task that runs the compiled program. Note, however, that the
command if a currently running program is detected within the
PEXE
command can essentially only be used to initiate a new task with the
PEXE
command, the program launched by the
INSELP
command to run a
program in Scan mode will cause the
PLCP
command is issued again. As stated, the
PEXE
PEXE
www.comoso.com
profile from within a
GOBUF
command need not be defined or compiled at
prefix, then the task in which the
%
PEXE
or
command. Also, if launching a
WAIT
T
command used within a
PEXE
PLCP
command.
program, use the
PLCP
EXE
Command Descriptions
Product
Rev
GT6K
6.0
GV6K
6.0
PLCP
command will not
program
PLCP
program
PLCP
PEXE
program will
command.
231