ICP DAS USA I-8090 3-axis encoder card Setting commands, I8091RESETSYSTEM unsigned char cardNo

Page 49

I-8091 User Manual

Version 1.0 06/2001

3.1.1 Setting commands

(1)unsigned char i8091_REGISTRATION(unsigned char cardNo, unsigned int address);

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

address : select the address as well as hardware selected in chapter 2.1.

return NO : board not exist YES : board exist

Example:

i8091_REGISTRATION(1, 0x080);

(2) i8091_RESET_SYSTEM( unsigned char cardNo )

To reset I-8091 card, this command will terminate the running command in I-8091 card. User can use this command as software emergency stop. i8091_RESET_SYSTEM command also will clear all of setting, so, all I- 8091 card’s parameter should be set again.

cardNo : board number 0~19.

(3) i8091_SET_VAR(unsigned char cardNo, unsigned char DDA_cycle, unsigned char Acc_Dec,

unsigned int

Low_Speed,

unsigned int

High_Speed)

to set DDA cycle, accelerating/decelerating speed, low speed and high speed value.

cardNo : board number 0~19.

High_Speed

Acc_Dec

Acc_Dec

Low_Speed

http://www.icpdas.com

2-20

ICPDAS

Image 49
Contents Icpdas Contents Contents Version 1.0 06/2001 Edition 8090 Axis encoder card8090 3-axis encoder card FeaturesVersion 06/2001 8000, 4 slots 8000, 8 slots I-8000 hardware addressRST INH SEL Registers of I-8090 boardFig2 Quadrant counting mode 01 CW/CCW counting mode Fig3 CW/CCW counting mode Pulse/Direction counting mode Power 1C 2A LED IndicatorEgnd ConnectionEncoder CW/PULSE CCW/DIR Index S8091 card Constants Constants and functionsIcpdas 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 Introduction System Block DiagramDDA Technology Example Stepping Motor Example Pulse type input Servo Motor 8000 hardware address HardwareRstff Registers of I-8091 boardPower Limit switch configuration of X axis Hardware Configuration Limit switch configurationDirection configuration Output pulse mode configurationTurn Servo ON/OFF Hold ON/OFF Automatic protectionSet limit switch as normal close condition Extgnd Pin assignment of connector CN2Internal circuit of pulse output pin Internal circuit of limit switch inputFan-out type driver VEXTAs motor driver Example of connectionS8091 card Functions SoftwareIcpdas I8091RESETSYSTEM unsigned char cardNo Setting commandsRestriction Reversedir Icpdas 11 i8091EMGSTOPunsigned char cardNo Stop CommandsSimple 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 Detect I-8091 card ExampleExampleDEMO1.cpp Example DEMO.cpp