ItpGetGeoInfoAndHParamEx
The function block ItpGetGeoInfoAndHParamEx
reads informations of the currently active segment and past and future segments. These include block number, H-parameter and residual path length on the segment.
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only accessed for reading. (type: NCTOPLC_NCICHANNEL_REF)
VAR_OUTPUT
VAR_OUTPUT
stTab : ST_ItpPreViewTabEx;
nErrId : UDINT;
END_VAR
stTab: Structure containing the segment data. See ST_ItpPreViewTabEx.
nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by the execution of a command at the inputs. The error numbers in nErrId
can be looked up in the ADS error documentation or in the NC error documentation (error codes above 0x4000).
TYPE ST_ItpPreViewTabEx :
STRUCT
nDcTime : UDINT := 0
nReserved : UDINT := 0;
arrLines : ARRAY[1..NCI_MAX_PREVIEWTABLINES] OF ST_ItpPreViewTabLine;
END_STRUCT
END_TYPE
nDcTime: Current time stamp in ns. This time stamp can be used e.g. in interplay with the Tc2_NciXFC
library.
arrLines: Array of segment-related information (size 20). The entry at position 11 of the array corresponds to the currently active segment. Segments that have already been processed are displayed at positions 1-10 of the array, future segments at positions 12-20. See ST_ItpPreViewTabLine.
TYPE ST_ItpPreViewTabLine :
STRUCT
fLength : LREAL := 0.0;
nBlockNo : UDINT := 0;
nHParam : UDINT := 0;
nEntryID : UDINT := 0;
nReserved : UDINT := 0;
END_STRUCT
END_TYPE
fLength: Remaining segment length. For segments that are not yet active this corresponds to the total segment length. For past segments the distance moved since the end of the segment is specified.
nBlockNo: Block number programmed by the user
nHParam: Value of the H-parameter that is active from the start of the next segment
nEntryID: Command ID generated by the system
Requirements
Development environment |
Target platform |
PLC libraries to be linked |
---|---|---|
TwinCAT v3.1.0 |
PC or CX (x86 or x64) |
Tc2_NCI |