getTM5Delay: Number of TM5 Bus Cycles Without Valid Exchange
This function will return the number of TM5 bus cycles without valid exchange with a targeted TM5 module.
NOTE: For TM5 module diagnostic, see System Variable TM5_MODULE_R.
To see the general representation in IL or ST language, refer to the chapter Function and Function Block Representation.
The following table describes the input variable:
Input |
Type |
Comment |
---|---|---|
NodeId |
DINT |
Targeted TM5 Module Module address (to get the Module address, verify the value in the I/O Configuration tab). ![]()
|
The following table describes the output variable:
Output |
Type |
Comment |
---|---|---|
getTM5Delay |
USINT |
The variable can take the following values: o0= OK o[1..3]= 1 to 3 cycles without valid exchange o-1= more than 3 cycles without valid exchange or invalid parameter |
The following example describes how to get the delay of the first TM5 Module:
VAR
delay : DINT;
//Slot ID is 1 for the first TM5 module
slot_ID : USINT := 1;
END_VAR
delay = getTM5Delay(slot_ID);