Function
Retrieves the settings of logic of I/O control signal.
Format
Ret = SmcWGetCtrlInOutLog( Id, AxisNo, CtrlInOutLog )
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 the axis number.
CtrlInOutLog
[ VB.NET: Short ] [ C, C++: short * ] [ C#: out 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 [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ] [ 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 axis is in operation.
Example
The control I/O signal logic of axis number 1 is acquired.
VB.NET
Dim Ret As Integer
Dim CtrlInOutLog As Short
Ret = SmcWGetCtrlInOutLog( Id , 1, CtrlInOutLog )
C, C++
long Ret;
short CtrlInOutLog ;
Ret = SmcWGetCtrlInOutLog( Id , 1, &CtrlInOutLog );
C#
int Ret;
short CtrlInOutLog ;
Ret = Smc.WGetCtrlInOutLog( Id , 1, out CtrlInOutLog );
Python
Ret = ctypes.c_long()
CtrlInOutLog = ctypes.c_short()
Ret.value = csmc.SmcWGetCtrlInOutLog( Id , 1, ctypes.byref(CtrlInOutLog)
)
See Also