SmcWSetOutPulse


Function

Preset the number of feedback output pulses

 

Format

Ret = SmcWSetOutPulse( Id , AxisNo , OutPulse )

 

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 the axis number.

 

OutPulse [ C, C++: int] [ Python: ctypes.c_int ]

The preset values of the number of feedback output pulses are set.

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

When the number of output pulses is corrected after the motor operation ends, it uses it.
It is not a setting of the number of total output pulses. The setting of the number of total output pulses must use the SmcWSetStopPosition function.
If the device is in operation, the function cannot be performed.

 

Example

The number of feedback output pulses of axis numbers 1 is preset to 0.

 

C, C++

long Ret;

int OutPulse ;

OutPulse = 0 ;

Ret = SmcWSetOutPulse( Id , 1, OutPulse );

 

Python

Ret = ctypes.c_long()

OutPulse = ctypes.c_int()

OutPulse.value = 0

Ret.value = csmc.SmcWSetOutPulse( Id , 1, OutPulse )

 

See Also

SmcWGetOutPulse