TwinCAT PLC Library Hydraulics - Version 1.4 — 4.1.1 MC_Power_BkPlcMc (from V3.0)

PLCopen Motion Control The function block's input signals are passed on through the interface to the peripheral device. Enable also activates error monitoring. The function block investigates the axis interface that has been passed to it every time it is called. A number of problems can be detected and reported during this process: If the value iTcMc_DriveAx2000_XXXXX is set under nDrive_Type in pStAxParams, the following procedure is applied: ◦If one of the pointers pStDeviceOutput or pStDeviceInput in Axis_Ref_BkPlcMc [ } 67] is not initialized, the block responds with E rror and ErrorID :=dwTcHydErrCdPtrPlcDriveIn or dwTcHydErrCdPtrPlcDriveOut. Status is then FALSE.

◦If an error is detected in the communication with the AX device or an error message occurs in the pStDeviceInput interface of the AX device, the function block responds with Error and an ErrorID , which is defined in the global constants [ } 241] of the library. Status is then FALSE, and the axis is set to an error state with the axis error dwTcHydErrCdDriveNotReady. ◦Otherwise, the value of Enable is returned as the Status . If the value iTcMc_DriveKL2531 or iTcMc_DriveKL2541 is set under nDrive_Type in pStAxParams, the following procedure is applied: ◦The pointers pStDeviceOutput and or pStDeviceInput Axis_Ref_BkPlcMc [ } 67] are checked.

If these pointers have not been initialised, the function block responds with Error and ErrorID :=dwTcHydErrCdPtrPlcDriveIn or dwTcHydErrCdPtrPlcDriveOut. Status is then FALSE. ◦If an error is detected in the communication with the I/O terminal or an error message occurs in the pStDeviceInput interface of the terminal, the function block responds with Error and an ErrorID , which is defined in the in global constants [ } 241] of the library. Status is then FALSE, and the axis is set to an error state with the axis error dwTcHydErrCdDriveNotReady. Enable is used to activate the terminal output stage through a bit in pStDeviceOutput.bTerminalCtrl.

The ready signal in bTerminalCtrl.bTerminalState is returned as Status . ◦If the drive interface is operating without error, the value of Enable_Positive is entered with the mask dwTcHydDcDwFdPosEna in the nDeCtrlDWord of pStAxRtData. ◦If the drive interface is operating without error, the value of Enable_Negative is entered with the mask dwTcHydDcDwFdNegEna in the nDeCtrlDWord of pStAxRtData. Otherwise the pointers pStDeviceInput and pStDeviceOutput in Axis_Ref_BkPlcMc [ } 67] are checked. If these pointers have not been initialised, the function block responds with Error and ErrorID :=dwTcHydErrCdPtrPlcDriveIn or dwTcHydErrCdPtrPlcDriveOut. Status is then FALSE.

◦Otherwise, the value of bPowerOk from pStDeviceInput is returned as the Status . If the drive interface is operating without error, the value of Enable is entered with the mask dwTcHydDcDwCtrlEnable in the nDeCtrlDWord of pStAxRtData. If the drive interface is operating without error, the value of Enable_Positive is entered with the mask dwTcHydDcDwFdPosEna in the nDeCtrlDWord of pStAxRtData. If the drive interface is operating without error, the value of Enable_Negative is entered with the mask dwTcHydDcDwFdNegEna in the nDeCtrlDWord of pStAxRtData. NOTE! This function block requires no time for executing its tasks.

The output Busy will never assume the value TRUE and only exists for compatibility reasons. PLC Library Hydraulics 27 Version: 1.4