SmcWGetDigitalOut


Function

Retrieves the data of general purpose output signal.

 

Format

Ret = SmcWGetDigitalOut( Id, AxisNo, OutData )

 

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.

 

OutData [ C, C++: short *] [ Python: ctypes.POINTER(ctypes.c_short) ]

Specify the address of a variable to store the data of general purpose output signal.

 

[ 0 | 0 | 0 | 0 | 0 | OUT3 | OUT2 | OUT1 ]

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 OutData ;

Ret = SmcWGetDigitalOut( Id , 1, &OutData );

 

Python

Ret = ctypes.c_long()

OutData = ctypes.c_short()

Ret.value = csmc.SmcWGetDigitalOut( Id , 1, ctypes.byref(OutData) )

 

See Also

 

SmcWSetDigitalOut