Preset encoder count value.
Ret = SmcWSetCountPulse( Id, AxisNo, CountPulse )
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.
CountPulse
[ VB.NET: Integer ] [ C, C++: long ] [ C#: int ] [ Python: ctypes.c_long
]
Set encoder count preset value.
The specified range varies depending on the device.
For details, please refer to "Specifications
based on devices section".
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
If the device is in operation, the function cannot be performed.
Model No. |
LSI chip for Pulse Control chip |
The valid range for CountPulse |
SMC-4DL-PE |
PCL6145 (32bits) |
-2,147,483,648 to +2,147,483,647 |
PCL6143 (28bits) |
-134,217,728 to +134,217,727 |
|
SMC-4DF2-PCI |
PCL6045BL equivalent (28bits) |
-134,217,728 to +134,217,727 |
You can confirm "LSI chip" on your device with "Diagnostic Report".
The count value of the encoder of axis number 1 is Priseted to 0.
VB.NET
Dim Ret As Integer
Dim CountPulse As Integer
CountPulse = 0
Ret = SmcWSetCountPulse( Id , AxisNo , CountPulse )
C, C++
long Ret;
long CountPulse;
CountPulse = 0;
Ret = SmcWSetCountPulse( Id , AxisNo , CountPulse );
C#
int Ret;
int CountPulse;
CountPulse = 0;
Ret = Smc.WSetCountPulse( Id , AxisNo , CountPulse );
Python
Ret = ctypes.c_long()
CountPulse = ctypes.c_long()
CountPulse.value = 0
Ret.value = csmc.SmcWSetCountPulse( Id , AxisNo , CountPulse )
See Also