Function
Retrieves the status of I/O control signal.
Format
Ret = SmcWGetCtrlInOutStatus( Id , AxisNo , CtrlSts )
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.
CtrlSts
[ VB.NET: Short ] [ C, C++: short * ] [ C#: out 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 [ 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
Retrieves the status of I/O control signal of axis number 1.
VB.NET
Dim Ret As Integer
Dim CtrlSts As Short
Ret = SmcWGetCtrlInOutStatus( Id , 1, CtrlSts )
C, C++
long Ret;
short CtrlSts;
Ret = SmcWGetCtrlInOutStatus( Id , 1, &CtrlSts );
C#
int Ret;
short CtrlSts;
Ret = Smc.WGetCtrlInOutStatus( Id , 1, out CtrlSts );
Python
Ret = ctypes.c_long()
CtrlSts = ctypes.c_short()
Ret.value = csmc.SmcWGetCtrlInOutStatus( Id , 1, ctypes.byref(CtrlSts)
)