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


 
I-8091 User Manual Version 1.0 06/2001
http://www.icpdas.com 2-37 ICPDAS
3.2 Start up and end of program
Start up program
When you are going to use I-8091 card, there are some commands must
be implement in previous.
i8091_REGISTRATION(CARD1,0x80)
set CARD1 address, (where CARD1=1)
i8091_RESET_SYSTEM(CARD1);
reset system
i8091_SET_VAR(CARD1, DDA, AD, LSP, HSP);
set DDA cycle, accelerating/decelerating speed, low speed and high
speed value
i8091_SET_DEFDIR(CARD1, xdir, ydir);
define direction.
i8091_SET_MODE(CARD1, xmode, ymode);
define output mode.
i8091_SET_SERVO_ON(CARD1, xson, yson);
set servo ON/OFF.
define output mode.
i8091_SET_NC(CARD1, nc);
To config limit switch as N.C. or N.O.
end of program
i8091_RESET_SYSTEM(CARD1);
To reset system
Example
//-----------------------------------------------------------------------------
-
#define CARD1 1
typedef struct {
int address;
unsigned char DDA,AD;
unsigned int LSP,HSP;
unsigned char xmode,ymode;
unsigned char xdir,ydir;
unsigned char xson,yson;
unsigned char NCmode;