Function
Retrieves the settings of pulse width (duty ratio).
Format
Ret = SmcWSetPulseDuty( Id, AxisNo, DutyType )
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 the axis number.
DutyType
[ VB.NET: Short ] [ C, C++: short * ] [ C#: out 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 [ 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 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.
VB.NET
Dim Ret As Integer
Dim DutyType As Short
Ret = SmcWGetPulseDuty( Id , 1, DutyType )
C, C++
long Ret;
short DutyType;
Ret = SmcWGetPulseDuty( Id , 1, &DutyType );
C#
int Ret;
short DutyType;
Ret = Smc.WGetPulseDuty( Id , 1, out DutyType );
Python
Ret = ctypes.c_long()
DutyType = ctypes.c_short()
Ret.value = csmc.SmcWGetPulseDuty( Id , 1, ctypes.byref(DutyType) )
See Also