Check RUN/IDLE bit for state of cyclic communication
This FP instruction checks the state of the cyclic communication by reading the RUN/IDLE bit of each registered node from the node number table and stores the values in the output variable of the type FP_ETHERNETIP_STATE_TABLE_DUT.
Output
Destination to which the data is written
Bit corresponding to the node number of FP7 whose connection is registered. When the following two conditions are met, it turns to TRUE, in other conditions, it turns to FALSE.
Communication with the target node (FP7) runs normally.
Communication with all nodes except FP7 runs normally when the target node (FP7) is in “RUN mode”.
if the read area is outside the permissible range
if the instruction is executed in an interrupt program
if the read area is outside the permissible range
if the instruction is executed in an interrupt program
All input and output variables used for programming this function have been declared in the POU header. The same POU header is used for all programming languages.
VAR
bEnable: BOOL:=FALSE;
dutNodes_RunIdleNodeTable: FP_ETHERNETIP_STATE_TABLE_DUT;
END_VAR
When the variable bEnable is set to TRUE, the function is executed.
BODY
WORKSPACE
NETWORK_LIST_TYPE := NWTYPELD ;
ACTIVE_NETWORK := 0 ;
END_WORKSPACE
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 4 ;
NETWORK_BODY
B(B_VAROUT,,dutNodes_RunIdleNodeTable,30,2,32,4,);
B(B_CONTACT,,bEnable,4,1,6,3,);
B(B_F,FP_ETHERNETIP_GET_STATE_TABLE_RUN_IDLE!,,8,0,30,4,,?DEN?AENO?Cd_dutStateTable);
L(1,2,4,2);
L(6,2,8,2);
L(1,0,1,4);
END_NETWORK_BODY
END_NET_WORK
END_BODY
IF (bEnable) then
FP_ETHERNETIP_GET_STATE_TABLE_RUN_IDLE(d_dutStateTable => dutNodes_RunIdleNodeTable);
END_IF;