Function
Retrieves pulse output status.
Format
Ret = SmcWGetPulseStatus( Id, AxisNo, PulseSts )
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 axis number.
PulseSts
[ VB.NET: Short ] [ C, C++: short * ] [ C#: out short ] [ Python: ctypes.POINTER(ctypes.c_short)
]
Specify the address of the variable that stores the pulse output status.
0 |
During pulse output stop |
1 |
A fixed velocity is operating at the beginning speed (FL speed) . |
2 |
A fixed velocity is operating at the speed of the target (FH speed) . |
3 |
Synchronous start waiting In the case to indicate the synchronous control by SmcWSetSync function, this status is enabled from calling SmcWMotionStart function until calling SmcWSyncMotionStart function. |
4 |
ERC timer completion waiting This status is enabled while ErcOffTime by SmcWSetErcAlmClearTime function after outputting Error Counter Clear signal(ERC). |
5 |
Direction change timer completion waiting In the case to indicate DirTimer=ON by SmcWSetPulseType function, this status is enabled while 200µsec after changing the direction. |
6 |
Acceleration is operating. |
7 |
The deceleration is operating. |
8 |
INP input waiting state In the case to indicate Positioning Completion Input(INP) by SmcWSetCtrlTypeIn function, this status is enabled from completing the pulse output until INP=ON. |
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
This function can be executed even if the axis is in operation.
Example
The pulse output of axis number 1 is acquired.
VB.NET
Dim Ret As Integer
Dim PulseSts As Short
Ret = SmcWGetPulseStatus( Id , 1, PulseSts )
C, C++
long Ret;
short PulseSts;
Ret = SmcWGetPulseStatus( Id , 1, &PulseSts );
C#
int Ret;
short PulseSts;
Ret = Smc.WGetPulseStatus( Id , 1, out PulseSts );
Python
Ret = ctypes.c_long()
PulseSts = ctypes.c_short()
Ret.value = csmc.SmcWGetPulseStatus( Id , 1, ctypes.byref(PulseSts) )