ICP DAS USA 3-axis encoder card, 2-axis stepping/servo Computer Hardware User Manual


 
I-8090 User Manual Version 1.0 06/2001
http://www.icpdas.com 1-16 ICPDAS
32 bits encoder counts command sets
(6) void i8090_ENCODER32_ISR(unsigned char cardNo)
(7) void i8090_RESET_ENCODER32(unsigned char cardNo, unsigned
char axis)
(8) long i8090_GET_ENCODER32(unsigned char cardNo, unsigned
char axis)
cardNo: 0~19, select which card.
axis : select which axis.
1 : X-axis
2 : Y-axis
3 : Z-axis
The above three commands provided a software method to get 32 bits
encoder counts.
The
i8090_ENCODER32_ISR(unsigned char cardNo)
command
calculates the difference pulse between present and last time, and then
add this difference into a
”long type”
variable. According to this idea, so,
the
i8090_ENCODER32_ISR()
command should be executed
periodically in 2~10ms by timer interrupt or manually call it.
The
i8090_RESET_ENCODER32((unsigned char cardNo,
unsigned char axis)
command can reset the
“long type”
variable to
zero.
The
long i8090_GET_ENCODER32(unsigned char cardNo,
unsigned char axis)
command can return the value of the
“long type”
variable.