Read Current Torque with MC_ReadActualTorque
MC_ReadActualTorque is used to read 32-bit and 64-bit actual torque values of an axis. While Enable input is On, the current torque is continuously output to Value32 and Value64.
-
LS_Connect must be executed before this function block can be used.
-
The examples in this topic can be found in the XMC_SingleAxis_FBs.zip downloadable from Example Applications.
| Element Name | Element Type | Description |
|---|---|---|
| Enable | Input | Level detected request to execute the function block. |
| Axis | Input/Output | Axis reference variable. This can not be a constant. |
| Valid | Output | Indicates the output of the function block is valid. |
| Busy | Output | Indicates the function block is currently being executed. |
| Error | Output | Indicates whether an error occurs or not. |
| ErrorID | Output | Error Identification number. |
| Value32 | Output | Output of the 32-bit value of the torque as a REAL. |
| Value64 | Output | Output of the 64-bit value of the torque as a LREAL. |
//Set Axis Reference
Axis1 := 1;
IF (_AX01_RDY) THEN
//Example of MC_ReadActualTorque
INST_READACTUALTORQUE(Enable:=Enable_ReadActualTorque, Axis:=Axis1,
ErrorID=>INST_READACTUALTORQUE.ErrorID);
END_IF;
LM507