ICP DAS USA I-8091 2-axis stepping/servo Start up and end of program, Start up program, Example

Models: 3-axis encoder card, 2-axis stepping/servo I-8090 3-axis encoder card I-8091 2-axis stepping/servo

1 69
Download 69 pages 14.6 Kb
Page 66
Image 66

I-8091 User ManualVersion 1.0 06/2001

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;

http://www.icpdas.com

2-37

ICPDAS

Page 66
Image 66
ICP DAS USA I-8091 2-axis stepping/servo Start up and end of program, Start up program, i8091REGISTRATIONCARD1,0x80