ItpLoadProg
![]() | Outdated version The sole purpose of the function block is to ensure compatibility with existing projects. For new projects please use the function block ItpLoadProgEx. |
Interface
VAR_INPUT
bExecute : BOOL;
nChnId : UDINT;
sPrg : STRING;
nLength : UDINT;
tTimeOut : TIME;
END_VAR
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
nErrId : UDINT;
END_VAR
Description
On a rising edge at the bExecute input, the function block loads the NC program whose name is given at the sPrg input. The string length of the program name is applied to the input nLength. nChnId is the ID of the associated NC channel.
The NC program is sought in the “TwinCAT\cnc” directory if no other information is provided. It is however also possible to give an absolute path.
The bBusy output remains TRUE until the function block has executed a command, although only for as long as the time specified at the tTimeOut input. While bBusy = TRUE no new command is accepted at the inputs.
The output bErr is switched to TRUE if an error occurred during the execution of the command. The command-specific error code is contained in nErrId. The outputs are reset by carrying out a command at the inputs.
Requirements
Development Environment |
Target System |
PLC libraries to include |
---|---|---|
TwinCAT v2.7.0 |
PC (i386) |
TcNciItp.lib |
TwinCAT v2.8.0 |
PC (i386) |
TcNci.lib |