ICP DAS USA I-8091 2-axis stepping/servo Computer Hardware User Manual


 
I-8090 User Manual Version 1.0 06/2001
http://www.icpdas.com 1-14 ICPDAS
address: hardware address which defined at chapter 1.1
Return: “YES” : registration successful
“NO” : registration failure.
Example: This example will assign I-8090 card address=0x080 as
CARD1 (1). Then initial the I-8090 card and reset X,Y,Z axis encoder
counter value to 0.
#define CARD1 1
i8090_REGISTRATION(CARD1, 0x080);
i8090_INIT_CARD(CARD1, ENC_QUADRANT, ENC_QUADRANT,
ENC_QUADRANT);
i8090_RESET_ENCODER(CARD1, X_axis);
i8090_RESET_ENCODER(CARD1, Y_axis);
i8090_RESET_ENCODER(CARD1, Z_axis);
(2) void i8090_INIT_CARD(unsigned char cardNo,
unsigned char x_mode,
unsigned char y_mode,
unsigned char z_mode)
This command will reset all three axis’s counter value of “cardNo” card,
and assign its counting mode. The counting mode (S1,S0) has been
explained in registers XCTRL, YCTRL, ZCTRL.
cardNo: 0~19, select which card.
x_mode, y_mode, z_mode: select the counting mode.
0x00 : quadrant counting mode
0x10 : CW/CCW counting mode
0x20 : Pulse/Direction counting mode
Example:
#define ENC_QUADRANT 0x00
#define ENC_CW_CCW 0x10
#define ENC_PULSE_DIR 0x20