Clear error/warning of units
This FP instruction clears an error or warning in the unit attached to the slot number specified by s1_Slot if the trigger EN is TRUE. The instruction can be used for the following types of units: High-speed counter unit, positioning unit, pulse output unit, motion control unit, serial communication unit.
Input
Slot number
if the area specified using the index modifier exceeds the limit.
if the slot number is outside the permissible range
if the area specified using the index modifier exceeds the limit.
if the slot number is outside the permissible range
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
bClearError: BOOL:=FALSE;
iSlot: INT:=1;
END_VAR
When the variable bClearError is set to TRUE, the instruction is carried out.
BODY
WORKSPACE
NETWORK_LIST_TYPE := NWTYPELD ;
ACTIVE_NETWORK := 0 ;
END_WORKSPACE
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 6 ;
NETWORK_BODY
B(B_F,FP_CLEAR_UNIT_ERROR!,,10,0,22,4,,?DEN?Ds1_Slot?AENO);
B(B_VARIN,,iSlot,8,2,10,4,);
B(B_CONTACT,,bClearError,4,1,6,3,);
L(1,2,4,2);
L(6,2,10,2);
L(1,0,1,6);
END_NETWORK_BODY
END_NET_WORK
END_BODY
IF bClearError then
FP_CLEAR_UNIT_ERROR(iSlot);
END_IF;