Function
Retrieves the pulse out speed under operation.
Format
Ret = SmcWGetMoveSpeed( Id , AxisNo , MoveSpeed )
Parameters
Id
[ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short
]
SSpecify the Deice ID retrieved by SmcWInit
function.
AxisNo
[ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short
]
Specify axis number.
MoveSpeed
[ VB.NET: Double ] [ C, C++: double * ] [ C#: out double ] [ Python: ctypes.POINTER(ctypes.c_double)
]
Specify the address of the variable that stores the pulse out speed under
operation.
Return Value
Ret [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ] [ Python: ctypes.c_long ]
0 |
Terminated normally |
Non-zero |
Terminated abnormally |
See also: Error code details
Remarks
The speed below the decimal point cannot
be acquired in this function.
It is dropped below the decimal point.
And, there may be a inaccuracy between the retrieved speed and the actual
speed of the motor.
This is because the error of drive internal calculation. Please note that.
When the interpolation operates, only the
interpolation control axis's speed can be retrieved by this function.
This is the specification for LSI.
This function can be executed even if the axis is in operation.
Example
The pulse out speed of axis number 1 is acquired.
VB.NET
Dim Ret As Integer
Dim MoveSpeed As Double
Ret = SmcWGetMoveSpeed( Id , 1, MoveSpeed )
C, C++
long Ret;
double MoveSpeed;
Ret = SmcWGetMoveSpeed( Id , 1, &MoveSpeed );
C#
int Ret;
double MoveSpeed;
Ret = Smc.WGetMoveSpeed( Id , 1, out MoveSpeed );
Python
Ret = ctypes.c_long()
MoveSpeed = ctypes.c_double()
Ret.value = csmc.SmcWGetMoveSpeed( Id , 1, ctypes.byref(MoveSpeed) )