beckhoff TS4100 — 5.8.9 FB_CTRL_STEPPING_MOTOR_OUT

PLC-API Behaviour of the output: VAR_INPUT VAR_INPUT fIn : FLOAT; (* controller output = STEPPING_MOTOR_OUT input [ fCtrlOutMin ... fCtrlOutM ax ] *) bUpperLimitSwitch : BOOL; bLowerLimitSwitch : BOOL; fManSyncValue : FLOAT; bSync : BOOL; eMode : E_CTRL_MODE; END_VAR fIn : control value of the controller (controller output). bUpperLimitSwitch : limit switch: TRUE if the upper stop is reached. bLowerLimitSwitch : limit switch: TRUE if the lower stop is reached. fManSyncValue : input with which the internal state of the motor position can be adjusted, or whose value is adopted in manual mode. bSync :

with a rising edge at this input the internal step counter is set to the step that corresponds to the value fManSyncValue. eMode : input that specifies the operation mode [ } 16] of the function block. For synchronization with the current valve position, this function block has the mode "eC- TRL_MODE_SYNC_MOVEMENT". In this mode, pulses for closing the valve are output until the valve is safely closed. The function block is then synchronized with this valve position. Once the synchronization process is completed, "eCTRL_STATE_ACTIVE" mode is automatically activated! VAR_OUTPUT VAR_OUTPUT bOutBitPos : BOOL; (* output signal to move to the maximum *) bOutBitNeg :

BOOL; (* output signal to move to the minimum*) nActualStep : DINT; (* Actual state of the motor [ 0 ... nMaxMovingPulses ] *) eState : E_CTRL_STATE; eErrorId : E_CTRL_ERRORCODES; bError : BOOL; END_VAR bOutBitPos : Output required to drive the motor in a positive direction. bOutBitNeg : Output required to drive the motor in a negative direction. TS4100 138 Version: 1.1