请问老师:
机械臂及拧丝单元相关配套实验提供的练习答案项目中,子程序ExciseScrewCtrlManualScl中第63行,#statErrorUserCleared条件何时满足,我在程序中没有找到此句=1的语句,有点不理解此行的作用,请老师指点??
包含此行的完整程序如下,行末有中文标记
//Check if FB is disabled
IF #axis = #AXIS_SCREW
AND #mode = #MODE_MANUAL
THEN
IF NOT #enable
AND #statEnableOld
THEN
//TODO : Add functionality after disabling functionality, e.g. closing connections
//--------------------------------------------------------------------------------
//Error outputs are reset with falling edge of enable input
#statErrorUserCleared := FALSE;
#statErrorAutoCleared := FALSE;
#error := FALSE;
#status := #STATUS_NO_CALL;
#errorID := #ERRORID_NO_ERROR;
#statusID := #STATUSID_NO_FUNCTIONBLOCK;
//Enable and busy are reset with falling edge of enable input
#valid := FALSE;
#busy := FALSE;
//Set old value of enable for edge detection and end execution
#statEnableOld := #enable;
#instSinaPosScrew.ExecuteMode := false;
RETURN;
//Check if FB is enabled
ELSIF #enable
AND NOT #statEnableOld
THEN
//TODO: Initialize values after enabling FB, e.g. set state machine to initial state
//-----------------------------------------------------------------------------------
#instSinaPosScrew.HWIDSTW := #screwHwId;
#instSinaPosScrew.HWIDZSW := #screwHwId;
//Busy is set at rising edge of enable input
#busy := TRUE;
//Set status for first call
#status := #STATUS_FIRST_CALL;
//Set old value of enable for edge detection and end execution
#statEnableOld := #enable;
RETURN;
//Check if user cleared error in FB occurred
ELSIF #statErrorUserCleared //此行的条件何时=1,程序中没找到???????
THEN
#busy := FALSE;
//Set old value of enable for edge detection and end execution
#statEnableOld := #enable;
//No set of status necessary, because status already set when error occured
RETURN;
//Check if function block is disabled
ELSIF NOT #enable
THEN
#busy := FALSE;
#status := #STATUS_NO_CALL;
//Set old value of enable for edge detection and end execution
#statEnableOld := #enable;
RETURN;
ELSE
//Detect edge for disabling
#statEnableOld := #enable;
END_IF;