Function
Retrieves common input signal data.
Format
Ret = SmcWGetDigitalIn( Id, AxisNo, InData )
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.
InData
[ VB.NET: Short ] [ C, C++: short *] [ C#: out 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 [ 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
The general-purpose output signal data of axis number 1 is acquired.
VB.NET
Dim Ret As Integer
Dim InData As Short
Ret = SmcWGetDigitalIn( Id , 1, InData )
C, C++
long Ret;
short InData;
Ret = SmcWGetDigitalIn( Id , 1, &InData );
C#
int Ret;
short InData;
Ret = Smc.WGetDigitalIn( Id , 1, out InData );
Python
Ret = ctypes.c_long()
InData = ctypes.c_short()
Ret.value = csmc.SmcWGetDigitalIn( Id , 1, ctypes.byref(InData) )