Function
Retrieves the settings of logic of I/O control signal.
Format
Ret = SmcWGetCtrlInOutLog( Id, AxisNo, CtrlInOutLog )
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.
CtrlInOutLog [ C, C++: short * ] [ Python: ctypes.POINTER(ctypes.c_short) ]
Specify the address of a variable to store the logic of I/O control signal.
[ 0 | 0 | 0 | 0 | 0 | OUT3 | OUT2 | OUT1| LIM | IN7 | IN6 | IN5 | IN4 | IN3 | IN2 | IN1 ] Available range: 0 to 7FF (Hex)
Signal description
IN1 to IN7 |
Control input signals |
LIM |
Limit signal |
OUT1 to OUT3 |
Control output signals |
Setting values
0 |
Negative logic |
1 |
Positive logic |
Return Value
Ret [ C, C++: long ] [ Python: ctypes.c_long ]
0 |
Terminated normally |
Non-zero |
Terminated abnormally |
See also: Error code details
Initial Value
0 : Negative logic for all signals
Remarks
This function can be executed even if the device is in operation.
Example
The control I/O signal logic of axis number 1 is acquired.
C, C++
long Ret;
short CtrlInOutLog ;
Ret = SmcWGetCtrlInOutLog( Id , 1, &CtrlInOutLog );
Python
Ret = ctypes.c_long()
CtrlInOutLog = ctypes.c_short()
Ret.value = csmc.SmcWGetCtrlInOutLog( Id , 1, ctypes.byref(CtrlInOutLog) )
See Also