Function
Retrieves the settings of the type of encoder input.
Format
Ret = SmcWGetEncType( Id, AxisNo, EncType )
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.
EncType
[ VB.NET: Short ] [ C, C++: short * ] [ C#: out 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 [ 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 : A/B 1x
Remarks
This function can be executed even if the axis is in operation.
Example
The set up information of the encoder input form of axis number 1 is acquired.
VB.NET
Dim Ret As Integer
Dim EncType As Short
Ret = SmcWGetEncType( Id , 1, EncType )
C, C++
long Ret;
short EncType;
Ret = SmcWGetEncType( Id , 1, &EncType );
C#
int Ret;
short EncType;
Ret = Smc.WGetEncType( Id , 1, out EncType );
Python
Ret = ctypes.c_long()
EncType = ctypes.c_short()
Ret.value = csmc.SmcWGetEncType( Id , 1, ctypes.byref(EncType) )
See Also