SmcWGetPulseDuty


Function

Retrieves the settings of pulse width (duty ratio).

 

Format

Ret = SmcWSetPulseDuty( Id, AxisNo, DutyType )

 

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.

 

DutyType [ C, C++: short * ] [ Python: ctypes.POINTER(ctypes.c_short) ]

Specify the address of a variable to store the duty ratio setting.

0

Change depending on the pulse out speed

1

50% fixation compared with duty

 

Return Value

Ret [ C, C++: long ] [ Python: ctypes.c_long ]

0

Terminated normally

Non-zero

Terminated abnormally

See also: Error code details

 

Remarks

The pulse width below output speed 2.4kpps becomes 50% fixation from 200 usec and it for DutyType = 0.
In the DL series, DutyType = 1 fixation.

This function can be executed even if the device is in operation

 

Example

The set up information of the duty ratio of axis number 1 is acquired.

 

C, C++

long Ret;

short DutyType ;

Ret = SmcWGetPulseDuty( Id , 1, &DutyType );

 

Python

Ret = ctypes.c_long()

DutyType = ctypes.c_short()

Ret.value = csmc.SmcWGetPulseDuty( Id , 1, ctypes.byref(DutyType) )

 

See Also