Function
Retrieves common input signal data.
Format
Ret = SmcWGetDigitalIn( Id, AxisNo, InData )
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.
InData [ C, C++: short *] [ Python: ctypes.POINTER(ctypes.c_short) ]
Specify the address of the variable that stores common input signal data.
[ 0 | IN7 | IN6 | IN5 | IN4 | IN3 | IN2 | IN1 ]
0 |
Signal OFF |
1 |
Signal ON |
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
The general-purpose output signal data of axis number 1 is acquired.
C, C++
long Ret;
short InData ;
Ret = SmcWGetDigitalIn( Id , 1, &InData );
Python
Ret = ctypes.c_long()
InData = ctypes.c_short()
Ret.value = csmc.SmcWGetDigitalIn( Id , 1, ctypes.byref(InData) )
See Also