3.2 Start up and end of program
Start up program
When you are going to use
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; |
http://www.icpdas.com | ICPDAS |