Function
Retrieves the status of I/O control signal.
Format
Ret = SmcWGetCtrlInOutStatus( Id , AxisNo , CtrlSts )
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 axis number.
CtrlSts [ C, C++: short * ] [ Python: ctypes.POINTER(ctypes.c_short) ]
Specify the address of the variable that stores the I/O control signal status.
bit7 [ DIRCCW | INP | SD | LTC | CLR | EZ | ERC | PCS ] bit0 / range: 0 to FF (Hex)
PCS |
PCS Input signal |
ERC |
ERC Output signal |
EZ |
EZ Input signal |
CLR |
CLR Input signal |
LTC |
LTC Input signal |
SD |
SD Input signal |
INP |
INP Input signal |
DIRCCW |
Movement direction CCW ([-] direction) |
0 Signal OFF (DIRCCW: CW([+]
direction))
1 Signal ON (DIRCCW: CCW([-] direction))
Return Value
Ret [ C, C++: long ] [ 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 device is in operation.
Example
Retrieves the status of I/O control signal of axis number 1.
C, C++
long Ret;
short CtrlSts;
Ret = SmcWGetCtrlInOutStatus( Id , 1, &CtrlSts );
Python
Ret = ctypes.c_long()
CtrlSts = ctypes.c_short()
Ret.value = csmc.SmcWGetCtrlInOutStatus( Id , 1, ctypes.byref(CtrlSts) )
See Also