SmcWGetEncType


Function

Retrieves the settings of the type of encoder input.

 

Format

Ret = SmcWGetEncType( Id, AxisNo, EncType )

 

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.

 

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

Specify the address of a variable to store the type of encoder input.

0

A/B 1x

1

A/B 2x

2

A/B 4x

3

U/D

4

Unused

 

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 : A/B 1x

 

Remarks

This function can be executed even if the device is in operation.

 

Example

The set up information of the encoder input form of axis number 1 is acquired.

 

C, C++

long Ret;

short EncType;

Ret = SmcWGetEncType( Id , 1, &EncType );

 

Python

Ret = ctypes.c_long()

EncType = ctypes.c_short()

Ret.value = csmc.SmcWGetEncType( Id , 1, ctypes.byref(EncType) )

 

See Also

SmcWSetEncType