Function
Sets the logic of I/O control signal.
Format
Ret = SmcWSetCtrlInOutLog( 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.c_short ]
Set the logic of I/O control signal.
[ 0 | 0 | 0 | 0 | 0 | OUT3 | OUT2 | OUT1| LIM | IN7 | IN6 | IN5 | IN4 | IN3 | IN2 | IN1 ] Setting 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 cannot be executed when the device is in operation.
After "Initial Setting function" is executed, it is necessary to execute SmcWSetInitParam.
Refer to "About Initial Setting function".
Example
The control I/O signal logic of axis number 1 is set.
IN2 is set in the positive logic and all of another is set to negative-true logic.
C, C++
long Ret;
short CtrlInOutLog ;
CtrlInOutLog = 2;
Ret = SmcWSetCtrlInOutLog( Id , 1, CtrlInOutLog );
Python
Ret = ctypes.c_long()
CtrlInOutLog = ctypes.c_short()
CtrlInOutLog.value = 2
Ret.value = csmc.SmcWSetCtrlInOutLog( Id , 1, CtrlInOutLog )
See Also