EtherCAT Programming Guide General Operation of Motion Axis
March, 2017 8-21
8
8.17 _ECAT_Slave_Motion_Get_Actual_Command
Syntax
U16 PASCAL _ECAT_Slave_Motion_Get_Actual_Command(U16 CardNo, U16 AxisNo,
U16 SlotNo,I32* ActualCommand)
Purpose
This is for acquiring the current command data. The data will vary with to the applied motion
mode.
When applying the function of enabling virtual position (_ECAT_Slave_CSP_Virtual_Set_Enable)
in section 9.29, users should use this API to get the information of current command.
Parameter
Name Data type Property Description
CardNo U16 Number Card No.
AxisNo U16 Number Axis No.
SlotNo U16 Number Node ID
ActualCommand I32* Value
Acquire the current command information:
In CSP mode, the data is the current position.
In CSV mode, the data is the current speed.
In CST mode, the data is the permillage (‰) of current
torque.
Example
U16 Status;
U16 CardNo=16,AxisNo=1,SlotNo=0;
I32 ActualCommand;
Status = _ECAT_Slave_Motion_ Get_Actual_Command (CardNo, AxisNo, SlotNo,
&ActualCommand);