![background image](http://html2.mh-extra.com/html/icp-das-usa/i-8092f/i-8092f_user-manual_3531635030.webp)
ICPDAS
I-8092F Software User Manual
30
3.2 Setting and Reading the Encoder Counter
void
i8092MF_SET_EP(
BYTE
cardNo
,
WORD
axis
,
long
wdata
)
Description:
This function sets the encoder position counter value (real position counter, or
EP).
Parameters:
cardNo
:
Module number
axis
:
Axis or axes (Please refer to Table 2-1)
wdata
:
Position command
(-2,147,483,648 ~ +2,147,483,647)
Return:
None
Example:
i8092MF_SET_EP(1, AXIS_XY, 0);
//Set the EP for the X, Y, Z, and U axes of module 1 as 0.
//This command clears all EP counters on module 1.
long
i8092MF_GET_EP(
BYTE
cardNo
,
WORD
axis
)
Description:
This function reads the encoder position counter value (EP).
Parameters:
cardNo
:
Module number
axis
:
Axis (Please refer to Table 2-1)
The axis can be either X and Y
Return:
Current EP value (-2,147,483,648 ~ +2,147,483,647)
Example:
long
X_EP;
X_EP = i8092MF_GET_EP(1, AXIS_X);
//reads the encoder value (EP) of the X axis on module 1.