Function
Preset encoder count value.
Format
Ret = SmcWSetCountPulse( Id, AxisNo, CountPulse )
Parameters
Id [ C, C++: short ] [ Python: ctypes.c_short ]
Specify the device ID retrieved by SmcWInit function.
AxisNo [ C, C++: short ] [ Python: ctypes.c_short ]
Specify axis number.
CountPulse [ C, C++: int ] [ Python: ctypes.c_int ]
Set encoder count preset
value.
Valid range : -134,217,728 to +134,217,727
Return Value
Ret [ C, C++: long ] [ Python: ctypes.c_long ]
0 |
Terminated normally |
Non-zero |
Terminated abnormally |
See also: Error code details
Remarks
If the device is in operation, the function cannot be performed.
Example
The count value of the encoder of axis number 1 is Priseted to 0.
C, C++
long Ret;
int CountPulse ;
CountPulse = 0 ;
Ret = SmcWSetCountPulse( Id , AxisNo , CountPulse );
Python
Ret = ctypes.c_long()
CountPulse = ctypes.c_int()
CountPulse.value = 0
Ret.value = csmc.SmcWSetCountPulse( Id , AxisNo , CountPulse )
See Also