ICP DAS USA I-8090 3-axis encoder card, I-8091 2-axis stepping/servo Constants and functions

Page 16

I-8090 User Manual

Version 1.0 06/2001

2. Software

_

 

 

 

 

 

User’s applications could be compiled under DOS Turbo/Borland C/C++ environment. It should be include i8090.h and i8090.LIB to compile the target execution file. The execution files can be downloaded under I-8000 main system (execute 7188x.exe), and then run the target execution file as under PC system. About the I-8000’s resource or environment, please refer to the manual of I-8000 system or its software programming guide.

The following section will introduce the I-8090’s functions and examples.

2.1 constants and functions

Constants

 

 

 

#define YES

 

1

 

#define NO

0

 

#define ON

1

 

#define OFF

 

0

 

#define X_axis

1

 

#define Y_axis

2

 

#define Z_axis

3

 

#define ENC_QUADRANT

0x00

#define ENC_CW_CCW

0x10

#define ENC_PULSE_DIR

0x20

Functions

(1)unsigned char i8090_REGISTRATION(unsigned char cardNo, unsigned int address)

In order to distinguish more than one I-8090 card in I-8000 platform, the I-8090 cards should be registrated before using it. This command will assign a card number=“cardNo” to I-8090 card address=”address” . If there is not I-8090 at the given address, this command will return “NO”.

cardNo: 0~19, assign the address as which card.

http://www.icpdas.com

1-13

ICPDAS

Image 16
Contents Icpdas Contents Contents 8090 Axis encoder card Version 1.0 06/2001 EditionFeatures 8090 3-axis encoder cardVersion 06/2001 I-8000 hardware address 8000, 4 slots 8000, 8 slotsRegisters of I-8090 board RST INH SELFig2 Quadrant counting mode 01 CW/CCW counting mode Fig3 CW/CCW counting mode Pulse/Direction counting mode LED Indicator Power 1C 2AConnection EgndEncoder CW/PULSE CCW/DIR Index S8091 card Constants and functions ConstantsIcpdas Unsigned char i8090GETINDEXunsigned char cardNo Icpdas Examples Get X, Y, Z-axis encoder counter’s value Icpdas Break default break Return value Icpdas Icpdas Icpdas \r\n Icpdas Icpdas 8091 Axis stepping/servo motor control card 8091 2-axis Stepping/Servo Motor Control Card Contents System Block Diagram IntroductionDDA Technology Example Stepping Motor Example Pulse type input Servo Motor Hardware 8000 hardware addressRegisters of I-8091 board RstffPower Hardware Configuration Limit switch configuration Limit switch configuration of X axisOutput pulse mode configuration Direction configurationTurn Servo ON/OFF Hold ON/OFF Automatic protectionSet limit switch as normal close condition Pin assignment of connector CN2 ExtgndInternal circuit of limit switch input Internal circuit of pulse output pinExample of connection Fan-out type driver VEXTAs motor driverS8091 card Software FunctionsIcpdas Setting commands I8091RESETSYSTEM unsigned char cardNoRestriction Reversedir Icpdas Stop Commands 11 i8091EMGSTOPunsigned char cardNoSimple motion commands High speed move #pulseN. cardNo board number 0~19 Icpdas Example I8091HSPMOVE1, CW, Xaxis Example I8091HSPMOVE1, CW, Yaxis getch I8091SLOWSTOP1, Yaxis Interpolation commands Example I8091INTPLINE1,2000,-3000 I8091INTPLINE1,-500,200 CCW #≤ x 2− Unsigned char i8091INTPSTOP Others Icpdas Start up and end of program = Cwccw Example Detect I-8091 cardExample DEMO.cpp ExampleDEMO1.cpp