98
MicroLYNX QuickMANUAL TM intelligent motion systems, inc. Excellence in Motion 370 N. MAIN ST., PO BOX 457, MARLBOROUGH, CT 06447 PH: (860) 295-6102, FAX: (860) 295-6107 Internet: www.imshome.com, E-Mail: [email protected] Hardware Software Applications TM

mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

MicroLYNX

QuickMANUAL

TM intelligent motion systems, inc.

Excellence in Motion370 N. MAIN ST., PO BOX 457, MARLBOROUGH, CT 06447

PH: (860) 295-6102, FAX: (860) 295-6107Internet: www.imshome.com, E-Mail: [email protected]

HardwareSoftware

Applications

TM

Page 2: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

The information in this book has been carefully checked and is believed to be accurate; however, noresponsibility is assumed for inaccuracies.

Intelligent Motion Systems, Inc., reserves the right to make changes without further notice to any productsherein to improve reliability, function or design. Intelligent Motion Systems, Inc., does not assume any liabilityarising out of the application or use of any product or circuit described herein; neither does it convey anylicense under its patent rights of others. Intelligent Motion Systems and are trademarks of IntelligentMotion Systems, Inc.

Intelligent Motion Systems, Inc.’s general policy does not recommend the use of its products in life support oraircraft applications wherein a failure or malfunction of the product may directly threaten life or injury. PerIntelligent Motion Systems, Inc.’s terms and conditions of sales, the user of Intelligent Motion Systems, Inc.,products in life support or aircraft applications assumes all risks of such use and indemnifies Intelligent MotionSystems, Inc., against all damages.

TM

© 2000 Intelligent Motion Systems, Inc.All Rights Reserved

Page 3: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

1

Table Of Contents

Section 1: Introduction To The MicroLYNX ..................... 3Electrical Specifications ...................................................................................... 4Communications Specifications ....................................................................... 5Mechanical Specifications ................................................................................... 5Environmental Specifications ........................................................................... 5Mounting Information ........................................................................................ 6Connector Information ...................................................................................... 6MicroLYNX Terminology Explained ............................................................ 7Shopping List ......................................................................................................... 8

Section 2: Connecting Power............................................... 9Tools and Equipment Required ....................................................................... 9How to Connect Power ..................................................................................... 9

Section 3: Connecting A Motor......................................... 1 1Tools and Equipment Required ..................................................................... 11Recommended Stepping Motors .................................................................... 11How to Connect the Motor ............................................................................ 12

Section 4: Connecting Communications .......................... 1 5Tools and Equipment Required ..................................................................... 15Connecting Communications ......................................................................... 15

Section 5: Establishing Communications ......................... 1 8Tools and Equipment Required ..................................................................... 18Installing the LYNX Terminal Software ..................................................... 18Using the LYNX Terminal Software ........................................................... 20

Section 6: Controlling Motor Current ............................. 22Current Control Variables .............................................................................. 22

Section 7: Setting The Motor Resolution ......................... 23Setting the Motor Resolution Exercise ......................................................... 23

Section 8: Using The Isolated Digital I/O........................ 24The Isolated Digital I/O Defined .................................................................. 24Setting the Pull-up Voltage .............................................................................. 25The Input Output Setup Variable ................................................................. 26The IO Variable .................................................................................................. 30Setting the Digital Filtering for the I/O ...................................................... 32

Section 9: Expanding The MicroLYNX ............................ 33MicroLYNX Expansion Modules ................................................................. 33Choosing the Expansion Modules for Your Application ....................... 33Expanding the Isolated Digital I/O ............................................................... 35The High-Speed Differential I/O Module .................................................. 37The Analog Input/Joystick Interface Module ........................................... 45

Section 10: LYNX Software Components ........................ 50LYNX Software Components ........................................................................ 50Variables ................................................................................................................ 50Commonly Used Variables ............................................................................. 50Instructions .......................................................................................................... 53Flags ....................................................................................................................... 59Keywords .............................................................................................................. 59

Page 4: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

2

Section 11: LYNX Programming ...................................... 60Introduction to LYNX Programming .......................................................... 60Program Development Steps ........................................................................... 61Program Samples ................................................................................................ 64

Section 12: Sample Applications ........................................ 67Feed Cut 1 ............................................................................................................ 67Read And Feed .................................................................................................... 70AND - OR ........................................................................................................... 72On-The-Fly .......................................................................................................... 73Registration .......................................................................................................... 75Traverse ................................................................................................................. 78

Appendix A: Software Summary....................................... 8 1Appendix B: Troubleshooting ........................................... 87

Beginning to Troubleshoot .............................................................................. 87Troubleshooting Communications ............................................................... 87Troubleshooting Software ............................................................................... 87Contacting Application Support .................................................................... 89

Appendix C: Error Table ................................................... 90

Page 5: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

3

Introduction To The MicroLYNX

The MicroLYNX is a powerfulmachine control system whichcombines a bipolar microsteppingdriver with an expandableprogrammable controller into acompact panel mounted assem-bly.

With the addition of differentialI/O modules, the MicroLYNXhas the capability of driving twoadditional axes sequentially ordriving a following axis electroni-cally geared to the on-boarddriver.

The MicroLYNX includes twoindependent communicationports. It will accept commandsfrom either port and direct output to either as well. A system may be config-ured to use COMM Port 1 to communicate to a host PC or PLC while usingthe COMM Port 2 to communicate with an operator interface or additionalMicroLYNX systems.

The MicroLYNX comes in two output power ranges to fit a variety ofmotor sizes. Features such as 5 to 24VDC isolated I/O, multiple communica-tion types, and numerous expansion options make the MicroLYNX aneffective and powerful machine control solution.

Plug-on accessory modules allow control system designers to tailor theMicroLYNX System to their needs with minimal cost. The MicroLYNXmay be field upgraded by simply removing the side cover and adding expan-

sion modules.

The MicroLYNX software is upgradeable by using the IMSLYNX Terminal Software. Updates are posted on the IMSwebsite and may be downloaded. This allows older units theability to use new features and expansion modules as they

become available.

This Quick Guide is a step-by-step usage guide for the MicroLYNX.While not intended to replace the product manual provided on CD, itis essential in acquiring a thorough understanding of the MicroLYNXSystem. This “Quick Guide” provides the user with detailed connec-

tion and usage examples for the MicroLYNX and its associated expansionmodules, as well as the most commonly used components of the LYNXinstruction set. It also includes an introduction to LYNX programming.

Hi! I’m Motorhead!I’ll be your guide

through the processof setting up and

using your MicroLYNXSystem!

1

Page 6: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

4

E lectr i ca l Spec i f i cat ions

P o w e r S u p p l y R e q u i r e m e n t s

See Section 2: Connecting Power, for recommended supplies.

V o l t a g e

MicroLYNX - 4 (MX-CS100-400) ............................. +12 to +48VDCMicroLYNX - 7 (MX-CS100-700) ............................. +24 to +75VDC

C u r r e n t

Actual requirements depend on application and programmable current setting.

MicroLYNX - 4 (MX-CS100-400) ............................. 2A Typ., 4A PeakMicroLYNX - 7 (MX-CS100-700) ............................. 3A Typ., 6A Peak

Motor Dr i ve

See Section 3: Connecting a Motor, for recommended motors; Section 6: Control-ling the Motor Current and Section 7: Setting the Motor Resolution for details onthe following specifications.

Motor Type ........................................................................ 2/4 Phase bipolar stepperMotor Current (Software Programmable)

MicroLYNX - 4 ............................................... to 4A PeakMicroLYNX - 7 ............................................... to 7A Peak

Microstep Resolution (# of settings) ......................... 14Steps per Revolution (1.8° Motor)

400, 800, 1000, 1600, 2000, 3200, 5000, 6400, 10000, 12800,25000, 25600, 50000, 51200.

I s o l a t e d D i g i t a l I / O

See Section 8: Using the Isolated Digital I/O, for usage instructions.

Number of I/O ............................................................... 6 std, expandable to 24Input Voltage ................................................................... +5 to +24VDCOutput Current Sink .................................................... 350mA per LineInput Filter Range (Programmable) .......................... 215Hz to 21.5kHzPull-up Resistors ............................................................. 7.5 kΩ switchablePull-up Voltage (max)

Internal (Not an Output) .............................. +5VDCExternal .............................................................. +24VDC

Protection ............................. Over temp, short circuit, inductive clampIsolated Ground .................. Common to the 6 I/O lines

Page 7: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

5

Commun icat ions Spec i f i cat ions

See Sections 4 & 5 for connection and usage details.

Interface TypeCOMM 1 ........................................................... RS-232COMM 2 ........................................................... RS-485

# Bits per Character ....................................................... 8Parity ................................................................................. NoneHandshake ....................................................................... NoneBAUD Rate ............................................... 4800 to 38.8kbps (9600 Default)Error Checking ......................................... 16 bit CRC (binary mode)Communication Modes ..........................ASCII Text or BinaryIsolated Ground ..........................................Common to COMM 1 and 2

Mechan ica l Spec i f i cat ions

Dimensions ...................................................................... See figure 1.1# of Expansion Modules ............................................... 3Cooling ............................................................................. Built-in fanRecommended Mounting Hardware ........ 2 #6 (M3.5) machine screwsMounting Screw Torque .............................. 5 to 7 lb-in (0.60 to 0.80 N-m)

Env i ronmenta l Spec i f i cat ions

Operating Temperature ............................................... 0 to 50°CStorage Temperature ..................................................... -20 to 70°CHumidity ........................................................... 0 to 90% non-condensing

Figure 1.1: Dimensional Information, Dimensions in Inches (mm)

Page 8: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

6

Figure 1.3: Connector Pin Configuration

Connector In format ion

MOTOR PHASE A

MOTOR PHASE BMOTOR PHASE A

MOTOR PHASE BPOWER SUPPLY INPUT (+V)POWER SUPPLY RETURN (GND)

N.C.: PIN 1 PIN 2: RS-232 RX

PIN 1: V PULLUPPIN 2: I/O LINE 21PIN 3: I/O LINE 22PIN 4: I/O LINE 23PIN 5: I/O LINE 24PIN 6: I/O LINE 25PIN 7: I/O LINE 26

RS-232 TX: PIN 3 PIN 4: N.C.Communications Ground: PIN 5 PIN 6: RS-485 RX+

RS-485 RX-: PIN 7 PIN 8: RS-485 TX-RS-485 TX+: PIN 9 PIN 10: Communications Ground

PIN 8: I/O Ground (Isolated)

MicroLYNX ConnectionsCommunications: 10 Pin HeaderI/O: 8 Position Phoenix

MOTOR PHASE A

MOTOR PHASE BMOTOR PHASE A

MOTOR PHASE BPOWER SUPPLY INPUT (+V)POWER SUPPLY RETURN (GND)

N.C.: PIN 1 PIN 2: I/O LINE 21I/O LINE 22: PIN 3 PIN 4: V PULLUPI/O LINE 23: PIN 5 PIN 6: Out of Limit -

I/O LINE 24-: PIN 7 PIN 8: Out of Limit +I/O LINE 25: PIN 9 PIN 10: I/O Ground (Isolated)

PIN 1: RS-232 RXPIN 2: RS-232 TXPIN 3: RS-485 RX -PIN 4: RS-485 RX+PIN 5: RS-485 TX -PIN 6: Communications GroundPIN 7: RS-485 TX+

MicroLYNX ConnectionsCommunications: 7 Position PhoenixI/O: 10 Pin Header

1 132 3 4 5 6 87 9 10 11 12

14 15 16 17 18 19 20 21 22 23 24 25

PIN 3: RS-232 Receive Data (RX)

PIN 2: RS-232 Transmit Data (TX)

PIN 7: Communications Ground

25 Pin Serial COM Port

1

6 7 8 9

2 3 4 5

PIN 2: RS-232 Receive Data (RX)

PIN 3: RS-232 Transmit Data (TX)

PIN 5: Communications Ground

9 Pin Serial COM Port

RS-232 Communications Connections

RX

TXCGND

TX

RX

V PULLUP

CGND

IO 2x

IO 2x

IO GND

IO GND

MicroLYNX

MicroLYNX I/O

MicroLYNX I/O

Terminal/PC

C U RR EN TLIM ITIN G

R E SIS TO R

LED

Output To LED

Input Controlled By A Switch

8 Lead Motor - Series Connection

+5 to +24VDC

+

NormallyOpen Switch

P H A S E A

P H A S E A

P H A S E B

P H A S E B

Page 9: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

7

Mount ing In format ion

The MicroLYNX System may bemounted to a panel by using standard#6 (M3) hardware. No heatsinking isnecessary as the system has a built-incooling fan. When mounting theMicroLYNX in an enclosure, ensurethat adequate space is available for airflow on the fan side of theMicroLYNX case. Mounting screwsshould be tightened to 5 to 7 lb-in(0.60 to 0.80 N-m) torque.

M ounting Screw TorqueSpecification:

5 to 7 lb -in (0 .60 to 0 .80 N-m )

Figure 1.2: Panel Mounting the MicroLYNX

MicroLYNX Termino logy Exp la ined

Throughout this book several terms will be introduced that apply to theMicroLYNX. They are:

F l a g

LYNX software component that may be set to a logic state to indicate status andenable/disable functions. Flags may be either system or user-defined.

Immed iate Mode

MicroLYNX mode of operation where commands are issued directly from theterminal to the MicroLYNX.

I ns truct ion

LYNX software component used to direct events inside or outside a program.

I s o l a t e d D i g i t a l I / O

MicroLYNX programmable I/O. Electrically isolated from motor power ground.

Labe l

1 to 8 character alpha-numeric name that may be assigned to a program, subrou-tine, or user-defined variable or flag.

M U N I T s

The munit term is derived from the MUNIT, or Motor UNIT variable, which isthe scaling factor by which drive step clock pulses are converted to some unit ofdistance measure. The MUNIT variable specifies the number of microsteps peruser unit (inches, degrees, millimeters, etc.). Once MUNIT is established, motionvariables (position, velocity acceleration, etc.) may be expressed in terms of userunits. Almost all the MicroLYNX motion, position, velocity, acceleration and

Page 10: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

8

deceleration variables and instructions will be affected by this variable.

Party Mode

MicroLYNX mode of operation in which two or more MicroLYNX are net-worked via RS-485. Each MicroLYNX node has an address specified by usingthe “DN” instruction. This address must preceed the messages intended for aspecific node. The default address is the exclamation point character “!”.

Program Mode

MicroLYNX mode of operation where program entry is accomplished.

User Un i t

See the definition for munits.

V a r i a b l e

LYNX software component that acts as a register to contain numeric informa-tion. May be used to effect events in or out of a program. The programmer isrequired to declare user-defined variables.

Shopp ing L is t

This book contains several exercises designed to aquaint you with theMicroLYNX. Performing these exercises while reading this guide will help youlearn quickly. There are a few items that you will need to purchase in addition tothe MicroLYNX System in order to duplicate these exercises.

An Unregulated Power Supply [Section 2].

Power Cabling [Section 2].

AC Line Cord* [Section 2].

Stepping Motor [Section 3].

Motor Cabling* [Section 3].

Communications Cable [Section 4].

IBM compatible 486 or higher PC w/free COM Port run-ning a 32 bit Windows version (95/98, NT 4.0 or 2000).NOTE: This is only required if you are going to use the IMSLYNX Terminal to communicate with and program yourMicroLYNX. If not, any platform or OS can be used with itsnative terminal and text editor [Section 4].

Six (6) LED’s: Digikey PN 160-1049-ND (has built-in currentlimiting resistors) or equivalent [Section 8].

Three (3) push button momentary switches [Section 8].

+5 to +24VDC supply (9V battery will work) [Section 8].

Small Standard Screwdriver.

*Power supply and motor may come already equipped.

Page 11: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

9

Connecting Power

I perform at my best when an unregulated supply

with ±10% Voltage Rippleis used!

Too ls and Equ ipment Requ i red

An unregulated power supply.

Power cabling.

A small standard screwdriver.

An AC line cord (if the supply used is not equipped with one).

P o w e r S u p p l y S p e c i f i c a t i o n s

The following power supply specifications are recommended for theMicroLYNX System:

M i c r o L Y N X - 4

Output Voltage ................................................. +12 to +24VDCOutput Current ................................................ 2A (typ.), 4A (peak)

M i c r o L Y N X - 7

Output Voltage ................................................. +24 to +75VDCOutput Current ................................................ 3A (typ.), 6A (peak)

R e c o m m e n d e d I M S P o w e r S u p p l i e s

The ISP200 is a low-cost unregulated switching power supplywhich can handle varying load conditions. This supply isavailable in either 120 or 240 VAC configuration. The partnumbering for these supplies matches that of the MicroLYNX,ie: The MicroLYNX-4 would use an ISP200-4 and aMicroLYNX-7 would use an ISP200-7. See the IMS full-linecatalog for specifications on these supplies.

Cab l ing

Shielded twisted pair cabling should be used to make the power supply connec-tions to the MicroLYNX. The following wire gauges:

MicroLYNX-4 ................................................................................. 18 gauge

MicroLYNX-7 ................................................................................. 16 gauge

How to Connect Power

IMS suggests the use of unregulated, properly sized power supplies. Refer to theApp-Notes section of the IMS website (www.imshome.com) for power supplyselection tips.

NOTE: Regulated power supplies may become unstable during current in-rush.This is normal with electric motors. This instability may cause damage to theMicroLYNX drive.

2

Page 12: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

10

When connecting power to the MicroLYNX, ensure the following:

At least 18 gauge wire is used for the MicroLYNX-4, 16 gauge for the MicroLYNX-7.

+V and GND are not reversed.

All connections are tight.

Shielded twisted pair cabling is used, with atleast 1 twist per inch.

System noise makesme run rough or lose steps! Please

use shielded twisted pair for motorand power supply cabling to

minimize electricalnoise!

Figure 2.1: MicroLYNX Power Connection

IS P200-4

ISP 200 - 4

MICROTM

M icroLY N X

12

3

R XT X

C G N D

+V

GN D

120 VAC IN

Ensure that the DC output ofthe power supply does not exceedthe maximum input voltage!

A ll power supply w iring shouldbe shielded tw isted pair toreduce system noise!

Page 13: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

11

Connecting A Motor

Too ls and Equ ipment Requ i red

The following is required to connect a motor to your MicroLYNXSystem:

A stepping motor.

Motor cabling (if the motor is not so equipped.).

A small standard screwdriver.

A Stepp ing Motor

IMS recommends the following 1.8° Hybrid Stepping Motors forthe MicroLYNX System. All IMS motors are CE marked. Formore detailed information on these motors, please see the IMSmotor catalog or the IMS website at www.imshome.com.

17 Frame (MicroLYNX - 4 )

Single Shaft Double ShaftM2-1713-S ................................................................................ M2-1713-DM2-1715-S ................................................................................ M2-1715-DM2-1719-S ................................................................................ M2-1719-D

2 3 F r a m e ( M i c r o L Y N X - 4 / - 7 )

Single Shaft Double ShaftM2-2215-S ................................................................................ M2-2215-DM2-2220-S ................................................................................ M2-2220-DM2-2232-S ................................................................................ M2-2232-DM2-2240-S ................................................................................ M2-2240-D

34 Frame (MicroLYNX - 7 )

Single Shaft Double ShaftM2-3424-S ................................................................................ M2-3424-DM2-3437-S ................................................................................ M2-3437-DM2-3450-S ................................................................................ M2-3450-D

E n h a n c e d ( H i g h e r T o r q u e ) S t e p p i n g M o t o r s

IMS also carries a new series of 23 frame enhanced stepping motors that arerecommended for use with the MicroLYNX System.

Single Shaft Double ShaftMH-2218-S ............................................................................. MH-2218-DMH-2222-S ............................................................................. MH-2222-DMH-2231-S ............................................................................. MH-2231-D

For instructions on sizing amotor for your application, see Part 2, Section 5 of

the Product Manual pdf on the CD!

3

Page 14: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

12

How to Connect the Motor

There are basically three different lead configurations of steppingmotors with a total of five different wiring configurations.These are:

8 Lead Motor

S e r i e s C o n f i g u r a t i o n

A series motor configuration would typically be usedin applications where a higher torque at low speeds isneeded. Because this configuration has the most induc-tance, the performance will start to degrade at higherspeeds. Use the unipolar current rating as the peakoutput current.

If you need higher torque outputat lower speeds, connect

me in a series configuration.For higher torque outputat higher speeds use the

parallel configuration!

Figure 3.1: 8 Lead Motor, Series Connection

P H A S E A

P H A S E A

P H A S E B

P H A S E B

I M S I n s i d e - O u t S t e p p i n g M o t o r s

The new Inside Out Stepper (IOS) motors were designed and patented by IMS tobring versatility to small motors. These motors employ a unique multi-func-tional, hollow-shaft design. By mounting a miniature ball screw to the front shaftface, the IOS motor can be converted to a ball screw linear actuator. In additionto offering long life and high efficiency, ball screw linear actuators may be fieldretrofitted. There is no need to throw the motor away due to wear of the nut orscrew.

Single Shaft IMS P/N17 Frame ................................................................................... M3-1713-IOS23 Frame ................................................................................... M3-2220-IOS34 Frame ................................................................................... M3-3424-IOS

Cab l ing

Shielded twisted pair cabling should be used to make the power supply connec-tions to the MicroLYNX in the following gauges:

MicroLYNX-4 ................................................................................. 18 gauge

MicroLYNX-7 ................................................................................. 16 gauge

Page 15: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

13

P H A S E A

P H A S E A

P H A S E B

P H A S E B

Figure 3.2: 8 Lead Motor, Parallel Connection

NOTE: Typically step motor current ratings are unipolar for 8 and 6lead motors.

NOTE: If bipolar series current is given, multiply by 1.4 to determinethe peak output current.

P a r a l l e l C o n f i g u r a t i o n

An 8 lead motor in a parallel configuration yields more torque at higherspeeds than the same motor wired in series. Multiply the per phase (or

unipolar) current rating by 1.96, or the bipolar current rating by 1.4to determine the peak output current.

6 L e a d M o t o r

F u l l C o i l C o n f i g u r a t i o n

The full coil configuration on a 6 lead motor should be used inapplications where higher torque at lower speeds is desired. This

configuration is also referred to as full copper. Use the per phase (orunipolar) current rating as the peak output current.

P H A S E AN O CO N NE CT IO N

N O CO N NE CT IO N

P H A S E A

P H A S E B

P H A S E B

Figure 3.3: 6 Lead Motor, Full Coil Connection

If you need higher torque outputat lower speeds, connect

me in a full coil configuration.For higher torque outputat higher speeds use thehalf coil configuration!

Page 16: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

14

4 Lead Motor

4 lead motors are the least flexible but easiest to wire. Speed and torque willdepend on winding inductance. In setting the driver output current, multiply thespecified phase current by 1.4 to determine the peak output current.

P H A S E A

N O CO N NE CT IO N

N O CO N NE CT IO N

P H A S E A

P H A S E BP H A S E B

Figure 3.4: 6 Lead Motor, Half Coil Connection

H a l f C o i l C o n f i g u r a t i o n

As previously stated, the half coil configuration uses 50% of the motorphase windings. This gives lower inductance, hence, lower torque outputat low speeds. As with the parallel connection of 8 lead motor, thetorque output will be increased at higher speeds. This configuration is

also referred to as half copper. In setting the driver output current,multiply the specified per phase (or unipolar) current rating by 1.4 todetermine the peak output current.

P H A S E A

P H A S E A

P H A S E B

P H A S E B

Figure 3.5: 4 Lead Motor Connections

Page 17: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

15

Connecting Communications

One of the features that make the MicroLYNX a unique product is its dualCOMM ports. This allows for simultaneous use of both the RS-232 and the RS-485 interface. This is especially useful in party mode where several MicroLYNX

nodes are networked in a system. This section will illustrate connectingyour MicroLYNX to a communications host, typically a PC, using asingle MicroLYNX and either the RS-232 interface or the RS-485interface. For instructions on connecting communications to multipleMicroLYNX Systems see the product manual.

Too ls and Equ ipment Requ i red

The following tools and equipment are required to connect communi-cations to your MicroLYNX System:

IMS communications cable part# MX-CC100-00 or equivalent(if 10 pin header version of the MicroLYNX is used).

Communications cable (if 7 pin terminal version of theMicroLYNX is used).

A free COM port on a PC.

Connect ing Commun icat ions

R S - 2 3 2 I n t e r f a c e

The following diagram and table illustrate the connection of both the RS-232 andthe RS-485 interface to the MicroLYNX.

4Align pin 1 of the cable,

indicated by the red strand,with pin 1 of the

communications connector, indicated by the doton the MicroLYNX!

Figure 4.1: MicroLYNX with IMS Communications Cable

You can only use theRS-232 interface if

your MicroLYNX is within 50 feet of the Host PC,

otherwise you must use the RS-485 interface!

Page 18: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

16

1 2 3 4 5 6 7 8 9 10 11 12 13

14 15 16 17 18 19 20 2 1 22 23 24 25

25 P in Seria l Porton H ost PC

9 P in Seria l Porton H ost PC1 2 3 4 5

6 7 8 9

Host PCMICRO

TM

4

M icroLY N X -4 (10 P in H eader)

12

3

RXTX

CGND

M icroLY N X -4 (7 P in Term inal B lock)

P IN 1RX

RXTXTX

CG ND CG ND

Figure 4.2: RS-232 Interface Connection

noitcennoCXNYLorciM232-SR

XNYLorciM CP

redaeHniP01 xineohPniP7 troPlaireSniP52 troPlaireSniP9

)XR(ataDevieceR3niP )XR(ataDevieceR1niP )XT(ataDtimsnarT2niP )XT(ataDtimsnarT3niP

)XT(ataDtimsnarT2niP )XT(ataDtimsnarT2niP )XR(ataDevieceR3niP )XR(ataDevieceR2niP

DNGC5niP DNGC6niP DNGC7niP DNGC5niP

Table 4.1: RS-232 Interface Connection

When using the RS-232 interface the MicroLYNX must be within 50 feet of thecommunications host.

R S - 4 8 5 I n t e r f a c e

In a system consisting of a single MicroLYNX, the RS-485 interface should be usedif the MicroLYNX will be more than 50 feet from the host PC. Since most PC’s donot come with an RS-485 interface preinstalled, you will have to install an RS-485

MX-CC100-000

COMMUNICATIONS

PIN 1

PIN 2

PIN 9

PIN 10

Page 19: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

17

CGND

RX

TX

Host PC

RS-232 - RS-485Converter

Recom m ended IM S Part # CV-3222*

*If your PC is equipped with an RS-485 board,

no converter is necessary.Connect RS-485 lines directly

to Host PC as shown.

MICROTM

4

M icroLYN X-4 (10 P in Header)

12

3

RX-

TX-CGND

M icroLYN X-4 (7 P in Term inal B lock)

P IN 1

P IN 1

R X -R X +TX -TX +

C G N D

RX-

RX-RX+

RX+

TX-

TX-

TX+

TX+

CG ND CG ND

Figure 4.3: RS-485 Interface Connection

metsySXNYLorciMelgniSecafretnI584-SR

584-SRot232-SRretrevnoC

XNYLorciM

langiS langiSniP01redaeH

niP7lanimreT

-XT -XR 7 3

+XT +XR 6 4

-XR -XT 8 5

+XR +XT 9 7

DNGC DNGC 5,01 6

Table 4.2: RS-485 Interface Connection

board in an open slot in your PC, or purchase an RS-232 to RS-485 converter, suchas the CV-3222 sold by IMS.

The following table and diagram illustrate the connection of the RS-485 interface.

COMMUNICATIONS

PIN 1

PIN 2

PIN 9

PIN 10

Page 20: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

18

Establishing CommunicationsToo ls and Equ ipment Requ i red

The following tools and equipment are required to establish communicationswith your MicroLYNX System:

IMS LYNX Terminal software.

A free COM port on a PC.

A P e r s o n a l C o m p u t e r w i t h a F r e e C O M P o r t

A PC running Windows 9x, NT4.0 or 2000 is required if the LYNX Terminalsoftware will be used. However, any operating system that has support for an

ASCII terminal can be used to commu-nicate with the MicroLYNX.

L Y N X T e r m i n a l S o f t w a r e

The LYNX Terminal software isprovided to ease programming the

MicroLYNX by combining a text editor and ASCIIterminal. This program is located on the LYNX ProductFamily CD and can be installed by running [driveletter]:\Lynx Terminal\IMS LYNXTerminal.exe. It can alsobe downloaded from the IMS website atwww.imshome.com. The minimum system requirementsare:

A 486 or higher PC.5 MB hard drive space.Windows 9x, NT 4.0 or Windows 2000.

I ns ta l l i ng the LYNX Termina l So f tware

The LYNX Terminal software is a programming/communications interface.This program was created by IMS to simplify programming and upgrading theMicroLYNX. The LYNX Terminal is also necessary to upgrade the software inyour MicroLYNX. These updates will be posted to the IMS website atwww.imshome.com as they are made available.

To install the LYNX Terminal to your hard drive, insert the CD into your CD-ROM Drive. The 3.5” CD, while smaller than typical compact disks, will workin any horizontally mounted, tray-type CD drive.

To start the installation click “Start > Run” and type “[Drive Letter]:\LYNXterminal\IMS LYNXTerminal.exe” in the “Open” box.

Follow the on-screen instructions to complete the installation.

Detailed instructions for the IMS LYNX Terminal software can be located inThe LYNX / MicroLYNX Software Reference Manual.

If you are unable to run LYNXTerminal, any ASCII Terminaland Text Editor program can

be used!

5

Page 21: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

19

1) To open the LYNX Terminal select Start > Programs >Lynx_Terminal > Lynx_Terminal.

2) Click the File Menu Item “Edit>Preferences”.

3) Click the “Comm Settings” tab.

4) Select the Communications Port that you will be using withyour MicroLYNX.

5) The BAUD rate is already set to the MicroLYNX default.Do not change this setting until you have established com-munications with the MicroLYNX System.

6) The “Window Size” settings are strictly optional. You mayset these to whatever size is comfortable to you.

7) Click “OK”. The settings will be automatically saved upon anormal shutdown.

8) Apply power to the MicroLYNX System. The followingsign-on message should appear in the terminal window:

Program Copyright © 1996-2000 by:

Intelligent Motion Systems, Inc.

Marlborough, CT 06447

VER = 1.300 SER =XXXXXXXXX

If you can see this sign-on message then you are up and running! If the sign-onbanner does not appear, try using a software reset: hold down the “Ctrl” keyand press “C” (^C). If the sign-on banner still doesn’t appear then there may bea problem with either the hardware or software configuration of theMicroLYNX or Host PC. See Appendix B: Troubleshooting, for more informa-tion.

Figure 5.1: LYNX Terminal Main Window

Page 22: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

20

Us ing the LYNX Termina l So f tware

The LYNX Terminal software is an easy to setup and use interface forMicroLYNX programming. It is also required to upgrade the software in theMicroLYNX. The LYNX Terminal program is fully covered in the LYNX ProductFamily Operating Instructions. Its coverage in this document is limited to what isrequired to communicate with the MicroLYNX, and to create, edit and downloadMicroLYNX programs.

C o n f i g u r i n g C o m m u n i c a t i o n S e t t i n g s

The communications settings are configured by means of the “Preferences Dialog”.This dialog is accessed through the “Edit > Preferences” menu item or by clickingthe “Preferences” icon on the toolbar. The preferences dialog gives the user theability to set the format for text size, font and color, as well as general communica-tions settings. It is set by default to the optimum communications settings for the

MicroLYNX. If you change the BAUD rate setting for the MicroLYNX, powerwill have to be cycled for the change to take effect. Ensure that the LYNX Termi-nal preferences are adjusted for the new BAUD settings.

D o w n l o a d i n g a P r o g r a m t o t h e M i c r o L Y N X

There are two ways to download programs to the MicroLYNX:

1] Directly from the text editor window of the LYNX Terminal.

2] From a text file located on a hard drive or removeable disk.

To download a program from the text editor window click the menu item “Trans-fer > Download”. The dialog shown in Figure 5.3 will open. Select the “SourceType > Edit Window” option, click download. The program will transfer to theMicroLYNX.

Programs can be downloaded to the MicroLYNX from a text file by selecting

Figure 5.2: LYNX Terminal Communications Setup Window

Page 23: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

21

Figure 5.3: LYNX Terminal Download Dialog

Figure 5.4: LYNX Terminal Upload Dialog

“Source Type > File” on the dialog and typing in a drive location:\file name in the“File Name” box on the dialog, or browsing to the file location.

Up load ing a Program From the MicroLYNX

Programs may also be uploaded from the MicroLYNX in two ways:

1] Directly to the text editor window of the LYNX Terminal.

2] To a text file located on a hard drive or removeable disk.

To upload a program to the text editor window click the menu item “Transfer >Upload”. The dialog shown in Figure 5.4 will open. Select the “Destination Type> Edit Window” option, click “Upload. The program will transfer from theMicroLYNX.

Programs may be uploaded from the MicroLYNX to a text file by selecting “Desti-nation Type > File” on the dialog and typing in a drive location:\file name in the“File Name” box on the dialog.

Page 24: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

22

Controlling Motor Current

Current Contro l Var iab les

One of the unique and powerful features of the MicroLYNX is theprecision current control available through the instruction set.Unlike most stepper drives, which only offer the capabilityof controlling run current and hold current, theMicroLYNX also has the capability of setting the accelera-tion current. By setting the acceleration current to a highervalue, the system designer can deliver more power to thesystem at the time when it is needed the most: whensystem inertia must be overcome. Afterward, when themotor has reached peak velocity, the run current may beset to a lower value, thus reducing motor heating andimproving system power efficiency.

All of these variables may be changed on-the-fly inside aMicroLYNX Program. The value range of these variables is apercentage (0 - 100%)PGM 200 'start program at address 200

LBL I_SET 'label program I_SET

MAC=40 'set acceleration current to 40%

MRC=30 'set run current to 30%

MHC=10 'set holding current to 10%

ACCL=50000 'set acceleration to 50000 munits

MOVR 900000 'index relative 900000 munits

HOLD 2 'suspend program until motion completes

MAC=75 'set acceleration current to 75%

MRC=75 'set run current to 75%

MHC=50 'set holding current to 50%

VI=10000 'set initial velocity to 10000 munits/sec

ACCL=1000000 'set acceleration to 1000000 munits/sec2

MOVR -2000000 'index relative -2000000 munits

HOLD 2 'suspend program until motion completes

END

PGM

Acceleration current can be sethigher for higher torque outputduring acceleration, allowing therun current to be set to a lower

value when the torque isn’t needed to overcome inertia. This

keeps me cool and consumesless power!

Figure 6.1: Motor Current Control Variables

6

M ax Veloc ity(V M )

In itia l Ve lo c ity (V I)

Tim e

Accel

e ratio

n

A cce lera

t ionD

ece lera t ion

M A C =80

M A C =80M R C =35

H C D T=6 0M S D T=3 0

M H C =15(I = 80%)A C C L

(I = 80%)A C C L(I = 35%)R U N

(I D elay Tim e = 60m s)H O LD(M o tor Se ttling

D elay Tim e = 30m s)

(I = 15% )H O LD

Page 25: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

23

Setting The Motor Resolution

The output resolution of the drivesection of the MicroLYNX is set bythe MSEL variable. By viewing thetable on the right, you can see thatthere are fourteen (14) resolutionsettings available with the

MicroLYNX. These settings may bechanged on-the-fly in either

immediate mode or in aprogram. The operation ofthis variable is illustrated inthe following exercise.

In this excercise we will writea short program that willsimply slew the motor andcycle through a few of thebinary microstep resolutionsettings. The lower theresolution is, the higher thespeed of the motor.

The default resolution is 256 microsteps per step, or 51,200 microsteps per

revolution!

7

Sett ing the MotorReso lut ion Exerc ise

Enter the following program into the text editor window of the LYNX Terminal:MAC=100 'set acceleration current to 75%

MRC=100 'set run current to 75%

PGM 200 'start program at address 200

SLEW 8000 'slew the motor at 4000 munits/sec

HOLD 1 'suspend prog. until velocity change completes

MSEL=128 'set resolution to 128 msteps/step

DELAY 1000 'delay program 1 sec.

MSEL=64 'set resolution to 64 msteps/step

DELAY 1000 'delay program 1 sec.

MSEL=32 'set resolution to 32 msteps/step

DELAY 1000 'delay program 1 sec.

MSEL=16 'set resolution to 16 msteps/step

DELAY 1000 'delay program 1 sec.

MSEL=8 'set resolution to 8 msteps/step

DELAY 10000

END

PGM

Transfer the program to the MicroLYNX by clicking the menu item “Transfer > Download”and selecting “Edit window” as the source. Run the program by typing “EXEC 200” in theterminal. The motor should speed up as it cycles through the resolution setting.

sgnitteSnoituloseRpetsorciM

retemaraPLESM)petS/spetsorciM(

veR/spetsorciM

sgnitteSnoituloseRpetsorciMyraniB)rotoM°8.1(

2 004

4 008

8 006,1

61 002,3

23 004,6

46 008,21

821 006,52

652 002,15

sgnitteSnoituloseRpetsorciMlamiceD)rotoM°8.1(

5 000,1

01 000,2

52 000,5

05 000,01

521 000,52

052 000,05

Table 7.1: Microstep Resolution Settings

Page 26: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

24

Using The Isolated Digital I/O

The Iso la ted D ig i ta l I/O Def ined

The MicroLYNX comes standard with a set ofsix (6) +5 to +24VDC I/O lines which may

be programmed individually as eithergeneral purpose or dedicated inputs

or outputs, or collectively as agroup. The isolated digital I/Omay also be expanded to twenty-four (24) lines in groups of six (6).

The I/O groups and lines arenumbered in the following fashion:

Group 20 = Lines 21 - 26 (Standard)

Group 30 = Lines 31 - 36 (Optional)

Group 40 = Lines 41 - 46 (Optional)

Group 50 = Lines 51 - 56 (Optional)

The isolated digital I/O may be defined as either active HIGH oractive LOW. When the I/O is configured as active HIGH, thelevel is +5 to +24VDC and the state will be read as a “1”. If thelevel is 0 VDC, then the state will be read as “0”. Inversely, ifconfigured as active LOW, then the state of the I/O will be read asa “1” when the level is LOW, and a “0” when the level is HIGH.

The active HIGH/LOW state is configured by the third parameter of the IOSvariable, which is explained further on. The goal of this I/O configurationscheme is to maximize compatibility between the MicroLYNX and standardsensors and switches.

T h e P i n C o n f i g u r a t i o n o f t h e I s o l a t e d I / O

The following figure illustrates the pinout of I/O group 20:

The is the voltageof the I/O, it is HIGH if it is

5 to 24 VDC, or LOW if it is 0 VDC. The is read as a “1” or a “0” where “1” is

considered to be Active/ON and “0” isconsidered to be Inactive/OFF as

determined by the LEVEL of the I/Oand how the I/O was defined to

respond to that Level

LEVEL

STATE

MICROTM

GR

OU

P 20 I/O

CO

MM

UN

ICATIO

NS

EX

PAN

SIO

NS

BO

AR

DS

12

I/O LINE 25

V PULLUP

I/O GROUND

I/O LINE 26

I/O LINE 24

I/O LINE 23

I/O LINE 22

I/O LINE 21

Figure 8.1: Isolated I/O Pin Configuration

8

Page 27: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

25

U s e s o f t h e I s o l a t e d D i g i t a l I / O

The isolated I/O may be utilized to receive input from external devices such assensors, switches or PLC outputs. When configured as outputs, devices such asrelays, solenoids, LED’s and PLC inputs may be controlled from the

MicroLYNX. Depending on the device connected, the input or output may bepulled-up to either the internal +5VDC supply or an external +5 to +24VDCsupply, or the I/O lines may be pulled-down to ground.

These features, combined with the programmability and robust construction ofthe MicroLYNX I/O open an endless vista of possible uses for the I/O in yourapplication.

Setting Pul l -up Voltage for the Isolated Digital I/O

The isolated I/O lines may be pulled-up two ways. Depending on your I/O setupand devices used, it will be necessary for you to set the switches or supply an

external pull-up voltage

1] The internal +5VDC, 150mA supply.

2] An external +5 to +24VDC supply.

I n t e r n a l + 5 V D C

When using the internal +5VDC supply, the I/O line is pulled-upthrough a 7.5kΩ resistor. To pull the I/O line up to the internalsupply, the switches for the I/O lines being pulled-up must beplaced in the ON position. This is not to be used as a +5VDCoutput, only as a pull-up voltage if the user doesn’t wish to supplyan external voltage.

E x t e r n a l + 5 t o + 2 4 V D C S u p p l y

If a higher voltage is needed, an external supply may be connected. The pull-upswitches will be ON, and the V+ output of the supply connected to pin 1 (VPULLUP) and the supply return (GND) would be connected to pin 8, (I/OGROUND) of the MicroLYNX I/O connector.

M icroLYN XSystem

SensorsSw itchesPLC O utputs

R elaysSo lenoidsLED sPLC InputsOUTPUTS

INPUTS

Figure 8.2: Isolated I/O Applications

Page 28: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

26

The Input Output Setup Var iab le ( IOS)

Before we can travel any further down the road of “I/O Setup” wemust gain a solid understanding of the I/O setup variable: IOS.The MicroLYNX I/O scheme is a powerful tool for machineand process control. Because of this power, a level ofcomplexity in setup and use is found that doesn’t exist incontrollers with a less capable I/O set.

Each I/O line may be individually programmed to any oneof 8 dedicated input functions, 7 dedicated output func-tions, or as general purpose inputs or outputs. The I/O may beaddressed individually, or as a group. The active state of the lineor group may also be set. All of these possible functions areaccomplished with the IOS variable

The IOS variable has three parameters when used to configurethe isolated digital I/O. These are:

1] I/O Line Type: Specifies the type of I/O that theline or group will be configured as, i.e. generalpurpose or dedicated function.

2] I/O Line Function: Either an input or an output.

3] Active State: Specifies whether or not the line will beactive HIGH or active LOW.

The default configuration of I/O group 20 is: 0,0,1. This means that by defaulteach line in group 20 is configured to be a General Purpose (0), Input (0), whichis active when HIGH (1). The following figure and exercises illustrate possibleconfigurations of the IOS.

IO S = , , XX X X XTo configure an entire I/O Group enter the

Group # (20, 30, 40 or 50) here!

To configure an individual I/O Line enter the L ine # (21-26, 31-36, 41-46 ,

or 51-56) here!

Enter I/O Line Type # H ere

0 = Genera l Purpose9 = S tart Inpu t10 = S top Inpu t11 = Pause Input12 = H om e Input13 = L im it P lus Input14 = L im it M inus Input15 = S ta tus O utpu t

16 = Jog P lus Inpu t17 = Jog M inus Inpu t18 = M oving O utput19 = Indexing in P rogress O u tput21 = P rogram R unn ing O utpu t22 = S ta ll O u tput23 = E rror O utpu t24 = P rogram Paused

D efine L ine o r G roupA s Inpu t o r O utpu t

0 = Inpu t1 = O utpu t

Se t the state o f the L ine or G roup

0 = Active Low1 = Active H igh

Figure 8.3: The IOS Variable Settings

The three parameters of the IOS variable

are the keys that unlockthe power of the MicroLYNX I/O!

Page 29: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

27

I O S E x e r c i s e # 1 : S e t t i n g a D e d i c a t e d O u t p u t

We want to connect an LED to I/O line 21that will illuminate when the motor is moving.

Connect the LED to the I/O line as shown.Enter the following in the terminal:

IOS 21 = 18,1,0

The “18” tells the MicroLYNX that I/O line 21is to be a dedicated Moving output. The second

parameter MUST be set to “1”defining the line as an output. Weset the third parameter to “0”making the line active LOW.

Now let’s test the configuration byturning the power on and enteringthe following into the terminal:

SLEW 200000

When the motor is moving the LED should be illuminated. Bystriking the Escape (Esc) key, the motion should stop and the LED

will turn off.

IOS Exercise # 2A: Sett ing a Dedicated Input Act ive Low

In this example we want to connect a switch that will soft stop the motorwhen pressed. Because we leave the connections and settings from the previ-ous example when we use the switch to stop the motion the LED will turnoff, verifying to us that step-clock pulses are no longer being sent to themotor driver.

Connect the switch as shown. Set the pull-up switch for I/O line 22 in theON position, pulling the line up to the internal +5 volts.

Enter the following into the terminal:

IOS 22 = 10,0,0

The “10” instructs the MicroLYNX to setI/O line 22 to be a dedicated Soft Stopinput. Since it is an input, the secondparameter is set to 0. The third parameteris set 0, or active LOW, as the switch willpull the input down to ground.

Now, we test the configuration by entering“SLEW 200000” into the terminal, the LEDshould turn off. Press the switch. Themotor should stop and the LED illuminate.

When setting a dedicatedinput or output, the

second parameter mustmatch the function

specified by the firstparameter, either inputor output, or an error

will occur!

I/O LIN E 22

PU S H BU T TO NSW IT C H

I/O G N D

Figure 8.5: IOS Exercise #2A

I/O LIN E 21

C U R R E N TLIM IT IN G

R ES ISTO R

LED

V P U LL

Figure 8.4: IOS Exercise #1

Page 30: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

28

I O S E x e r c i s e # 2 B : S e t t i n g a D e d i c a t e d I n p u t A c t i v e H i g h

In this example we are going to use the sametype of switch and LED configuration as in theprevious example, except, instead of connectingthe switch between I/O 22 and I/O GND, wewill connect the switch between I/O 22 and VPULL. As before, we will use the switch to SoftStop the motor.

Connect the switch as shown. Since we will bepulling the I/O line to +5VDC using the pushbutton switch to activate it, we move the pull-up switch for line 22 to the OFF position.

Enter the following into the terminal:

IOS 22 = 10,0,1

As before, the line is a Soft Stop (10) input (0), only this time we have set it to beactive HIGH (1) instead of LOW, now the line will be active when it sees +5V.Slew the motor to test the setup. When the switch is depressed the motor shouldstop and the LED turn off.

Leave the LED and switch connected for the next two examples.

I O S E x e r c i s e # 3 : S e t t i n g a G e n e r a l P u r p o s e O u t p u t

In this example we are going to use the LED connected to I/O line 21 and write asmall program that will cause the LED to illuminate following a short move,wait for two seconds, turn the LED off, then repeat.

Enter the following program into the text editor window of the LYNX Terminalsoftware. It isn’t necessary to type in the comments, which are preceded by theapostophe (‘). These are there to explain each line of code. In actual programdevelopment they are a troubleshooting aid.IOS 21 = 0,1,0 'set I/O line 21 = gen. purpose out, active low

PGM 200 'start program at address 200

LBL IO_TEST 'name program IO_TEST

MOVR 51200 'index to relative position 51200

HOLD 2 'hold program execution until motion completes

IO 21 = 1 'set I/O line 21 active

DELAY 2000 'wait 2 seconds

IO 21 = 0 'set I/O line 21 inactive

BR IO_TEST 'loop to beginning of program

END

PGM

When completed, download the program to yourMicroLYNX by clicking the menu item “Transfer > Down-load” on the LYNX Terminal’s menu bar. Select “Edit Win-dow” as the source type on the download dialog, click down-load. The program will transfer to your MicroLYNX.

Test your program by entering “EXEC IO_TEST” into theterminal window. The motor should move 51200 microsteps

These small example programsalso serve to introduce youto the LYNX programming

language. They introduce common commands that will be covered

later in this document

I/O LIN E 22

PU S H BU T TO NSW IT C H

V P U LL

Figure 8.5: IOS Exercise #2B

Page 31: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

29

(1 revolution for a 1.8° stepper motor with the MicroLYNX at the defaultmicrostep resolution of 256), the LED will illuminate for 2 seconds, turn off, andthe process will repeat itself until the escape key is pressed.

At this point you will want to clear and restore your MicroLYNX, this is doneby entering the following in the terminal window:

CP 1,1DVF ,,1IP

I O S E x e r c i s e # 4 : S e t t i n g a G e n e r a l P u r p o s e I n p u t

In this next example we will build on the last one and do something a little morecomplex. In this example the program will run as in the previous one except wewill add a subroutine that will change the delay from 2 seconds to .5 seconds andmove the motor 25,700 microsteps in the opposite direction, repeating this untilthe switch is released.

Enter the following program into the text editor window of the LYNX Termi-nal software:IOS 21 = 0,1,0 'set I/O line 21 = gen purpose out, active low

IOS 22 = 0,0,1 'set I/O line 22 = gen. purpose in, active high

PGM 200 'start program at address 200

LBL IO_TEST2 'name program IO_TEST2

CALL ON_IN, IO 22=1 'call sub ON_IN when I/O 22 is active

MOVR 51200 'index to relative position 51200

HOLD 2 'suspend program until motion completes

IO 21 = 1 'set I/O line 21 active

DELAY 2000 'wait 2 seconds

IO 21 = 0 'set I/O line 21 inactive

BR IO_TEST2 'loop to beginning of program

LBL ON_IN 'declare sub ON_IN

MOVR -25700 'index 25,700 in neg. direction

HOLD 2 'suspend program until motion completes

IO 21 = 1 'set I/O line 21 active

DELAY 500 'wait 0.5 seconds

IO 21 = 0 'set I/O line 21 inactive

BR ON_IN, IO 22=1 'loop to ON_IN while I/O line 22 is active

RET 'return from subroutine

END

PGM

Download the program to your MicroLYNX. Test its operation by entering“EXEC 200” or “IO_TEST2” in the terminal window. The motor and LEDshould operate as it did in the previous example, however, when you depress andhold the switch, the motor will move half a revolution in the opposite directionand only delay 0.5 seconds between moves. This should repeat as long as theswitch is held. When released the MicroLYNX should return to the main programand execute it until either the switch is depressed again or the escape key is struck.

Page 32: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

30

The IO Var iab le

After configuring the I/O by means of the IOS variable, weneed to be able to do two things with the I/O.

1] Write to an output, or group of outputs,thus setting or changing its (their) state.

2] Read the states of either inputs or outputs.We can use this information to eitherdisplay those states to our terminal, or to set up conditionsfor branches and subroutine calls within a program.

In the example program in IOS Exercise #4 we used both of these methods ofusing the IO variable. First we used it to write to the state of I/O line 21,which was set up as a general purpose output. Second, we used it to read thestate of I/O line 22, which was set up as a general purpose input, to call up asubroutine within our program.

We can also use this command to write or read the state of an entire I/Ogroup.

R e a d / W r i t e a S i n g l e I / O L i n e

To read the state of a single input or output, the following would be typed intothe terminal:

PRINT IO 21

The response from this would be 1 or 0, depending on the state of the line.

The state of an input or output in a program can be used to direct events within aMicroLYNX program by either calling up a subroutine using the “CALL”instruction, or conditionally branching to another program address using the“BR” instruction. This would be done in the following fashion:

CALL MYSUB, IO 22=1

This would call up a subroutine labled “MYSUB” when I/O line 21 is active.

BR 200, IO 22=0

This would branch to address 200 when I/O line 22 is inactive.

Writing to an output is accomplished by entering the following into a terminal orprogram:

IO 21=1

IO 21=0

This would change the state of I/O line 21.

R e a d / W r i t e a n I / O G r o u p

When using the IO variable to read the state of a group of inputs/outputs orwrite to a group of outputs, you would first want to configure the entire I/Ogroup to be general purpose inputs or outputs using the IOS variable. In this casethe response or input won’t be a logic state of 1 or 0, but rather the decimalequivalent (0 to 63) of the 6 bit binary number represented by the entire group.

You can only use the IOvariable to write to

general purpose outputs!If you attempt to writeto a dedicated output

type, or any input, an error will occur!

Page 33: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

31

When using the IO variable on a single line, use the logicstate, either 0 or 1. When

using it on an entire group, usethe decimal equivalent, or

0 to 63 of the 6 bit numberrepresented by the group!

When addressing the I/O as a group, the LSB (Least Significant Bit) will beline 1 of the group (e.g. 21, 31, 41, 51). The MSB (Most Significant Bit) will be

line 6 of the group (e.g. 26, 36, 46, 56).

This first exercisewill illustrate settingthe I/O as a groupusing outputs. In thesecond exercise ashort program is

used to set the I/Ogroup up as a binarycounter.

To perform theseexercises you will needsix (6) LED’s withcurrent limiting resis-

tors and a 9 volt battery or equiva-lent +5 to +24VDC power supply.It is possible to perform theseexercises without connectinganything to the I/O, however, theLED’s clearly show how the I/O isbeing utilized as a group.

I O V a r i a b l e E x e r c i s e # 1

Setup your I/O group in accordance with thefigure 8.6. The pull-up switches on theMicroLYNX should be ON.

The table on the left shows the bit weight ofeach I/O line in the group. It also illustrates theLED’s and their state that should appear whenentering the IO variables in this exercise.

Configure the IOS variable such that group 20 isall general purpose outputs, active low or:

IOS 20 = 0,1,0

Enter the following in the terminal:

IO 20 = 35

As shown in the table, I/O lines 26, 22 and 21should be illuminated and 25, 24 and 23 shouldbe off.

Enter this next:

IO 20 = 7

Now I/O 21, 22 and 23 should be illuminated.

IO 20 = 49

I/O 26, 25, and 21 are illuminated.

+9V

Battery

V P ULL

I/O 21

I/O 22

I/O 23

I/O 24

I/O 25

I/O 26

I/O G ND

Figure 8.6: IO Variable Exercise Setup

1 1 10 0 0

BINA RY STATE O F I/O G R O UP 20IO 20 = 35

I/O 21LS B

I/O 26M SB

I/O 22I/O 23I/O 24I/O 25

32 2 116 8 4

BIT W E IG H T DIS TR IBU TIO N TAB LEFO R G R OUP 20 I/O

I/O 21LS B

I/O 26M SB

I/O 22I/O 23I/O 24I/O 25

0 1 10 0 1

BINA RY STATE O F I/O G R O UP 20IO 20 = 7

I/O 21LS B

I/O 26M SB

I/O 22I/O 23I/O 24I/O 25

1 0 11 0 0

BINA RY STATE O F I/O G R O UP 20IO 20 = 49

I/O 21LS B

I/O 26M SB

I/O 22I/O 23I/O 24I/O 25

Table 8.1: Binary State of Outputs

Page 34: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

32

In each case you can calculate the decimal equivalent by adding the weights ofthe bits that are set in the I/O group.

Reading the state of inputs will work the very same way. In a real-world exampleyou may not be using LED’s, but rather outputing to, or receiving input from,PLC inputs or outputs for process control applications. In this case, in yourMicroLYNX program, you may want to call up various subroutines when theI/O group is at a certain state. This gives you the power of programming up to63 events in your process controlled by the standard I/O group on theMicroLYNX.

I O V a r i a b l e E x e r c i s e # 2

In this exercise we will use a short program that will use I/O group 20 as abinary counter. The program will display the decimal equivalent of the binarycount on the screen. It will also move the motor a short distance and wait 0.25seconds in between counts.

Type the following into the text editor window and save. Download toMicroLYNX.IOS 20 = 0,1,0 'set I/O group 20 = gen. purp. outputs, active low

IO 20 = 0 'set the state of I/O group 20 to 0

PGM 200 'start program at address 200

LBL IO_CNT 'name the program "IO_CNT"

VI=100000 'set the init. velocity = 100,000 munits/sec.

IO 20=IO 20+1 'add 1 to the value of I/O group 20

MOVR 10000 'move relative 10000 munits

HOLD 2 'suspend program until motion completes

DELAY 250 'wait 0.25 seconds

PRINT "\rThe decimal state of I/O Group 20 is: " IO 20;

BR IO_CNT, IO 20=<63 'loop to IO_CNT while I/O 20 is lss that 63

PRINT "\nALL DONE!" 'line feed to next line print ALL DONE

END

PGM

EXEC IO_CNT to run the program. The LED’s will cycle and the number willcount up on the terminal screen.

Sett ing the D ig i ta l F i l ter ing for the I/O ( IOF )

User-definable digital filteringmakes the MicroLYNX wellsuited for noisy industrialenvironments. The IOF variableallows the user to software selectfilter settings ranging from 215Hz to 27.5 kHz.

The IOF variable has 1 param-eter with a range of 1 to 7.These are shown in table 8.2.

O/IdetalosIesopruPlareneGehtrofsgnitteSretliFFOI)7-0=>mun<(>mun<=FOI

gnitteSretliFffotuC

ycneuqerFesluPelbatceteDmuminiM

htdiW

0 zHk5.72 sdnocesorcim81

1 zHk7.31 sdnocesorcim63

2 zHk98.6 sdnocesorcim37

3 zHk44.3 sdnocesorcim541

4 zHk27.1 sdnocesorcim092

5 zH068 sdnocesorcim185

6 zH034 sdnocesillim261.1

)tluafed(7 zH512 sdnocesillim323.2

Table 8.2: IOF Settings

Page 35: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

33

Expanding The MicroLYNX

MicroLYNX Expans ion Modu les

Add i t i ona l I so la ted D ig i ta l I/O

The Isolated Digital I/O can be expanded an additional 3 groups (30 - 50) for atotal of 24 programmable I/O lines.

These expansion boards can go in any available slot. The group number will bedetermined by whichever slot they are plugged into: slot 1 will be group 30, slot 2will be group 40, and slot 3 will be group 50.

These expansion boards will be configured and used in the same manner as the I/Obank that is standard on the MicroLYNX.

The IMS Part # for this item is MX-DI100-000 (Terminal Block) or MX-DI200-000 (10 Pin Header).

H i g h - S p e e d D i f f e r e n t i a l I / O M o d u l e

If closed loop motion control, ratio functions such as following or electronicgearing or the ability to sequentially control a second axis is required, up to twoHigh-Speed Differential I/O Modules can be installed in slots 2 and 3, givingthree channels of high-speed differential (or single) I/O apiece. The IMS Part #for this item is MX-DD100-000 (Terminal Block) or MX-DD200-000 (PinHeader).

Ana log Input/Joyst i ck Modu le

The Analog Input/Joystick Module features two 12 bit, 0 to 5 volt input chan-nels which can be used to monitor devices such as temperature and pressuresensors. It can also be used to control an axis with a joystick. It features twovoltage outputs: a 5 volt joystick reference, and a precision 4.096 volt calibrationreference. This device can be installed in any available slot.

The IMS Part # for this item is MX-AJ100-000 (TerminalBlock) or MX-AJ200-000 (Pin Header).

Choos ing the Expans ion Modu lesfor Your App l i cat ion

A powerful feature of the MicroLYNX is the versatilityoffered by its wide range of configurations available throughthe expansion modules.

The expansion modules listed above may be used singly or incombination to customize your MicroLYNX System to thespecific requirements of your application. The table on thefollowing page lists a collection of possible application re-quirements and their suggested MicroLYNX configurations.

9

The MicroLYNX Expansion Modules can be used singly or in combination to custom-fitthe MicroLYNX System to

your specific application needs !

Page 36: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

34

noitarugifnoCtolSnoisnapxEXNYLorciM

noitacilppAtnemeriuqeR

O/IlatigiDdetalosI laitnereffiDdeepShgiH golanAkcitsyoJ/tupnI

noisnapxEtolS

lanoitiddA6O/IdetalosI

X 1TOLS

2TOLS

3TOLS

lanoitiddA21O/IdetalosI

X 1TOLS

X 2TOLS

3TOLS

lanoitiddA81O/IdetalosI

X 1TOLS

X 2TOLS

X 3TOLS

kcabdeeFredocnE

1TOLS

X 2TOLS

3TOLS

kcabdeeFredocnEkcolCyradnoceS+

nIrotuO

1TOLS

X 2TOLS

X 3TOLS

lanoitiddA6+O/IdetalosI

kcabdeeFredocnE

X 1TOLS

X 2TOLS

3TOLS

lanoitiddA21O/IdetalosI

kcolCyradnoceS+nIrotuO

X 1TOLS

X 2TOLS

X 3TOLS

rotupnIgolanAlortnoCkcitsyoJ

1TOLS

2TOLS

X 3TOLS

lanoitiddA6+O/IdetalosI

rotupnIgolanAlortnoCkcitsyoJ

X 1TOLS

2TOLS

X 3TOLS

lanoitiddA21+O/IdetalosI

rotupnIgolanAlortnoCkcitsyoJ

X 1TOLS

X 2TOLS

X 3TOLS

rotupnIgolanA+lortnoCkcitsyoJkcabdeeFredocnE

1TOLS

X 2TOLS

X 3TOLS

lanoitiddA6+O/IdetalosI

rotupnIgolanA+lortnoCkcitsyoJkcabdeeFredocnE

X 1TOLS

X 2TOLS

X 3TOLS

Table 9.1: MicroLYNX Expansion Module Configurations

Page 37: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

35

Expand ing the I so la ted D ig i ta l I/O

The Isolated Digital I/O can be expanded to 24 lines. Expansion to this levelwould require the use of all three slots. The I/O groups are slot dependent. Theslots will yield the following groups as numbered:

Slot 1 ......................................................... Group 30

Slot 2 ......................................................... Group 40

Slot 3 ......................................................... Group 50

I n s t a l l i n g T h e I s o l a t e d D i g i t a l I / O M o d u l e

To install the Isolated Digital I/O Expansion Module in your MicroLYNX,perform the following in accordance with Figure 9.1.

1] Remove screws (A).

2] Remove panel from slot to be used.

3] Insert Isolated Digital I/O Module into Slot 1 (C), Slot 2 (D)or Slot 3 (E).

4] Press firmly until expansion board is securely seated andlocked into place by retaining clips (F).

5] Reassemble MicroLYNX case in accordance with Figure 9.1.

6] Affix labels as shown. Use a highlighter or marker pen tohighlight slot(s) used.

#niP

noitpOrotcennoC

xineohPnoitisoP8 redaeHniP01

1tolS 2tolS 3tolS 1tolS 2tolS 3tolS

1 V pullup V pullup V pullup 13OI 14OI 15OI

2 13OI 14OI 15OI 23OI 24OI 25OI

3 23OI 24OI 25OI V pullup V pullup V pullup

4 33OI 34OI 35OI 33OI 34OI 35OI

5 43OI 44OI 45OI .C.N .C.N .C.N

6 53OI 54OI 55OI 43OI 44OI 45OI

7 63OI 64OI 65OI .C.N .C.N .C.N

8 DNGO/I DNGO/I DNGO/I 53OI 54OI 55OI

9 DNGO/I DNGO/I DNGO/I

01 63OI 64OI 65OI

Table 9.2: Isolated Digital I/O Group and Line Locations by Connector Option and Slot

Page 38: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

36

U s i n g t h e I s o l a t e d D i g i t a l I / O

The isolated digital expansion I/O operates in the very samemanner as the standard isolated I/O. The only differences arethe location of the pull-up switches, and the method of supply-ing an external pull-up voltage.

The pull-up switches are located on the bottom of the expansion board. Theyoperate in the same fashion as the standard I/O set pull-ups. Configuring and usingthese switches is detailed in Section 8 of this document.

Another key difference is the method by which an external pull-up voltage is

Figure 9.1: Installing the Isolated Digital I/O Expansion Module

Tightening TorqueSpecification For [A]:

4 to 5 lb-in(0.45 to 0.56 N-m)

The I/O ground is commonwhen the Isolated I/O

module’s installed. VPULL,however, is not common.

If you want to supplyan external pull-up supply to multiple modules VPULLmust be connected to your

supply on each module!

Figure 9.2: The Isolated Digital I/O Module, Bottom View

Page 39: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

37

supplied to the I/O. While the I/O Ground is common to each Isolated DigitalI/O Module installed (both the Differential I/O Module and the Analog InputModule have separate, non-isolated grounds) V-PULLUP is NOT common.This allows you to power each I/O group independently if you choose.

The expansion isolated digital I/O is configured and controlled by the IOS variableand the IO instructions in the same manner as the standard I/O set. The onlydifference is in how the lines and groups are addressed. See Section 8 for instruc-tions on using the isolated I/O.

If digital filtering is used (IOF variable) it must be configured for eachgroup separately.

The H igh -Speed D i f ferent ia l I/O Modu le

The MicroLYNX has the capability ofhaving up to two High-Speed DifferentialI/O Modules installed in expansion slotnumbers 2 and 3. The High-Speed Differen-tial I/O Module expands the capabilities ofthe MicroLYNX to include applicationfeatures such as:

1] Closed Loop Motion Control(Encoder Feedback).

2] Electronic Gearing (Ratio Functions).

3] Secondary Clock Output.

4] General Purpose High-Speed I/O.

lacirtcelEdraoBnoisnapxEO/IlaitnereffiDdeepS-hgiHscitsiretcarahC

noitacificepS

ycneuqerFkcolC.xaM zHM5

gniretliFtupnIlatigiD zHM5otzHk93

rewoPredocnE tuptuOCDV5+

)denibmoCstuptuOllA(timiLtnerruC Am051

noitisoPtolS 3ro2

seludoMelbasU#.xaM 2

Table 9.3: Electrical Characteristics

Figure 9.3: Powering Multiple Isolated Digital I/O Modules

Page 40: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

38

#niP

noitpOrotcennoC

xineohPnoitisoP8 redaeHniP01

2tolS 3tolS 2tolS 3tolS

1 )-(71O/I )-(81O/I .C.N .C.N

2 DNG DNG CDV5+ CDV5+

3 CDV5+ CDV5+ DNG DNG

4 )-(41O/I )-(61O/I )-(41O/I )-(61O/I

5 )+(31O/I )+(51O/I )-(31O/I )-(51O/I

6 )+(41O/I )+(61O/I )+(31O/I )+(51O/I

7 )+(71O/I )+(81O/I )-(41O/I )-(61O/I

8 )-(31O/I )-(51O/I )+(41O/I )+(61O/I

9 )-(71O/I )-(81O/I

01 )+(71O/I )+(81O/I

Table 9.4: High-Speed Differential I/O Expansion Pinout by Connector Style and Slot

The pinout by slot location and connector style is given in Table 9.4.

The high-speed differential I/O is non-isolated, meaning the ground is notcommon with the isolated I/O ground.

I n s t a l l i n g t h e H i g h - S p e e d D i f f e r e n t i a l I / O M o d u l e

To install the High-Speed Differential I/O Expansion Module in yourMicroLYNX perform the following in accordance with Figure 9.4.

Figure 9.4: Installing the High-Speed Differential I/O Expansion Module

Tightening TorqueSpecification For [A]:

4 to 5 lb-in(0.45 to 0.56 N-m)

Page 41: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

39

skcolCruoFehT

#kcolC riaPeniLO/I noitisoPtolS retnuoC noitcnuF

1 21&11 enoN 1RTC

.kcolcnoitomdetarenegyllanretnisikcolcsihTotlortnoclanoitceriddnakcolcpetssedivorptI

elbaliavatonsikcolcsihT.noitcesrevirdeht.rotcennoclanretxeynano

2 41&31 2tolS 2RTC

yB.tuptuorotupninasaderugifnocebyaM.tupnierutardauqasaderugifnocsisihttluafed

kcolcyradnocesasaderugifnocebnactI.1KLCotderaegyllacinortceletuptuo

3 61&51 3tolS 3RTC

yB.tuptuorotupninasaderugifnocebyaM.tupnierutardauqasaderugifnocsisihttluafed

tuptuokcolcyraitretasaderugifnocebnactI.1KLCotderaegyllacinortcele

4

71 2tolS enoNnarotupnideepshgihasaderugifnocebyaM

ecnereferzHM1asitituptuonasA.tuptuo.kcolc

81 3tolS enoNrotupnideepshgihasaderugifnocebyaMecnereferzHM01asitituptuonasA.tuptuo

.kcolc

Table 9.5: The Four Clocks and Their Default Line Placement

1] Remove screws (A).

2] Remove panel from slot to be used (either Slot #2 or Slot #3).

3] Insert High-Speed Differential I/O Module into Slot 2 (C) orSlot 3 (D).

4] Press firmly until expansion board is securely seated and lockedinto place by retaining clips (F).

5] Reassemble MicroLYNX case in accordance with Figure 9.1.

6] Affix labels as shown. Use a highlighter or marker pen tohighlight slot(s) used.

The Four C locks Exp la ined

The MicroLYNX has four clock pairs that are used by the high-speed I/O. One ofthese, clock pair 11 and 12, is fixed as an output and is used internally to providestep clock and direction pulses to the driver section of the MicroLYNX. The stepclock output increments CTR1 (Counter 1). The user has no physical access to thisclock, however, CTR1 may be read from or written to by software instructions ineither program or immediate mode. The following table explains the clocks, aswell as their default I/O line pair placement:

C l o c k T y p e s D e f i n e d

There are three basic types of clocks that may be configured for the MicroLYNX,they are:

1] Quadrature

2] Step/Direction

3] Up/Down

These clock functions are illustrated in figure 9.5.

Page 42: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

40

Q u a d r a t u r e

The quadrature clock function is the mostcommonly used input clock function. This isthe default setting for each high-speed I/Ochannel except 11 & 12. This clock functionwill typically be used for closed loop control(encoder feedback) or for following applica-tions

S t e p / D i r e c t i o n

The step/direction clock funtion would typi-cally be used in an application where a second-ary or tertiary clock output is required tosequentially control an additional axis.

U p / D o w n

The up/down clock type would typically beused as an output function where a secondaryaxis is being driven by a stepper or servo drivewith dual-clock direction control circuitry.

C o n f i g u r i n g t h e D i f f e r e n t i a l I / O - T h e I O S V a r i a b l e

The high-speed differential I/O is configured by means of the IOS variable, andis used in the the same fashion in which the isolated I/O is configured. The maindifference lies in that there are three additional parameters which need to be setin configuring the triggering, clock type and ratio mode setting.

It is important to note that the high-speed differential I/O lines may be used forthe same input or output functions as the isolated digital I/O where the higherspeed capabilities of the differential I/O is required. However, for purposes ofthis example we will only illustrate the clock functions associated with the high-

Step C lock

Direction

Channel A

Channel B

CW

CC W

S tep C lock/D irec tion

Q uad ratu re

U p /D ow n

Figure 9.5: Clock Functions

Figure 9.6: IOS Variable Settings for the High-Speed Differential I/O

IO S = , , , , , X XX X X XX X

Enter the Channel # (13-18) here!

Ente r I/O Line Type # H ere

1 = C loc k 1 A2 = 3 = 4 = 5 = 6 = 7 = 8 =

C lo c k 1BC lo c k 2AC lo c k 2BC lo c k 3AC lo c k 3BC lo c k 4AC lo c k 4B

D e fine L in e o r G rou pA s In pu t o r O u tpu t

0 = In pu t1 = O u tp u t

D e fine th e C lo c k Ty p e

0 = N o t A C lo c k 1 = Q ua d ratu re 2 = S tep /D ire c tio n 3 = U p /D ow n

S et th e s ta te o f the L in e o r G rou p

0 = A c tiv e L ow1 = A c tiv e H igh

S et th e R a tio M o d e 0 = N o R at io 1 = R a tio

S et th e Tr igg er ing0 = L ev e l1 = E d ge

N O TE : The C lock # s a refix ed to the irass ociated I/Och an nel an d cann ot be ch an ged! The yare entered forsak e o f co nsistencyonly!

Page 43: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

41

The clock numbers are tieddirectly to their associatedI/O channel and cannot be

re-configured! For example, Clock 3A will ALWAYS be

on channel 15. The onlychange that can be made to

the first IOS parameterfor the high-speed I/Ois if you want to use it

for a general purpose ordedicated function, or linetypes 0 and 9 through 25!

speed differential I/O. Figure 9.6 illustrates the IOS variable settings for thehigh speed differential I/O.

C o n f i g u r i n g t h e H i g h - S p e e d I / O t o a N o n - C l o c kF u n c t i o n

Configuring the high-speed I/O to clock functions will be covered in depth inthe following subsections on configuring encoder and ratio functions.Here we will briefly discuss using the high-speed I/O as a generalpurpose or dedicated I/O function.

Care must be taken when configuring the high-speed I/O to ageneral purpose or dedicated function as the output current sink is150mA for the entire I/O group 10.

The IOS variable will be configured for the high-speed I/O in thesame fashion as it is set for the isolated I/O.

For detailed usage example see Section 12, Sample Applications:Registration.

Connect ing and Con f igur ing an Encoder

The high-speed differential I/O module may be used for closed loopmotion control by receiving quadrature input from a differential or single endedencoder.

High-Speed I/O channels 13 and 14 are configured by default for this function, soyou would want your expansion module inserted into expansion slot #2.

Connect your encoder as shown in the following figure and table.

MICROTM

M icroLY N X

12

3

G N D+ 5V D CC h an nel B -C h an nel A+C h an nel B+

C h an nel A -

D ifferentialE ncode r

S tepping M otor

Connection S how ing 8 P os itionP hoenix Term ina l

Connection S how ing 10 P in Heade r

G N DG N D+ 5V D C+ 5V D C

C h an nel B -14 -C h an nel A+13 +

C h an nel B+14 +

C h an nel A -13 -

Figure 9.7: Differential Encoder Connection

Page 44: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

42

2#tolSnoisnapxE-snoitcennoCredocnE

langiSredocnE XNYLorciM

laitnereffiD elgniS lennahCO/I xinoehPnoitisoP8 *redaeHniP01

+AlennahC AlennahC +31 5 6

-AlennahC -31 8 5

+BlennahC BlennahC +41 6 8

-BlennahC -41 4 7ro4

+xednI xednI +71 7 01

-xednI -71 1 9

CDV5+ CDV5+ 3 2

DNG DNG 2 3

siredocneruoyfisuhT.noitarugifnocnipdrakcaPttelweHehtwollofredocnelaitnereffidSMI:ETONelbacnobbirNIDelamefhtiwelbacnobbir"deriwhguorhtthgiarts"rotcudnoc01aSMIroPHybderutcafunam

redaeHniP01(draobnoisnapxeehtdnaredocnelaitnereffidehtneewtebyltceriddetcennocebnacsrotcennoc.noitacifidomgniriwtuohtiw)noisreV

Table 9.5: Expansion Slot 2 Encoder Connections

T e s t i n g Y o u r E n c o d e r S e t u p

Now that your encoder is connected, let’s test the setup and verifyits operation by typing the following into your terminal:‘set munits to correspond with MSEL=256

MUNIT=51200

‘set the encoder units variable EUNIT to the number = 4 x‘encoder resolution, ie 500 line encoder x 4 = 2000,‘200 line encoder x 4 = 800 etc.

EUNIT=2000

‘Set the stall factor variable to 10% of EUNIT (10% of a‘revolution

STLF=200

‘Enable encoder functions

EE=1

POS=0 ‘set position counter to 0

CTR2=0 ‘set counter 2 to 0

SAVE ‘save the aforementioned settings.

Test the encoder setup by entering the following into your terminal:

MOVR 10 ‘the motor moves 10 revolutions (we hope)

PRINT POS ‘we read the POS variable, it should say “10.000”

PRINT CTR2 ‘we read CTR2, it should read 10 X EUNIT, or 20000

I n t r o d u c i n g T h e E U N I T ( E n c o d e r U N I T S ) V a r i a b l e

During open loop operation, the MicroLYNX takes the number of clock pulsesregistered on CTR1, scales that number using the MUNIT variable and then writesthe result to the position variable POS.

For closed loop operation, where the encoder functions are enabled (EE=1), theMicroLYNX takes the number of clock pulses registered on CTR2, scales them by

The +5VDC output ofthe High-Speed I/O isnot designed to powerexternal devices other

than an encoder!

Page 45: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

43

In Open Loop applications, position is maintained by CTR1

and user units are definedby the MUNIT Variable. In

Closed Loop applications,position is maintained byCTR2, and user units are defined by the EUNIT

Variable! Note that whenusing EUNIT’s, both the

MUNIT variable AND theEUNIT Variable MUST be

set to the same scalingfactor!

the EUNIT variable and stores them to the POS counter.

The EUNIT variable must be scaled to the same factor as the MUNIT variable.For example, if you were scaling your system to operate in degrees, theMUNIT/EUNIT relationship would be expressed thus:

MUNIT=51200/360

EUNIT=2000/360

(This assumes MSEL=256 and a 500 line encoder.)

With this configuration if you performed the following absolute move:

MOVA 270

the axis would turn 270°. Thus when you enter:

PRINT POS

the terminal will display “270.00”.

The program that follows will illustrate encoder feedback by making aseries of moves while displaying both the raw counts from CTR2 andthe scaled POS value.

Enter the program below in the text editor window.'******PARAMETERS*******

MUNIT=51200 'motor units = 1/256 resolution

EUNIT=2000 '500 line encoder quad input

EE=1 'enable encoder functions

STLF=200 'stall factor 10% of 1 rev.

STLDE=1 'enable stall detection

STLDM=0 'stop motion if stall is detected

MAC=75 'accel. current to 75%

MRC=50 'run current to 50%

MHC=25 'hold current to 25%

'******PROGRAM********

PGM 200

CTR2=0

POS=0

MOVR 1

HOLD 2

DELAY 250

PRINT "\rEncoder Count= ", CTR2, " Position Count= ", POS,"\e[K";

MOVR 10

HOLD 2

DELAY 250

PRINT "\rEncoder Count= ", CTR2, " Position Count= ", POS,"\e[K";

MOVR -11

HOLD 2

DELAY 250

PRINT "\rEncoder Count= ", CTR2, " Position Count= ", POS,"\e[K";

BR 200

END

PGM

Execute the program by entering “EXEC 200” into the terminal.

Page 46: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

44

Fo l l ow ing an Externa l C lock (E lectron ic Gear ing )

The High-Speed Differential I/O Module allows you to configure theMicroLYNX’s primary axis to follow an external clock input.The hardware connection (Figure 9.8) is almost identical to thatshown for closed loop control, only in this instance instead ofusing a quadrature clock input for position monitoring andmaintenance, we will use the encoder input to control theprimary axis.

Using this type of application introduces the HAE (Half AxisEnable) flag and the HAS (Half Axis Scaling) variable. In halfaxis mode the master clock is taken from the CLK2, CLK3 orCLK4 (I/O channels 13 & 14, 15 & 16 or 17 & 18), which havethe IOS variable configured as inputs, a clock type, and ratiomode enabled. The primary axis will move as a ratio of thisclock based upon the factor entered in the HAS variable.

H A E H a l f A x i s E n a b l e / D i s a b l e F l a g

This flag (1) enables and (0) disables half axis scaling mode. The default conditionis (0) disabled. The HAE flag must be enabled for this mode to function.

H A S H a l f A x i s S c a l i n g V a r i a b l e

The half axis scaling variable is the factor by which the Follower Input: PrimaryAxis ratio is scaled. The range of the factor is >-1 to <1. For example, a settingof HAS=.5 will output 1 pulse on the primary axis for every 2 pulses input to thefollower input or a 2:1 ratio, HAS=.2 will be 5:1, HAS=.999 will be .999:1 andso on. The default HAS value is 0.000, thus some factor must be entered to makethis function.

C o n f i g u r i n g t h e I / O f o r H a l f A x i s M o d e

The parameter setup to make this configuration follows. This assumes a High-Speed Differential I/O Expansion Module installed in slot 2. If your module isinstalled in slot 3, use I/O channels 15 and 16 (IOS 15=5,0,1,0,1,1 and IOS16=6,0,1,0,1,1) instead. The raw count of clock pulses will register to CTR3. I/Ochannels 17 and 18 can be used for this also, only there is no registration of clockpulses:IOS 13=3,0,1,0,1,1 ‘I/O 13 quad. input, ratio mode

IOS 14=4,0,1,0,1,1 ‘I/O 14 quad. input, ratio mode

HAE=1 ‘Enable half-axis scaling mode

HAS=.5 ‘Half-axis scaling variable to .5 (1 output‘pulse on the pri. axis for 2 input pulses)

With this configuration, one (1) step clock pulse will output to the primary axisfor every two (2) input clock pulses.

By reading the value of CTR2 and CTR1 you can see the ratio of the pulses.

Try different HAS variable, motor resolution and MUNIT settings to see howthe primary axis is effected by different settings.

For an excellent application example where half axis mode

is utilized see Section 12: SampleApplications, Traverse!

Page 47: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

45

MICROTM

M icroLY N X

12

3

G N D+ 5V D CC h an nel B -C h an nel A+C h an nel B+

C h an nel A -

D ifferentialE ncode r

S tepping M otor

Connection S how ing 8 P os itionPhoenix Term ina l

Connection S how ing 10 P in Heade r

G N DG N D+ 5V D C+ 5V D C

C h an nel B -14 -C h an nel A+13 +

C h an nel B+14 +

C h an nel A -13 -

Param eter SetupIO S 13=3 ,0 ,1 ,0 ,1,1IO S 14=4 ,0 ,1 ,0 ,1,1H AE = 1H AS = .5

Figure 9.8: Differential I/O Connections for Following an External Input

The Ana log Input/Joyst i ck Modu le

The Analog Input/JoystickModule adds two 0 to 5volt analog input channelsto the MicroLYNX System.Both channels can be usedfor data aquisition, or eitherchannel can be used todirectly control motion.This offers the user thecapability of receivinginput from a variety ofanalog sources such astemperature or pressuresensors, and then control-ling events based uponthose inputs.

The user-selected Joystickchannel can be pro-grammed to set the range,zero, deadband and sensi-tivity.

Each channel uses a 12 bitD/A converter for better resolution as well as a fixed single pole analog filterwith a cutoff frequency of 658 Hz to reduce the electrical noise that can be

snoitacificepSeludoMkcitsyoJ/tupnIgolanA

noitacificepS

egnaRegatloVtupnIgolanA stlov5+ot0

noituloseR stiB21

tesffO BSL3±

rorrEytiraeniLlargetnI BSL2±

rorrEytiraeniLlaitnereffiD BSL4/3±

stupnItaegatloVmumixaMetulosbA stlov42±

egatloVecnerefeRkcitsyoJ stlov5+

ecnerefeRnoitarbilaCnoisicerPegatloV

stlov690.4+%2.0±

ecnareloTegatloVecnerefeRnoitarbilaC %2±

.qerFffotuCretliFtupnIgolanA zH856

noitisoPtolS 3ro2,1

elbasU#mumixaM 1

Table 9.6: Analog Input Module Specifications

Page 48: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

46

present in industrial environments.

The Analog Input/Joystick Module can be installed in any free slot, howeveronly one (1) module can be used per MicroLYNX.

I n s t a l l i n g t h e A n a l o g I n p u t / J o y s t i c k M o d u l e

To install the Analog Input/Joystick Expansion Module in your MicroLYNX,perform the following in accordance with Figure 9.9 .

1] Remove Screws (A).

2] Remove panel from slot to be used.

#niP

noitpOrotcennoC

xineohPnoitisoP8 redaeHniP01

1 )ecnerefeRkcitsyoJ(V5+ )ecnerefeRkcitsyoJ(V5+

2 1NIA DNG

3 DNG 1NIA

4 )ecnerefeRkcitsyoJ(V5+ )ecnerefeRkcitsyoJ(V5+

5 2NIA DNG

6 DNG 2NIA

7 )ecnerefeR.bilaC(V690.4 )ecnerefeR.bilaC(V690.4

8 DNG DNG

9 DNG

01 .C.N

Table 9.7: Analog Input/Joystick Module Pin Configuration

Figure 9.9: Installing the Analog Input/Joystick Module

Tightening TorqueSpecification For [A]:

4 to 5 lb-in(0.45 to 0.56 N-m)

Page 49: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

47

3] Insert Analog Input/Joystick Module into Slot 1 (C), Slot 2(D) or Slot 3 (E).

4] Press firmly until expansion board is securely seated andlocked into place by retaining clips (F).

5] Reassemble MicroLYNX case in accordance with Figure9.9.

6] Affix labels as shown. Use a highlighter or marker pen tohighlight slot used.

T h e A D S V a r i a b l e ( A t o D S e t u p )

The ADS variable is the heart of the MicroLYNX Analog Input/JoystickInterface Module. There are three parameters that control how the module willrespond to input. It is used as follows:

ADS <chan>=<aunit>,<mode>,<law>

<chan>: Is the analog input channel that will be used, either 1 or 2.

<aunit>: This parameter sets the relationship between the analog input andunits that are convenient to the user. In analog (User) mode the aunits param-eter is the number of user units corresponding to the Analog Module full scale.In Joystick (Velocity) mode the aunits parameter is the number of munits/second corresponding to the Joystick Full Scale (JSFS) parameter.

<mode>: The mode parameter controls whether or not the input is used forvelocity control; 1 = analog input, 2 = velocity or joystick mode.

<law>: Controls the sensitivity of the velocity with respect to the analoginput. The effect of the analog input can be linear, square or cube. <law>applies to velocity mode only.

Here are two examples that illustrate the ADS variable:

E x a m p l e 1

A pressure transducer is connected to input 1. The transducer output is 10 psi/volt. Vref represents the voltage at the Input to the Analog Joystick Modulecorresponding to full scale. Vref as measured at pin 1 on the Analog JoystickModule is 5.05 volts. Thus aunits for channel 1 is 10 psi/volt x 5.05 volts or50.5. The value returned by an analog read of Channel 1 will be in psi. Notethat the full scale output of the transducer does not have to equal the AnalogModule full scale. This setup would be expressed thus:

ADS 1=50.5, 1

E x a m p l e 2

A 1.8 degree (per full step) motor connected to a lead screw with a lead of .1inches/rev. The step motor drive is set for 32 usteps per full step. A joystick isconnected to channel 1. To program speed and motion in inches set munits to(32 pulses/1.8 degrees) x (360 degrees/1 rev ) x (1 rev/.1 inches). If a maximumspeed of 3 inches/second is desired while in Joystick operation set aunits forchannel 1 to 3. For linear Joystick operation the setup command is ADS 1 =3,2,1

Page 50: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

48

P r o g r a m E x a m p l e s

There are three program exercises we will use to illustrate the use of the AnalogInput/Joystick Module. In each case a 1kΩ potentiometer is used to emulate asensor for analog input mode, and a joystick for velocity mode.

Use the connection configuration shown in figure 9.10 below, a joystick or asensor would be connected the same way.

E x e r c i s e 1 : V e l o c i t y ( J o y s t i c k ) M o d e

Here the potentiometer is emulating a joystick. Enter and execute the followingprogram. When the voltage on AIN 1 is roughly 100mV either side of 2.5 volts itwill be in the deadband range of the joystick. When less than 2.4 volts, the axiswill accelerate in the minus (-) direction. When more than 2.6 volts, it willaccelerate in the positive (+) direction. The velocity will increase as the voltagedecreases from 2.4 to 0, or increases from 2.6 to 5.0. This can be watched with amultimeter. In this exercise both the axis velocity and position will display to theterminal screen.

'****Parameters****

MSEL=256

MRC=100

MAC=100

MUNIT=51200

JSDB=100 ‘Joystick deadband =100 aunits

VM =10000 ‘max velocity 10,000 munits/sec

ADS 1=1000,2,1 ‘chan. 1,aunits=1000, joystick, linear law

JSE = 1 ‘enable joystick functions

'****Program****

PGM 1

PRINT "\e[2J"

LBL RUN

MICROT M

M icroLYN X

12

3

+ 5V R efe ren c e

EX

PA

NS

ION

BO

AR

DS

G N D

A IN 1

1k P o ten tio m ete r

Ω

M otor, Pow er an d C o m m u nicatio nsC o nn ection s n ot

sh ow n .

Figure 9.10: Analog Input Module Exercise Connection

Page 51: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

49

PRINT "\e[1;1HInput Channel = " , AIN

PRINT "Axis Velocity = " , VEL

PRINT "Axis Position = " , POS

BR RUN

END

PGM

E x e r c i s e 2 : S e n s o r I n p u t I

Here we pretend the potentiometer is a pressure transducer and use it to displaya pressure value to the screen.ADS 1=50.5,1 ‘set ADS to aunit=50.5,analog input mode

PGM 200

LBL PRNTPSI ‘name program “PRNTPSI”

PRINT "\e[2J" ‘ansi esc. to clear display

PRINT "Pressure = ", AIN 1 , " PSI"

BR PRNTPSI ‘loop to program beginning

END

PGM

E x e r c i s e 3 : S e n s o r I n p u t I I

Once again our potentiometer is pretending to be a sensor. In this exercise theprogram will call up a subroutine based upon the voltage seen on AIN 1 andposition the axis at an absolute position. The best analog to this exercise mightbe a flow control application.'****Parameters****

MUNIT=51200 ‘munits=51200

MAC=75 ‘acceleration current to 75%

MRC=50 ‘run current to 50%

ADS 1=5,1 ‘aunits 5, analog input mode

VAR LIMIT=0 ‘declare user var “LIMIT”

'****Program****

PGM 200

LBL AINTST ‘name program “AINTST”

LIMIT = AIN 1 ‘set user var “LIMIT” = AIN 1

CALL ATEST, LIMIT>3.5 ‘call ATEST if LIMIT is greater than 3.5 aunits

CALL BTEST, LIMIT<3.5 ‘call BTEST if LIMIT is less than 3.5 aunits

BR 200 ‘loop to beginning of program

END

'****Subroutines****

LBL ATEST ‘declare subroutine “ATEST”

VM=20 ‘max. velocity = 20 munits/sec.

MOVA 10 ‘index to abs. pos. 10

HOLD 2 ‘suspend prog. until motion completes

RET ‘return from subroutine

LBL BTEST ‘declare subroutine “BTEST”

VM=5 ‘max velocity = 5 munits/sec.

MOVA 22 ‘index to abs. pos. 22

HOLD 2 ‘suspend prog. until motion completes

RET ‘return from subroutine

Page 52: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

50

LYNX Software Components 10LYNX Sof tware Components

The LYNX instruction set has 4 basic components. These are:

1] Variables

2] Instructions

3] Flags

4] Keywords

This section will cover the most commonly used Variables, Instructions,Flags and Keywords. If your application requires more complex instructions,the full instruction set is detailed in Part 3 of the LYNX Product FamilyOperating Instructions on the CD. There is also a summary of the fullinstruction set in Appendix A of this document.

V a r i a b l e s

Variables are registers which allow you to assign a name to a numericvalue. They may be used in conjunction with the math functions tomanipulate the data contained in them. There are two typesof variables:

1] Factory-defined

2] User-defined

Factory

These variables are pre-defined at the factory and cannot bedeleted. When an IP (Initialize Parameters) instruction is given,these variables will be set to their factory default state. Thereare two types of factory defined variables: Read/Writable andRead Only.

U s e r

One of the powerful features of the LYNX instruction set is that it allowsthe user to define variables both inside a program (local) or outside a pro-gram (global). User-defined variables are deleted by means of the DVF(Delete Variables and Flags) instruction. Defining user variables will becovered in more depth in Section 11: LYNX Programming Conventions.

Common ly Used Var iab les

The following factory-defined variables constitute the most commonly usedin LYNX programs. A full listing of the factory-defined variables are avail-able in the instruction set summary in Appendix A of this document. In thecase where a variable has been covered in depth earlier in this document,

A Variable is a component ofthe LYNX instruction set thatallows you to store, read and

manipulate numeric data. Theycan also be used to effectevents inside a program!

Page 53: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

51

such as the current control variables, the I/O variables, etc, only a cursorymention will be made of them. Otherwise they will be covered in some depth.

Motor and Dr i ve

M U N I T [ M o t o r U n i t s V a r i a b l e ]

The MUNIT, or Motor Units variable is the conversion factor bywhich the user is able to scale motor steps into familiar units ofmeasurement. By using the MUNIT variable the user can writemotion instructions in inches, millimeters, degrees or whateverunit of measure applies to the user’s application. The examplegiven below illustrates how the MUNIT variable might be scaledto inches for a leadscrew with a 0.25” pitch.

Acce lerat ion , Dece lerat ion and Ve loc i t y

The following variables effect the acceleration, deceleration and velocity of thedriven axis. All of these are effected by the MUNIT variable. The relationshipbetween these variables is illustrated by figure 10.2.

A C C L [ A c c e l e r a t i o n V a r i a b l e ]

This variable specifies the acceleration of the axis in MUNITs per second squared.

To Read: PRINT ACCL

To Write: ACCL=75

The “MUNIT” or “motor unit” variable is a scaling factor

that allows you to scale motor steps to any measure of distance

such as inches, millimeters or degrees! “User Unit” is a

generic term referring to theunit of measure scaled to!

3 .3 16"

169779 .2M ic roste ps

O R

1.8 s te pping m oto rbe ing d riven by a

M icroLY N Xat 256 reso lutio n .

Leadscrew has 1 /4 p itch

36 0 /re v 1 .8 s te p s = 2 00 s te p s /re v

20 0 s te p s /rev X 25 6 m ic ros te ps /s te p = 5 1 ,2 0 0 m ic ro s tep s /re v

1 re vo lu tio n = 1 /4 (0 .25 ) o f m otio n .

To m o v e th e m oto r 1 w ou ld req u ire 4 re vo lu tion s , o r 2 04 ,80 0 m ic ros te ps

1 = 4 R evs or 204 ,800 m icros tepsS in ce 0 .25 X 4 is 1 .00

20 4,800/1 .00 = 204,80 0

Yo u w ould enterM U N IT =204 ,8 00

Th is w ou ld se t the sca ling facto r to inches in th is e xam p le

B y enterin g :

M O V R 3.316

The m otor w ou ld m ove 3 .136 inche s

M U N IT = 2 0480 0 = 4 R evolutions

Inch

Leadscrew M oto r D rive LY N X M U N IT SE TT IN G

Ste pR e vo lu tion

200 S teps 256 m ic rosteps X X

SETTINGTHE MUNIT VARIABLE

Figure 10.1: Setting the MUNIT Variable

Page 54: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

52

D E C L [ D e c e l e r a t i o n V a r i a b l e ]

This variable specifies the deceleration of the axis in MUNITs per second squared.

To Read: PRINT DECL

To Write: DECL=ACCL

V I [ I n i t i a l V e l o c i t y ]

This variable will specify the initial velocity of the axis in MUNITs per second.

To Read: PRINT VI

To Write: VI = 25

V M [ M a x i m u m V e l o c i t y ]

This variable specifies the maximum velocity that the axis will attain during amove in MUNITs per second.

To Read: PRINT VM

To Write: VM = 5

Pos i t i on

POS [ P o s i t i o n C o u n t e r ]

The POS variable is the register which contains the posi-tion of the axis in MUNITs (EUNITS in closed loop).

To Read: PRINT POS

To Write: POS=0

M a t h F u n c t i o n s

The MicroLYNX instruction set features twenty-four (24) mathematical andlogical functions which allow the user to manipulate variables inside or outside aprogram to control events.

The math functions are evaluated sequentially. Use one operation per line ofLYNX code.

Math functions can be usedto manipulate variables to

effect events inside or outsidea MicroLYNX program!

Keep math to one operationper line of LYNX code!

M ax Velocity(VM )

A cceleration(AC C L)

D ece le ra tion(D EC L)

In itia l Velocity (V I)Tim e

Figure 10.2: Motion Profile Showing the Basic Parameters

Page 55: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

53

For Example:

INCORRECT: FEEDRATE=CTR2*10-OFFSET

CORRECT: FEEDRATE=CTR2*10

FEEDRATE=FEEDRATE-OFFSET

I n s t r u c t i o n s

There are four basic groups of instructions. These are:

1] Utility Instructions.

2] Motion Instructions.

3] I/O Instructions.

4] Program Instructions.

Many of these instructions have multiple parameters defining how theMicroLYNX will interpret the instruction. The most common method ofusing the instruction is given here. For a concise explanation of theseparameters, see Appendix A: Instruction Set Summary. For detailed expla-nation see the Software Reference, Part 3 of the LYNX Product FamilyOperating Instructions.

U t i l i t y I n s t r u c t i o n s

These instructions allow the user to clear memory, delete user-defined variablesand flags, initialize the MicroLYNX, execute or save programs and other func-tions that are not usually used in a program.

C P [ C l e a r P r o g r a m M e m o r y ]

Program memory should be cleared each time a new or edited program is down-loaded to the MicroLYNX. While there are two parameters to this instruction, itis typically used in the following form:

CP 1,1

This instructs the MicroLYNX to clear memory from the first line of programmemory to the end. Other options allow the user to selectively clear programs.

D V F [ D e l e t e U s e r - D e f i n e d V a r i a b l e s a n d F l a g s ]

Deletes all user-defined variables and flags. This instruction has three parametersto allow selective deletion of user-defined variables and flags. Most commonusage:

DVF ,,1

This instructs the MicroLYNX to delete all user-defined variables and flags.

I P [ I n i t i a l i z e P a r a m e t e r s ]

This instruction uses the keywords ALL, VARS, FLAGS and IOS to selectivelyor completely restore factory-defined variables, flags and I/O lines to theirdefault state. If the IP instruction is not followed by a keyword, theMicroLYNX will initialize all factory-defined VARS/FLGS/IOS.

Page 56: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

54

L I S T [ L i s t S t o r e d P r o g r a m S p a c e ]

This instruction lists the contents of program memory. By using optional param-eters (i.e. LIST <lbl/addr>) it can selectively list the contents of memory. If noparameter is specified it will list all of program space.

S A V E [ S a v e ]

Save all user-defined variables with the current data, all programs, and all factory-defined VARS/FLGS/IOS to NVM.

P R I N T [ P r i n t ]

Used to output text and parameter values to the host PC. Text should be enclosedin quotation marks, parameters should not. There are also several control charac-ters which may be embedded in the text to control how the text is displayed.

Here are several examples along with comments.PRINT IOS ‘Print the state of all I/O lines

PRINT UVARS ‘Display the value of user-defined variables

PRINT ALL ‘Display the state of all VARS/FLGS/IOS

PRINT ACCL ‘Display the value of the acceleration variable

‘Display the text “Axis at position:” and the value of the POS counter‘embed a line feed with no carriage return

PRINT "\nAxis at position: " ,POS;

The PRINT instruction is the most often used instruction, and is often usedextensively in programs.

P G M [ E n t e r / L e a v e P r o g r a m M o d e ]

This instruction toggles the MicroLYNX in and out of program mode. When enteringprogram mode, it must be followed by the memory address where the program willbegin. There must be a space between PGM and the address. For example:

PGM 200

Will start the program at address 200.

M o t i o n I n s t r u c t i o n s

These instructions can be used in either immediate or program mode. How theyoperate is dependant on the MUNIT, ACCL, DECL, VI and VM variables.

M O V A [ M o v e t o A b s o l u t e P o s i t i o n ]

This instruction will index the motor to a specified absolute position relative tozero (0). There are 2 modes that may be used with it:

1] Mode 0 will decelerate to position and stop.

2] Mode 1 will not decelerate.

See the following figure and program example for illustration of MOVA modes.

Enter the following program in the text editor window. The test condition forthis demo was a MicroLYNX-4 and an IMS M2-2220 23 frame motor. You may

Page 57: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

55

A bso lu te Pos ition0 20 60

V M (8)

V M (4 )

V I (2 )

2

1

Figure 10.3: MOVA Instruction Modes

have to adjust the motor current settings for whatever motor you have con-nected. Note that the POS counter will have to be reset to 0 each time theprogram is run.POS=0 'set position counter to 0

MUNIT=80000 'set motor units to 1 munit=80000msteps

MAC=50 'set acceleration current to 50%

MRC=50 'set run current to 50%

PGM 200 'start program at address 200

VM=4 'maximum velocity for index = 4 munits

MOVA 20,1 'index to abs. position 20, do not decel

HOLD 0 'supend program until pos. chg. completes

VM=8 'maximum velocity for index = 8 munits

MOVA 60 'index to abs. position 60, decel to stop.

HOLD 2

END

PGM

M O V R [ M o v e t o R e l a t i v e P o s i t i o n ]

This instruction will index the axis a specified number of munits relative to thecurrent position. The two modes perform the same way as the MOVA instruc-tion. The program above may be adapted by replacing the MOVA instructionswith MOVR. The difference in operation will be that the POS counter will notneed to be reset to 0 following program execution as MOVR will not index theaxis to an absolute position.

S L E W [ S l e w M o t o r a t C o n s t a n t V e l o c i t y ]

This instruction will slew the motor at the velocity given in munits per second.It has two modes:

1] Mode 0: Use acceleration ramp.

2] Mode 1: Do not use acceleration ramp.

If the mode is not specified, then Mode 0 is assumed.

Example:SLEW 500000 ‘slew the motor at 500,000 munits/sec, use accel.

SLEW 200000,1 ‘slew the motor at 200,000 munits/sec, no accel.

Use of Mode 1 may cause the axis to stall depending on the motor, load andmaximum velocity.

Page 58: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

56

F I O S [ F i n d I / O S w i t c h ]

This instruction finds the designated home switch. By default it will find thehome switch at the velocity specified by VM, and back off of the home switch atthe velocity specified by VI.

The speeds at which the instruction finds the switch may be set to somethingother than VM and VI if desired (i.e. FIOS <±speed>, <±creep>).

I / O I n s t r u c t i o n s

These instructions are used to read, write and configure the I/O and may be usedin either immediate mode or program mode. These instructions may also func-tion as variables. They are covered in detail in Section 8 of this document.

I O S [ I / O S e t u p ]

Sets the I/O parameters which identify the function of the I/O line or group.

I O [ R e a d W r i t e I / O ]

P r o g r a m I n s t r u c t i o n s

Program instructions are instructions that control the sequence, timing andfunctionality of a MicroLYNX program.

L B L [ L a b e l P r o g r a m / S u b r o u t i n e ]

This instruction labels the proceeding program or subroutines within a programwith a 1 - 8 character alpha-numeric name. The name can also contain the under-score (_) character, no other characters are valid.

Program or subroutine labels can be used in program execution, or as the targetfor a program branch or subroutine call.

Usage examples:LBL MY_SUB ‘declare subroutine named MY_SUB

PGM 100 ‘start program at address 100LBL MY_PROG ‘name prog MY_PROGMOVA 20 ‘move some distance

END ‘end programPGM ‘return to immediate mode

EXEC MY_PROG ‘run program MY_PROG

E N D [ E n d P r o g r a m ]

Designates the end of a program.

F L G [ D e f i n e U s e r F l a g ]

This instruction allows the user to declare a flag and set it to some state. Thenaming conventions for a user-defined flag are the same as for labels declaredwith the LBL instruction. These flags can be either global (declared in immediatemode) or local (declared within a program). Local flags are erased and re-declaredagain when a program is executed.

Usage Example:

Page 59: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

57

FLG MY_FLG=1 ‘declare flag MY_FLG, set to 1

This example shows a global flag being declared. To view the state ofthis flag, and any other user-defined flags enter:

PRINT UFLGS

The response from the terminal would be:MY_FLG = G TRUE

The “G” would indicate that it is a global flag at a logic TRUE state.If this were a local flag, the “G” would be replaced with an “L”.

V A R [ D e f i n e U s e r V a r i a b l e ]

This instruction allows the user to declare a variable and set it to some value.The naming conventions for a user-defined variables are the same as for user-defined flags declared with the FLG instruction. These variables can be eitherglobal (declared in immediate mode) or local (declared within a program). Localvariables are erased and re-declared when a program executed.

The following example is a short program that will declare a local variablenamed “LENGTH”, request an input from the user, then perform a relativeindex the distance specified. It will then loop back to the beginning and requestinput until the escape key is pressed.PGM 200 'start program at address 200

LBL VAR_TEST 'name the program VAR_TESTVAR LENGTH=0 'declare local variable LENGTH, set to 0PRINT "How far do I go?";INPUT LENGTH 'request input length in munitsMOVR LENGTH 'index relative distanc defined by LENGTHHOLD 2 'suspend program until motion completesPRINT "Went this far:", LENGTHBR 200 'loop to beginning of program

ENDPGM

I N P U T [ U s e r I n p u t R e q u e s t ]

This instruction allows for data to be entered into a variable from an externaldevice such as a terminal or an HMI through the serial port(s).

See VAR example above for usage example.

D E L A Y [ D e l a y P r o g r a m E x e c u t i o n ]

Delays program execution for a specified number of milliseconds.

For Example:DELAY 1000 ‘delay program execution for 1 second.

H O L D [ H o l d P r o g r a m E x e c u t i o n ]

The HOLD instruction differs from DELAY in that it suspends programexecution until a specified motion, velocity change, or position change com-pletes. Typically, a “HOLD 2” will be issued following a MOVA or MOVR.This instructs the MicroLYNX to suspend the program until the previouslyinstructed motion is complete.

Global Flags and Variables aredeclared outside of a program!Local Flags and Variables aredeclared within a program and erased and re-declared with

program execution!

Page 60: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

58

B R [ B r a n c h ]

This instruction is capable of two different types of pro-gram branches:

1] Conditional.

2] Unconditional.

This instruction may be used in DO-WHILE loops and IF-THEN structures.

A conditional branch will branch to another program address or label when aflag or variable reaches a specified value or state. A conditional branch will beexpressed thus:

‘this will conditional branch to label LOOP_LBL,‘while variable LOOP_CNT is‘less than 50 [DO-WHILE.

BR LOOP_LBL, LOOP_CNT<50

‘this will conditional branch to address 400‘when I/O line 21 = 1 [IF-THEN]

BR 400, IO 21

An unconditional branch will perform the program branch when reached, forexample:

BR MY_PROG ‘loop to beginning of program

C A L L [ C a l l S u b r o u t i n e ]

This instruction allows the user to invoke a subroutine within a program. Aswith the branch instruction, it may be conditional or unconditional. The condi-tion can be set on a call in the same fashion as a condition on a branch.

The main difference in operation is that when a subroutine is called, at the end ofa subroutine a RET (return from subroutine) statement must be in place. Thiswill return to the line of code following the CALL that originally invoked it.

The CALL instruction is expressed thus:

‘this will call a subroutine‘labeled WAITIN21 when I/O

‘line 21 becomes active

CALL WAITIN21, IO 21=1

LBL WAITIN21

MOVR 51200

HOLD 2

RET

Branching from insidea called subroutine to

a label or address outsidethat subroutine will causea stack fault! If a branchis used in a subroutine it

must be to a location within that subroutine!

A subroutine invokedusing the CALL instruction

have a return statement(RET) at the end of

the subroutine!

MUST

Page 61: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

59

F l a g s

Some flags may be used to enable/disable MicroLYNX functions. Other flagsmay be used to indicate system or program status. Flags may be either TRUE (1)or FALSE (0).

1] Factory-defined.

2] User-defined.

3] Special User-defined.

Factory

These flags are pre-defined at the factory and cannot be deleted. When an IP(Initialize Parameters) instruction is given, these flags will be set to their factorydefault state. There are two types of factory-defined flags: Read/Writable andRead Only.

U s e r

One of the powerful features of the LYNX instruction set is that it allows theuser to define flags both inside a program (local) or outside a program (global).User-defined flags are deleted by means of the DVF (Delete Variables and Flags)instruction.

U s a g e o f F l a g s

Flags are typically used to set conditions for branches and subroutine calls. Theyare also useful for program debugging. For the definition of all the factory-defined flags, see the LYNX Product Family Manual on the CD.

K e y w o r d s

Keywords are used in conjunction with the PRINT, GET and IP instructions todetermine what sub-set of the VAR/FLG/IOS will be acted upon by the instruc-tion used. The keywords are:

ALL: Include all variables, flags and I/O states.

VARS: Include only variables.

FLAGS: Include only flags.

UVARS: Include only user-defined variables.

UFLGS: Include only user-defined flags.

IOS: Include only I/O line states.

STATS: Include only factory-defined status flags.

Page 62: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

60

I n t roduct ion to LYNX Programming

The MicroLYNX uses the LYNX programming languange. This language is aneasy to use, BASIC-like language that follows standard programming conven-tions. It features a powerful instruction set that allows the user to control abroad spectrum of automated processes.

S y n t a x R u l e s

1] The LYNX Variables, Instructions and Flags are not casesensitive.

2] A space is required after each command, except in the casewhere a variable or flag is being set to some value or state. Inthis case no space is required between the command and the“equal” (=) sign or math function.

3] A comma is required as a delimiter between data fields orparameters where more than one data field or parameter iscontained in the command. No space is required betweendelimiters and parameters.

4] The apostrophe ( ‘ ) is used as a comment character. Anytext on the same line after the apostrophe will be ignored bythe MicroLYNX.

5] Party mode device names defined by the DN instructionARE case sensitive.

P r o g r a m R u l e s

1] The first and last instruction of everyprogram is the PGM instruction, whichtoggles the MicroLYNX in and out ofprogram mode.

2] Subroutines invoked by a “CALL”must have a return “RET” instruction onthe last line of the subroutine.

Program Deve lopment Recommendat ions

There are several recommendations for program entry thatoptimize the user’s ability to edit and debug LYNX programs:

1] Always use the LYNX Terminal texteditor window or other ASCII text editor for programdevelopment. While programs may be entered directly intothe MicroLYNX via a terminal, the entire program has to bere-entered to edit or debug.

LYNX Programming 11

Using all UPPERCASE charactersfor commands and lowercase

characters for comments makefor easier program editing

and debugging!

Page 63: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

61

2] Use uppercase characters for instructions, variables and flags.While not case sensitive, this makes them stand out.

3] Comment heavily in lower case characters.

4] Create subroutines in separate blocks instead of in the mainprogram.

5] Do not use word processor applications for program develop-ment as quotes and apostrophes are handled differently andmay not be recognized as such by the MicroLYNX!

6] Remember the six-P rule: Proper Prior Planning PrecludesPoor Performance.

Program Deve lopment Steps

Like any project, successful development of a LYNX program includes severalplanned steps. Following these steps in developing a program will reduce thetime it takes to create a completed, functioning program.

S t e p 1 : P l a n n i n g

Define what steps the program will take from start to end. A flowchart is theeasiest way to do this. Following is an example flowchart for a program that willmove the motor a certain distance at a certain velocity, reduce speed, activate anoutput, disable the output, cease motion and return to origin.

Figure 11.1: Flowchart Used for Program Planning

S TA RT

Turn O u tpu t O FFa t 10 R evs

M ove to 4 .25revs at 10 R PS

S top M ove A t10.5 R evs

R educe speedto 2 R PS

R e tu rn to O rig ina t 10 R P S

Turn ou tput ona t 5 revs

E N DA

A

Page 64: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

62

S t e p 2 : D e f i n e P a r a m e t e r s

A program will typically perform functions such as monitor a switch, control asolenoid or relay, drive a motor, read an encoder, etc. In order for the program toreact to external devices through the I/O, the I/O parameters should be set beforerunning the program.

Global variables or flags should also be defined at this point. Motion parametersshould be set also.

All these can be entered into the text editor. See program following next step forexample.

S t e p 3 : P r o g r a m E n t r y

The program is now entered into the text editor. The following program exampleis broken down into its separate components for clarity. This example follows theplan illustrated in the flowchart figure 11.1. This is a working program illustratinghow an output can be switched on-the-fly using the position trip functions. AnLED can be connected to I/O line 21 and this program can be entered as shown.

'******** Parameter Setup ********

MUNIT = 51200VI = 0.500ACCL = 20DECL = 50IOS 21 = 0,1,0 'set i/o 21 to:output - gen. purpose,

'active low

'******** Main Program ********

PGM 200LBL ONTHEFLY TP1 = 5, PSUB1 'configure 1st position trip at 5 revs TP2 = 10, PSUB2 'configure 2nd position trip at 10 revs TPE1 = 1 'enable both position trips TPE2 = 1 VM = 10 'initial max speed 10 rps MOVA 4.25, 1 'move out to 4.25 revs at 10 rps HOLD 0 VM = 2 'reduce max speed to 2 rps MOVA 10.5 'move to 10.5 revs HOLD 2 DELAY 250 VM = 10 'reset max speed to 10 rps MOVA 0 'return to origin HOLD 2 END

'******** Subroutines ********

LBL PSUB1 'turn on output at 5 revs. IO 21 = 1 RET

LBL PSUB2 'turn off output at 10 revs IO 21 = 0 RET

PGM

Page 65: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

63

After the program is entered it can be downloaded to the MicroLYNX. If usingthe LYNX Terminal program, this is as simple as clicking the menu item “Trans-fer > Download”. Otherwise, the program can be copied and pasted from thetext editor to the terminal.

S t e p 4 : P r o g r a m E x e c u t i o n

When a program is executed, it will run in the sequence in which it is written.There are basically four methods of program execution:

1] Program executes on power-up: This is done by labeling theprogram “STARTUP”. Only one program in memory canhave this label.

2] Program executes by label: The label of the program can beused as a keyword to execute that program by typing theprogram label directly into the terminal in immediate mode.

3] Program executes by input: An input can be defined to starta program, this is usually accomplished by using the GOdedicated input function.

4] Program executes by address: This method requires the useof the EXEC instruction. Typing “EXEC” followed by aspace and the address where the program begins will executethe program.

S t e p 5 : P r o g r a m E d i t i n g / D e b u g g i n g

The final step in the LYNX program development process is to debug and tweakthe program to a state of perfection. Unless your program is no more advancedthan “turn the motor x distance and stop”, it will be a rare circumstance of aprogram working perfectly the first time. This is true in any programminglanguage, be it BASIC, C++, Java or LYNX. There are several tools built intothe LYNX that assist the programmer in debugging. These are:

1] Error codes.

2] EXEC instruction modes:

EXEC <lbl/addr>,1: Trace mode, code printed toscreen as it is run.

EXEC <lbl/addr>,2: Single step mode, single stepsthrough program.

3] ONER: instruction accommodates the use of a subroutine tocapture an error location.

4] BREAK: Instruction allows the user to set break pointswithin a program.

These and other program debugging tools are explained in greater detail inAppendix B: Troubleshooting.

Page 66: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

64

Program Samples

The following program samples may be used either as templates or as a means offamiliarizing yourself with the use of the LYNX programming language. Eachstep is fully explained by comments.

Mot ion Samp le

This program will move the motor 100,000 steps each time it is executed.PGM 200 'enter program mode at address 200

LBL MO_SAMP 'label the program MO_SAMP

MOVR 100000 'move relative 100000 steps

HOLD 2 'suspend program until motion completes

END 'designate the end of the program

PGM 'exit program mode

I f - T h e n S a m p l e

This program will loop until an input is pulled to ground. Use of this willrequire a switch connected between I/O line 22 and I/O GND.IOS 22=0,0,0 'set i/o 22 to gen. purpose input, active low

PGM 200 'start program at address 200

LBL IF_THEN 'name the program IF_THEN

MOVR 10000 'relative index 10000 steps

HOLD 2 'suspend program until motion completes

BR IF_THEN,IO 22=0 'IF i/o 22=inactive THEN branch to IF_THEN

MOVR -100000 'relative index -100,000 steps

HOLD 2 'suspend program until motion completes

END 'designate end of program

PGM 'exit program mode

Count ing Samp le

Each time this program senses an input, it will index the motor a short distanceand count it. As in the previous sample, this program requires the switch beconnected between I/O line 22 and I/O GND.IOS 22=0,0,0 'set i/o 22 to gen. purpose input, active low

PGM 200 'start program at address 200

VAR COUNT=0 'declare local variable COUNT, set val to 0

LBL IN_CNT 'name the program IN_CNT

BR IN_CNT, IO 22=0 'if i/o 22=inactive, then branch to IN_CNT

LBL LOOP 'label process LOOP

BR LOOP, IO 22=1 'if i/o 22=1, then branch to LOOP

MOVR 10000 'relative index 10000

HOLD 2 'suspend prog. until motion completes

INC COUNT 'increment COUNT

PRINT "COUNT = " COUNT 'display value of COUNT

BR IN_CNT 'uncond. branch to IN_CNT

END

PGM

Page 67: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

65

U s e r I n t e r f a c e S a m p l e

This sample program will ask the user for an absolute axis position, then indexto that position.PGM 200

VAR POSITION=0 'declare local var POSITION

LBL LOOP 'name the program LOOP

PRINT "Enter an absolute position:";

INPUT POSITION 'wait for user to enter position

MOVA POSITION 'absolute index to POSITION

HOLD 2 'suspend program until motion completes

BR LOOP 'loop to beginning of program

END

PGM

Back and Forth

This program will move 1 revolution in a positive direction, then 1 revolution ina negative direction, then repeat until the escape key on the terminal keyboard ispressed.MUNIT=51200/360 'set munits to degrees

PGM 200

LBL BNF 'label program BNF

MOVR 360 'index relative +360°

HOLD 2 'suspend program until move completes

MOVR -360 'index relative -360°

HOLD 2 'suspend program until move completes

BR BNF 'loop to beginning of program

END

PGM

Back and Forth Part 2

This program will move 1 revolution in a positive direction, print “Forth” to theterminal display and wait two seconds. It will then turn 1 revolution in a nega-tive direction, print “Back” to the display, wait two seconds, then repeat untilthe escape key is pressed on the terminal keyboard.MUNIT=51200/360 'set munits to degrees

PGM 200

LBL BNF2 'label program BNF

MOVR 360 'index relative +360°

HOLD 2 'suspend program until move completes

PRINT "Forth"

DELAY 2000 'delay program 2 seconds

MOVR -360 'index relative -360°

HOLD 2 'suspend program until move completes

PRINT "Back"

DELAY 2000 'delay program 2 seconds

BR BNF2 'loop to beginning of program

END

PGM

Page 68: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

66

F i n d I / O S w i t c h S a m p l e

This sample program will have a section that defines the parameters for the I/Oand motion outside of the program. To use this program, three switches must beplaced between I/O lines 21, 22, 23 and I/O GND. This program will set upthree inputs: GO, STOP and a HOME switch. When executed by the GOswitch the motor will seek the HOME input. When the HOME switch ispressed it will set the position counter to 0. The program will the run the mo-tion profile.'********PARAMETERS*******

MUNIT=51200/1000 'set munits to 1000 steps/rev

IOS 21=9,0,0 'set i/o 21 as GO input, active low

IOS 22=10,0,0 'set i/o 22 as STOP input, active low

IOS 24=12,0,0 'set i/o 24 as HOME input, active low

VM=20 'set the maximum velocity to 20 munits/sec

VI=1 'set the initial velocity to 1 munit/sec

'*******PROGRAM *********

PGM 1 'start program at line 1

LBL PROG 'label the program PROG_1

FIOS 'find home switch

HOLD 2 'suspend program until motion completes

POS=0 'set position register to 0

MOVA 1000 'index absolute 1000 steps

HOLD 2 'suspend program until motion completes

DELAY 2000 'wait 2 seconds

MOVA 0 'index to absolute position 0

HOLD 2 'suspend program until motion completes

DELAY 2000 'wait 2 seconds

END

PGM

Page 69: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

67

Sample Applications12 These applications are the result of an informal survey conducted by the IMSApplications Engineering Department to learn the most common LYNX /MicroLYNX 1 and 1-1/2 axis applications. Each application example contains anapplication diagram, a flowchart and program code.

Feed Cut 1

This program feeds a web to length and switches an output to operate a tool suchas a cutter. The machine operator enters the feed length and batch count. Theoperation begins when the START button is pressed, and ends when the batch iscomplete or material runs out.

Feed Cut 1 applies to labeling, packaging, converting, etc.

PARTS MADE:11

S te p pin g M o to r

M a te r ia lS e n s or

N ip R o lle rs

C u tte r

H u m a nM a c hineIn te rfac e

(H M I)

START

STOP

M icroLYNXor

LY NX ControlM odule + S tep

M o tor D river

Figure 12.1: Feed Cut Application

Page 70: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

68

STA RT

M achine opera tor enters feed length and batch count into H M I

Execute feedand cut

O utof

m ate ria l?

Ba tchcom ple ted?

EN D

YES

YES

NO

NO

Figure 12.2: Feed Cut Application Flowchart

P r o g r a m

‘************* Parameter Setup ************

MUNIT = 51200 ‘One inch per rev @ 1/256 ustep

VI = 0.5 ‘Base speed 1/2 inch/sec

VM = 10 ‘Slew speed 2 inch/sec

ACCL = 20 ‘Accl = decl = 20 in/sec^2

DECL = 20

IOS 21 = 0,0,0 ‘Material Sensor: gen. purpose input active low

IOS 23 = 9,0,0 ‘IO 23 is a Start Input

IOS 24 = 10,0,0 ‘IO 24 is Stop Input

IOS 31 = 0,1,0 ‘Cutter output: GP, output, low true

VAR Feedlth

VAR TargetCt = 0

VAR Count = 0

VAR Matsens = 21

Page 71: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

69

VAR Cutter = 31

‘************* Program ************

PGM 1

LBL FEEDCUT1

PRINT “Enter Feed Length “;

INPUT Feedlth

LBL Enterct

PRINT “Enter Total Parts Count “;

INPUT Targetct

BR Enterct, Targetct <= 0

LBL Mainloop

BR Webdone, ! IO Matsens ‘Production ends when the system

‘is out of material

MOVR Feedlth ‘Feed the material

HOLD 2

IO Cutter = 1 ‘Turn on the Cutter output

DELAY 100 ‘for 100 msec

IO Cutter = 0 ‘Turn off the Cutter output

INC Count

PRINT “Parts Made “, Count

PRINT

BR Mainloop, Count < TargetCt

PRINT “Batch Complete”

PRINT Count, “ Parts Made”

BR Alldone

LBL Webdone

PRINT “BATCH INTERRUPTED”

PRINT Count, “ Parts Made”

PRINT “Out of Material”

LBL Alldone

END

PGM

Page 72: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

70

Read And Feed

This program reads the state of two inputs to determine a move distance, andmakes the move.

Stepp ing M o to r

M icroLYN X o r LYN X C on tro lM odu le + S tep M otor D rive r

B IT 0

B IT 1

S TA R TIO 22

IO 21

IO 23

IG

Figure 12.3: Read And Feed Application

S TA RT

R ead Inputsto determ ine

m ove d is tance

M ove se lec tedd is tance

E N D

Figure 12.4: Read And Feed Application Flowchart

Page 73: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

71

Read And Feed Program Code

‘************* Parameter Setup ************

MUNIT = 51200

VI = 0.5

VM = 10

ACCL = 20

DECL = 20

IOS 21 = 0,0,0 ‘Distance Bit0, low true

IOS 22 = 0,0,0 ‘Distance Bit1, low true

IOS 23 = 9,0,0 ‘Start input, low true

VAR DISTANCE

VAR MASK = 3

VAR INPCODE

‘************* Program ************

PGM 1

LBL READFEED

INPCODE = IO 20 & 3 ‘This step masks the upper 4 bits of IO 20.

‘Feed distance is set in the routine depending on the

‘state of Inputs 21 & 22

BR Dist0, INPCODE = 0

BR Dist1, INPCODE = 1

BR Dist2, INPCODE = 2

BR Dist3, INPCODE = 3

LBL Feed

MOVR DISTANCE

HOLD 2

END

LBL Dist0

DISTANCE = 1

BR Feed

LBL Dist1

DISTANCE = 2

BR Feed

LBL Dist2

DISTANCE = 3

BR Feed

LBL Dist3

DISTANCE = 4

BR Feed

PGM

Page 74: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

72

AND - OR

This program shows how to read the state of two inputs and perform logicalAND and OR on them. For this example there is program code only.

AND - OR Program Code

‘******** Parameter Setup ********

IOS 21 = 0,0,0 ‘Distance Bit0, low true

IOS 22 = 0,0,0 ‘Distance Bit1, low true

IOS 23 = 9,0,0 ‘Start input, low true

FLG B0 ‘This flag stores Bit0

FLG NB0 ‘This flag stores NOT(Bit0)

FLG B1 ‘This flag stores Bit1

FLG NB1 ‘This flag stores NOT(Bit1)

FLG AND0 ‘This flag stores the result of NOT(Bit1) AND NOT(Bit0)

FLG AND1 ‘This flag stores the result of NOT(Bit1) AND Bit0

FLG AND2 ‘This flag stores the result of Bit1 AND NOT(Bit0)

FLG AND3 ‘This flag stores the result of Bit1 AND Bit0

FLG OR0 ‘This flag stores the result of NOT(Bit1) OR NOT(Bit0)

FLG OR1 ‘This flag stores the result of NOT(Bit1) OR Bit0

FLG OR2 ‘This flag stores the result of Bit1 AND NOT(Bit0)

FLG OR3 ‘This flag stores the result of Bit1 OR Bit0

VAR BIT0 = 21 ‘IO 21 is read into Bit0

VAR BIT1 = 22 ‘IO 22 is read into Bit1

‘******** Program ********

PGM 1

LBL ANDOR

‘The next four lines read the IO states, write

‘them into flags, and write the negatives into

‘flags.

B0 = IO BIT0

NB0 = !B0

B1 = IO BIT1

NB1 = !B1

‘The next four lines perform logical AND.

AND0 = NB1 & NB0

Page 75: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

73

AND1 = NB1 & B0

AND2 = B1 & NB0

AND3 = B1 & B0

‘These next four lines print out the results of

‘the logical AND.

PRINT “/BIT1 & /BIT0 = “, AND0

PRINT “/BIT1 & BIT0 = “, AND1

PRINT “BIT1 & /BIT0 = “, AND2

PRINT “BIT1 & BIT0 = “, AND3

PRINT

‘The next four lines perform logical OR.

OR0 = NB1 | NB0

OR1 = NB1 |B0

OR2 = B1 | NB0

OR3 = B1 | B0

‘These next four lines print out the results of

‘the logical OR.

PRINT “/BIT1 OR /BIT0 = “, OR0

PRINT “/BIT1 OR BIT0 = “, OR1

PRINT “BIT1 OR /BIT0 = “, OR2

PRINT “BIT1 OR BIT0 = “, OR3

END

PGM

O n - T h e - F l y

This program illustrates how to change speeds and toggle outputs while moving.This applies to applications where a tool needs to be moved quickly to theworkpiece, then decelerated for fluid dispensing, soldering, welding, laser cutting,etc. On-The-Fly is an example of how LYNX / MicroLYNX position trips work.

IO S M otor+

Ball Screw

Position APO S=0

VM =10 RPS

O utpu t O FF

Position BPO S=4.25VM =2 RPS

O utpu t O N@ 5 Revolu tion s

Position CPO S=10

O utpu t O FF

Retu rn to O rig inVM =10 RPSSTART

FIN ISH

Figure 12.5: On-The-Fly Application

Page 76: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

74

S TA RT

Turn O u tpu t O FFa t 10 R evs

M ove to 4 .25revs at 10 R PS

S top M ove A t10.5 R evs

R educe speedto 2 R PS

R etu rn to O rigina t 10 R P S

Turn ou tput ona t 5 revs

E N DA

A

Figure 12.6: On-The-Fly Application Flowchart

O n - T h e - F l y P r o g r a m C o d e

‘******** Parameter Setup ********

MUNIT = 51200

VI = 0.500

ACCL = 20

DECL = 50

IOS 31 = 0,1,0 ‘Output - general purpose, active low

‘******** Program ********

PGM 1

LBL ONTHEFLY

TP1 = 5, PSUB1 ‘Configure 1st position trip at 5 revs

TP2 = 10, PSUB2 ‘Configure 2nd position trip at 10 revs

TPE1 = 1 ‘Enable both position trips

TPE2 = 1

VM = 10 ‘Initial max speed 10 rps

MOVA 4.25, 1 ‘Move out to 4.25 revs at 10 rps

HOLD 0

VM = 2 ‘Reduce max speed to 2 rps

MOVA 10.5 ‘Move to 10.5 revs

HOLD 2

DELAY 250

VM = 10 ‘Reset max speed to 10 rps

MOVA 0 ‘return to origin

HOLD 2

END

LBL PSUB1 ‘Turn on output at 5 revs.

IO 31 = 1

RET

LBL PSUB2 ‘Turn off output at 10 revs

IO 31 = 0

RET

PGM

Page 77: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

75

R e g i s t r a t i o n

This program feeds a web at a constant velocity and executes a registration moveof a user-defined distance after a registration sensor becomes active. After thecompletion of the move, an output is switched ON/OFF. Operation starts whenthe START button is pressed and ends when either the STOP button is pressed,the batch is complete, or material runs out.

PARTS MADE:11

S te pping M o tor

M a ter ia lS en so r

R egis tra tio nM a rk S e ns o r

N ip R o lle rs

C u tte r

H um anM a ch in eIn te rfa ce

(H M I)

START

STOP

MicroLYNXwith Differential I/OExpansion Module

-OR-LYNX Control

Module with DifferentialI/O M odule and Step

Motor Driver

Figure 12.7: Registration Application

Page 78: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

76

START

Execute feed , turncutter ON/OFF,

increment runningcount

Machine operator ente rs feed length and batch count into HMI

Feed m aterial

Ou tof

mate rial?

Batchcom pleted?

R egistrationM ark

D etected?

END

YESYES

YES

NO

NO

NO

A

A

Figure 12.8: Registration Application Flowchart

Reg is t rat ion Program Code

‘******** Parameter Setup ********

MUNIT = 51200 ‘One inch per rev @ 1/256 microstepping

VI = 0.500 ‘Base speed 1/2" per rev

ACCL = 50

DECL = 50

IOS 21 = 9,0,0 ‘IO 21 is Start Input

IOS 22 = 10,0,0 ‘IO 22 is Stop Input

IOS 23 = 0,0,0 ‘IO 23 is Material Sensor

IOS 16 = 0,0,1 ‘Differential IO point configured as registration

‘sensor input.

IOF 10 = 0 ‘Give IO Group 10 highest speed response - 100ns

IOS 31 = 0,1,0 ‘Cutter output: GP, output, low true

VAR Speed

VAR Feedlth

VAR Matsens = 23

VAR Cutter = 31

VAR TargetCt ‘Number of parts to make

VAR Count = 0 ‘Running total

Page 79: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

77

‘******** Program ********

PGM 1

LBL REGISTER

TI1 = 16 , MARK ‘Configure reg. sensor input trip routine

LBL Enterspd

PRINT “Enter feed speed (in/sec) “;

INPUT Speed

LBL Getdist

PRINT “Enter feed distance (in) “;

INPUT Feedlth

LBL Getcount

PRINT “Enter Batch Count “;

INPUT Targetct

LBL CRUISE

BR Webdone, !IO Matsens ‘Go to end if out of material

TIE1 = 1 ‘Enable input trip routine

SLEW Speed ‘Accelerate web up to speed.

LBL IDLER

BR IDLER, MVG ‘Wait for trip routine to complete execution

BR CRUISE, Count < Targetct ‘Execute as long as this condition

‘is true

PRINT “Batch Completed”

PRINT “Parts Made “, Count

LBL Webdone

END

LBL MARK

MOVR Feedlth

HOLD 2

IO Cutter = 1 ‘Turn on cutter output

DELAY 250 ‘for 1/4 sec

IO Cutter = 0 ‘Turn off cutter

INC Count ‘Increment Count by 1.

PRINT “Parts Made “, Count

RET

PGM

Page 80: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

78

Traverse

This program runs a traverse. The traverse axis follows quadrature encoderinputs from a take up roll. The traverse, or follower axis, starts at the origin andtravels in the positive direction to some maximum positive position. It dwellsfor an adjustable number of master encoder counts. At this point, followingstarts in the negative direction until the maximum negative position is reached.

Traverse applies to winding applications using electronic gearing, or“lineshafting”.

S tep p ing M o tor

M icroLY N Xw ith D iffe ren tia l I/OE xpans ion M odule

-O R -LY N X C ontro l

M od u le w ith D iffe re ntia lI/O M o du le and S tep

M otor D river

L inear A ctua to r

O rig in P os itiveL im it

F eed G u ideF eed G u ide

E ncode rTake U p R o ll

Figure 12.9: Traverse Application

Page 81: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

79

S TA R T

F ollow in thenegative d irec tion

F ollow in the pos itived irec tion

S ta rt at the o rig in

D isab le fo llow ing

D isab le fo llow ing

A tpos itive

lim it?

A to rig in?

D w ellcom p le te?

D w ellcom p le te?

YES

YES

YES

YES

NO

NO

NO

NO

A

A

Figure 12.10: Traverse Application Flowchart

Traverse App l i cat ion Program Code

‘******** Parameter Setup ********

MUNIT = 400 ‘Drive set to half step

IOS 15 = 5,0,1,0,1,1

IOS 16 = 6,0,1,0,1,1

VAR ENCCT=480 ‘Encoder 120 quadrature

VAR FOLRATIO = MUNIT/ENCCT ‘Output Counts/Input Counts - 1:1

‘following with Lynx trainer

VAR DWELL = 480 ‘Dwell 480 counts at pos/neg limits

VAR DWELLPOS

VAR STARTPOS

‘******** Program ********

PGM 1

LBL TRAVERSE

POS = 0 ‘Start at 0

CTR3 = 0 ‘Clear Master Encoder counter

HAS = FOLRATIO

Page 82: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

80

HAE = 1 ‘Enable following (half-axis operation)

LBL IDLE1

BR IDLE1, POS < 2 ‘Wait until the follower reaches 2 revs

HAE = 0 ‘Disable following

STARTPOS = CTR3

LBL IDLE2

DWELLPOS = CTR3 - STARTPOS

BR IDLE2, DWELLPOS < DWELL ‘Wait until master has turned

‘“Dwell” counts

HAS = -FOLRATIO ‘Reverse the following ratio

HAE = 1 ‘Enable following

LBL IDLE3

BR IDLE3, POS > 0 ‘Wait until follower returns to 0

HAE = 0 ‘Disable following

STARTPOS = CTR3

LBL IDLE4

DWELLPOS = CTR3 - STARTPOS ‘Wait until master has turned

BR IDLE4, DWELLPOS < DWELL ‘“Dwell” counts

HAS = FOLRATIO ‘Reverse the following ratio

HAE = 1 ‘Enable following

BR IDLE1 ‘Return to first loop

END

PGM

Page 83: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

81

Appendix A: Software Summary

yrammuSteSnoitcurtsnIXNYL

dnammoC noitpircseD egasU stinU/egnaR

LCCA elbairaVnoitareleccA >mun<=LCCA ces/STINUM 2

LCA galFnoitareleccAylnOdaeRLCA,>rdda/lbl<RB

LCATNIRPgnitareleccaton=*0

gnitarelecca=1

TLCA elbairaVepyTnoitareleccA >marap<=TLCA 4-0

LBTLCA elbairaVelbaTnoitareleccA >lav<,>mun<=LBTLCA652-0=>mun<00.1-00.0=>lav<

SDA elbairaVputeStupnIgolanA,>cnuf<,>tinua<=>nahc<SDA

>wal<launaMeeS

LLA drowyeKsretemaraPllAeveirteR,LLATEG,LLATNIRP

LLAPI

NIA lennahCtupnIgolanAdaeRelbairaV

>nahc<NIA=>rav<elbairaV=>rav<

2-1=>nahc<

DUAB elbairaVetaRDUAB >marap<=DUAB 83,91,*69,84

OIB galFedoMyraniB >1/0<=OIB*IICSA=0yraniB=1

DGKB gninnuRmargorPdnuorgkcaBgalFylnOdaeR

DGKB,>rdda/lbl<RBDGKBTNIRP

ELB noitasnepmoChsalkcaBgalFelbasiD/elbanE

>1/0<=ELB*elbasiD=0delbanE=1

MLB edoMnoitasnepmoChsalkcaB >edom<=MLB*lacitamhtaM=0lacinahceM=1

HSLB tnuomAnoitasnepmoChsalkcaB >tinum<=HSLB STINUM

RB noitcurtsnIhcnarB >dnoc<,>rdda/lbl<RB launaMeeS

KAERB elbairaVtnioPkaerB,>mun<=KAERB

>rdda/lbl<

delbasid=*0kaerB=01-1

stnioP

YSB galFysuBylnOdaeR YSBTNIRPgninnur.gorpon=*0

gninnur.gorp=1

LLAC noitcurtsnIenituorbuSllaC >dnoc<,>rdda/lbl<LLAC launaMeeS

PC noitcurtsnImargorPraelC >edom<,>rdda/lbl<PC.gorp.cepsrlc=0

dneotrlc=1

LPC noitcurtsnItnemelpmoCsowT >glf.rav<LPC

ESC galFelbanEmuSkcehC)ylnOedoMyraniB(

>1/0<=ESC*delbasiD=0

delbanE=1

1RTC elbairaVretnuoC1kcolC launaMeeS-UM/000,000,741,2±

STIN

2RTC elbairaVretnuoC2kcolC launaMeeS-UE/000,000,741,2±

STIN

Asterisk (*) indicates default.

Page 84: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

82

yrammuSteSnoitcurtsnIXNYL

dnammoC noitpircseD egasU stinU/egnaR

3RTC elbairaVretnuoC3kcolC launaMeeS-colC/000,000,741,2±

61&51O/IsesluPk

LCD galFnoitareleceDylnOdaeRLCD,>rdda/lbl<RB

LCDTNIRPgnitarelecedton=*0

gnitareleced=1

TLCD elbairaVepyTnoitareleceD >marap<=TLCD 4-0

LCED elbairaVnoitareleceDkaeP >mun<=LCED ces/STINUM 2

CED noitcurtsnIelbairaVtnemerceD >rav<CED

YALED noitucexEmargorPyaleD >emit<YALED sm/53556-0

PSID elbairaVyalpsiDtamroF launaMeeS

ND elbairaVemaNeciveD)ylnOedoMytraP(

>rahc<=NDretcarahCIICSA

9-0,z-a,Z-A

NEVRD galFelbasiD/elbanEevirD >1/0<=NEVRDdelbasiD=0delbanE=*1

SRVRD galFteseRevirD >1/0<=SRVRDteseRtoN=*0evirDteseR=1

PYTVRD elbairaVepyTevirDylnOdaeR PYTVRDTNIRPH384MI=2H508MI=4

FVD dnaselbairaVdenifeD-resUeteleDnoitcurtsnIsgalF

,>1marap<FVD>3marap<,>2marap<

launaMeeS

OHCE elbairaVedoMohcE >edom<OHCExelpuDlluF=*0xelpuDflaH=1

ohceoN=2

BDE elbairaVdnabdaeDredocnE >stinue±<=BDE sitnue/53556-0

EE elbanEredocnEretsaM >1/0<=EEdelbasiD=*0

delbanE=1

DNE noitcurtsnImargorPdnE DNE

RRE galFrorrEylnOdaeR RRETNIRProrrEoN=*0stsixErorrE=1

ARRE elbairaVsserddArorrEylnOdaeR ARRETNIRP

RORRE elbairaVepyTrorrE RORRETNIRPnielbaTrorrEeeS

launaM

TINUE elbairaVstinUredocnE >mun<=TINUErepstnuoCredocnE

tinuresu

CEXE noitcurtsnImargorPetucexE >edom<,>rdda/lbl<CEXElamroN=0

edoMecarT=1petSelgniS=2

TLUAF galFelbasiD/elbanErotacidnItluaF >1/0<=TLUAFdelbasiD=0delbanE=*1

SOIF noitcurtsnIhctiwSO/IdniF launaMeeS

SGALF drowyeKsgalFeveirteRTEG,SGALFTNIRP

SGALFPI,SGALF

GLF noitcurtsnIgalFresUenifeD >lebal<GLF

TEG sgalFdnaselbairaVeveirteRnoitcurtsnI

,SGALFTEG,SRAVTEGLLATEG

Page 85: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

83

yrammuSteSnoitcurtsnIXNYL

dnammoC noitpircseD egasU stinU/egnaR

EHCEG galFelbasiD/elbanEohcElabolG >1/0<=EHCEGdelbasiD=*0

delbanE=1

EAH elbasiD/elbanEedoMsixAflaHgalF

>1/0<=EAHdelbasiD=*0

delbanE=1

SAH elbairaVgnilacSedoMsixAflaH >rotcaf<=SAH 1<ot1->

TDCH elbairaVemiTyaleDtnerruCdloH >emit<=TDCH sm/53556-0

DLEH dleHnoitucexEmargorPylnOdaeRgalF

DLEHTNIRPgninnuR.gorP=0

dleH.gorP=1

DLOH agniruDnoitucexEmargorPdloHnoitcurtsnIevoM

>edom<DLOH.ghC.soP=0.ghC.leV=1

noitoM=2

TSOH galFelbasiD/elbanEecafretnItsoH >1/0<=TSOHdelbasiD=*0

delbanE=1

CSJI noitcurtsnIkcitsyoJetarbilaC CSJI

CNI noitcurtsnIelbairaVtnemercnI >rav<CNI

TUPNI noitcurtsnItseuqeRtupnIresU >marap<,>rav<TUPNI.gorP.psuS=0.gorP.tnoC=1

1TUPNI noitcurtsnItseuqeRtupnIresU)1MMOCXNYL(

marap<,>rav<1TUPNI.gorP.psuS=0.gorP.tnoC=1

1TUPNI noitcurtsnItseuqeRtupnIresU)2MMOCXNYL(

marap<,>rav<2TUPNI.gorP.psuS=0.gorP.tnoC=1

OI elbairaVO/IetirWdaeR .tnemucodsihtfo8noitceSeeS

FOI elbairaVgniretliFtupnIlatigiD .tnemucodsihtfo8noitceSeeS

SOI elbairaVnoitarugifnoCO/I .tnemucodsihtfo8noitceSeeS

PI noitcurtsnIsretemaraPezilaitinI >drowyek<PI

LLASRAVSGALF

SOI

SGOJ elbairaVdeepSgoJ >deeps<=SGOJ ces/stinum

CSJ elbairaVnoitisoPretneCkcitsyoJ >mun<=CSJ sTINUA/5904-0

BDSJ elbairaVdnabdaeDkcitsyoJ >mun<=BDSJ sTINUA/5904-0

SFSJ elbairaVelacSlluFkcitsyoJ >mun<=SFSJ sTINUA/5904-0

LBL enituorbuS/margorPlebaLnoitcurtnI

>eman<LBL-ahplA8ot1

"_"dnasciremun

TLCDL elbairaVepyTnoitareleceDtimiL >marap<=TLCDL 4-0

LCEDL elbairaVnoitareleceDtimiL >mun<=LCEDL ces/STINUM 2

PTSMIL galFpotSitmiL >1/0<=PTSMIL.gorPpotSt'noD=*0

.gorPpotS=1

TSIL ecapSmargorPderotStsiLnoitcurtsnI

>edom<,>rdda/lbl<TSIL1ottsiL=0 ts DNE

llatsiL=1

OGOL elbasiD/elbanErennaBno-ngiSgalF

>1/0<=OGOLdelbasiD=0delbanE=*1

Page 86: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

84

yrammuSteSnoitcurtsnIXNYL

dnammoC noitpircseD egasU stinU/egnaR

CAM gnitteStnerruCnoitareleccArotoMelbairaV

>tnecrep<=CAM %001-0

CHM elbairaVgnitteStnerruCdloHrotoM >tnecrep<=CHM %001-0

AVOM noitisoPetulosbAotevoMnoitcurtsnI

>edom<,>sop<AVOMetareleceD=*0.leceDt'noD=1

RVOM noitisoPevitaleRotevoMnoitcurtsnI

>edom<,>sop<RVOMetareleceD=*0.leceDt'noD=1

CRM elbairaVgnitteStnerruCnuRrotoM >tnecrep<=CRM %001-0

TDSM elbairaVemiTyaleDgniltteSrotoM >emit<=TDSM .cesm/53556-0

LESM elbairaVtceleSnoituloseRrotoM tnemucoDsihtfo7noitceSeeS

TINUM elbairaVstinUrotoM >mun<=TINUMrePsesluPkcolC

tinUresU

GVM galFgnivoMylnOdaeRGVMTNIRP

GVM,>rdda/lbl<RByranoitatS=*0

gnivoM=1

PON noitcurtsnInoitarepOoN PON

RENO noitcurtsnIrorrEnO >rdda/lbl<RENO

YTRAP galFelbasiD/elbanEedoMytraP >1/0<=YTRAPdelbasiD=*0

delbanE=1

SUAP noitucexEmargorPesuaPnoitcurtsnI

SUAP

DSUAP galFdesuaPmargorPylnOdaeR DSUAPTNIRPdesuaPtoN=*0

desuaP=1

MSUAP elbairaVedoMesuaP >edom<=MSUAP5-*0

launaMeeS

GHCP galFgnignahCnoitisoPylnOdaeRGHCPTNIRP

GHCP,>rdda/lbl<RByranoitatS=*0

gnignahC.soP=1

TMFP elbairaVtamroFtnirP launaMeeS

MGP elbairaVedoMmargorPtixE/retnE>rdda<MGP

MGPretnE

tixE

MGP drowyeKmargorPeveirteR MGPTEG

EMP ecnanetniaMnoitisoPgalFelbasiD/elbanE

>1/0<=EMPdelbasiD=*0

delbanE=1

CCHMP tnerruCdloHecnanetniaMnoitisoPelbairaVegnahC

>tnecrep<=CCHMP %CHMot0

VMP yticoleVecnanetniaMnoitisoPelbairaV

>deeps<=VMP ces/stinum

SOP elbairaVnoitisoPsixA>noitisop±<=SOP

SOPTNIRPstinum

PACSOP pirTfoemiTtanoitisoPsixAelbairaV

PACSOPTNIRP

TNIRP noitcurtsnITNIRP launaMeeS

1TNIRP noitcurtsnI1MMOCXNYLotTNIRP launaMeeS

2TNIRP noitcurtsnI1MMOCXNYLotTNIRP launaMeeS

Page 87: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

85

yrammuSteSnoitcurtsnIXNYL

dnammoC noitpircseD egasU stinU/egnaR

TPMRP elbairaVretcarahCtpmorPyficepS >iicsa/rahc<=TPMRP 652-23

DEUQ galFXNYLeueuQ >1/0<=DEUQdelbasiD=*0

delbanE=1

OITAR elbairaVedoMoitaR >mun<=OITAR 2<ot2->

EOITAR galFelbanEedoMoitaR >1/0<=OITARdelbasiD=*0

delbanE=1

WOITAR elbairaVhtdiWesluPedoMoitaR >mun<=WOITARevaWerauqS=0

sn05=452-1stnemercnI

SER noitucexEmargorPemuseRnoitcurtsnI

SER

TER noitcurtsnIenituorbuSmorFnruteR TER

NUR noitcurtsnIksaTdnuorgkcaBnuR >rdda/lbl<NUR

EVAS noitcurtsnIevaS EVAS

RES elbairaVrebmuNlaireS RESTNIRP

TES noitcurtsnIgalFroelbairaVteS >lav<=>galf/rav<TES

WELS yticoleVtnatsnoCtarotoMehtwelSnoitcurtsnI

,>deeps±<WELS>edom<

etareleccA=0etareleccAt'noD=1

PTSS noitcurtsnIpotStfoS >edom<PTSSylnOnoitoM=0

.gorP&noitoM=1

LLATS galFdellatSsixAylnOdaeRLLATSTNIRP

LLATS,>rdda/lbl<RBdellatStoN=*0

dellatS=1

STATS drowyeKsutatSeveirteR STATSTNIRP

WPETS elbairaVhtdiWesluPkcolCpetS >mun<=WPETSevaWerauqS=0

sn05=452-1stnemercnI

KTS tluaFkcatSenituorbuSylnOdaeRgalF

KTSTNIRPKTS,>rdda/lbl<RB

tluaFoN=*0tluaF=1

EDLTS galFelbasiD/elbanEtceteDllatS >1/0<=EDLTSdelbasiD=*0

delbanE=1

MDLTS elbairaVedoMnoitceteDllatS >edom<=MDLTSrotoMpotS=*0

rotoMpotSt'noD=1

FLTS elbairaVrotcaFllatS >mun<=FLTS stinum

4IT-1IT selbairaVtupnInopirT launaMeeS

4EIT-1EIT sgalFelbasiD/elbanEtupnInopirT >1/0<=>x<EITdelbasiD=*0

delbanE=1

4PT-1PT selbairaVnoitisoPnopirT launaMeeS

4EPT-1EPT elbasiD/elbanEnoitisoPnopirTsgalF

>1/0<=>x<EPTdelbasiD=*0

delbanE=1

4TT-1TT selbairaVremiTnopirT launaMeeS

4ETT-1ETT sgalFelbasiD/elbanEremiTnopirT >1/0<=>x<ETTdelbasiD=*0

delbanE=1

4RTT-1RTT galFdaoleRremiTnopirT >1/0<=>x<RTTtaepeRt'noD=*0

taepeR=1

Page 88: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

86

yrammuSteSnoitcurtsnIXNYL

dnammoC noitpircseD egasU stinU/egnaR

VT elbairaVyticoleVnopirT launaMeeS

EVT elbasiD/elbanEyticoleVnopirTgalF

>1/0<=EVTdelbasiD=*0

delbanE=1

SGLFU sgalFdenifeD-resUtropeRdrowyeK

SGLFUTNIRPlabolG=etatS+G

lacoL=etatS+L

SLBLU margorPdenifeD-resUtropeRdrowyeKslebaL

SLBLUTNIRP sserddA+LBL

SRAVU selbairaVdenifeD-resUtropeRdrowyeK

SRAVUTNIRPlabolG=eulaV+G

lacoL=eulaV+L

RAV elbairaVdenifeD-resUeralceDnoitcurtsnI

>mun<=>eman<RAV.rahC8ot1

"_"+ciremunahplA

SRAV drowyeKselbairaVeveirteR,SRAVTEG,SRAVTNIRP

SRAVPI

GHCV galFgnignahCyticoleVylnOdaeRGHCVTNIRP

GHCV,>rdda/lbl<RBtnatsnoC.leV=*0

gnignahC.leV=1

LEV elbairaVyticoleVylnOdaeRLEVTNIRP

>mun<=LEV,>rdda/lbl<RB.ceS/stinUresU

REV noisreVerawtfoSylnOdaeRelbairaV

REVTNIRP launaMeeS

IV elbairaVyticoleVlaitinI >mun<=IV .ceS/stinUresU

MV elbairaVyticoleVmumixaM >mun<=MV .ceS/stinUresU

Page 89: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

87

Appendix B: Troubleshooting

Beg inn ing to Troub leshoot

In the event that your MicroLYNX System doesn’t operate properly the first stepis to identify whether the problem is electrical or mechanical in nature. The next

step is to isolate the system component that is causingthe problem. As part of this process you may have todisconnect the individual components that make upyour system and verify that they operate indepen-dently. It is important to document each step in thetroubleshooting process. You may need this docu-mentation to refer back to at a later date, or thesedetails will greatly assist one of our applicationengineers in determining the problem should youneed assistance.

Many of the problems that effect motion control systems can be traced to electricalnoise, software errors or mistakes in wiring.

Troub leshoot ing Commun icat ions

In the event that you are unable to establish communications with yourMicroLYNX, check the following:

1] Verify wiring and connections.

2] Verify that the “Upgrade” switch is in the “OFF” state.

3] Verify proper communications port selection by jumping pinsRX and TX on the 9 pin or 25 pin connector on the host PCand observing loop-back echo.

4] If using a laptop with an RS-232 to RS-422 converter, note thatsome laptops are unable to support the converter due to powerconstraints.

5] Verify that the terminal settings such as BAUD rate, data bitsand flow control are set to 8, N, 1.

Troub leshoot ing So f tware

The MicroLYNX features a FAULT LED and error codes that may give thesource of the error. It is a good rule of thumb to clear all programs (CP 1,1followed by SAVE), variables and flags (DVF), and restore the factory defaults (IP).You may then retransfer the program to the LYNX and attempt to run it again. Ifthe program still fails you can use the tracing functions of the EXEC command tofurther isolate the problem.

To assist you in troubleshooting errors, the FAULT LED on the MicroLYNX canbe enabled or disabled

Setting the FAULT flag to a TRUE (1) state will cause the LED to illuminate

Many of the problems that effect motion control systems can

be traced to electrical noise, software errors, or mistakes

in wiring!

Page 90: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

88

when a system error occurs.

Using the LED in conjunction with the Error Table, Appendix C of this docu-ment, as well as the following instructions can be used to identify and isolateerrors in your program.

P R I N T

ERROR - Gives the Code to reference against the error table (Appendix B).

ERR - Prints the Error Flag Status, if visibility of the FAULT LED is impaired.

ERRA - Prints the Error code and NVM location of the error occurrence.

POS - Prints the Motor Position in User Units.

CTR2 or CTR3 - Prints the count of clock in or out.

IO - Prints the states of the Inputs and Outputs.

IOS - Prints the I/O settings.

VARS -Prints all Variables.

E X E C

Trace Mode = 1 (Usage EXEC [Program Label], 1) - Program Code is printed toscreen as it is executed.

Single Step Mode = 2 (Usage EXEC [Program Label], 2) - Program Code isprinted to the screen one command at a time.

B R E A K

The break command specifies an address at which the program will run atnormal speed until it reaches the break. The user can then use the spacebar tosingle step the execution of program code.

O N E R

Subroutine can be run that stores the position upon time of error so that theerror can be better isolated.

Subroutine can also be run to print the error code.

I P

ALL or left blank - All variables, flags and I/O settings are initialized to factorydefaults.

VARS - Variables are initialized to factory defaults.

FLAGS - Flags are initialized to factory defaults.

IOS - I/O settings are initialized to factory defaults.

D V F

Blank - Delete all user-defined flags and variables

1, 2 - Delete only local user-defined variables

0, 2 - Delete all local user-defined flags and variables

Page 91: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

89

L I S T

Prints the programs that reside in program memory.

P A U S

Pauses execution of program.

E r r o r C o d e s

The error codes are subdivided into the following groups to help you identifythe type of error that is occurring:

1000 - Hardware Errors

2000 - I/O Errors

3000 - Clock Errors

4000 - Syntax Errors

5000 - Variable/Flag Errors

6000 - Motion Errors

7000 - Encoder Errors

8000 - NVM Errors

9000 - Out of Range Errors

Contact ing App l i cat ion Support

In the event that you are unable to isolate the problem with your MicroLYNXSystem, the first action you should take is to contact the distributor from whomyou originally purchased your MicroLYNX or IMS Application Support at 860-295-6102 or by fax at 860-295-6107.

If you call IMS, it is best that you first fax both a wiring diagram and either theprogram you wrote or the system flow chart. Be prepared to answer the follow-ing questions:

1] What is the application?

2] In detail, how is the system configured?

3] What external equipment is the system interfaced to?

Page 92: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

90

Appendix C: Error Table

0 NO ERROR

Hardware Errors

1018 IO MODULE NOT INSTALLED.1019 LYNX CHECK SUM INCORRECT.1100 FAULT/LIMIT DETECTED IN A CONNECTED DRIVE.1101 FAULT IN DRIVE 1.1102 FAULT IN DRIVE 2.1103 FAULT IN DRIVE 3.1105 DRIVE 1 FAULT AND TYPE CHANGED.1106 DRIVE 2 FAULT AND TYPE CHANGED.1107 DRIVE 3 FAULT AND TYPE CHANGED.1109 DRIVE 1 MSEL COULD NOT BE SET.1110 DRIVE 2 MSEL COULD NOT BE SET.1111 DRIVE 3 MSEL COULD NOT BE SET.1113 DRIVE 1 TYPE CHANGED, MSEL COULD NOT BE SET.1114 DRIVE 2 TYPE CHANGED, MSEL COULD NOT BE SET.1115 DRIVE 3 TYPE CHANGED, MSEL COULD NOT BE SET.1117 DRIVE 1 FAULT, MSEL COULD NOT BE SET.1118 DRIVE 2 FAULT, MSEL COULD NOT BE SET.1119 DRIVE 3 FAULT, MSEL COULD NOT BE SET.1121 DRIVE 1 FAULT, TYPE CHANGED, MSEL COULD NOT BE SET.1122 DRIVE 2 FAULT, TYPE CHANGED, MSEL COULD NOT BE SET.1123 DRIVE 3 FAULT, TYPE CHANGED, MSEL COULD NOT BE SET.1125 HOLD IGNORED, MOTOR DISABLED.1126 DRIVE 1 NOT AVAILABLE.1127 DRIVE 2 NOT AVAILABLE.1128 DRIVE 3 NOT AVAILABLE.1130 DRIVE 1 TYPE CHANGED.1131 DRIVE 2 TYPE CHANGED.1132 DRIVE 3 TYPE CHANGED.1134 ILLEGAL DRIVE NUMBER.1201 SELECTED ANALOG BOARD NOT INSTALLED.1202 ANALOG CHANNEL NUMBER NOT AVAILABLE.1204 ANALOG OPTION NOT INSTALLED.1205 ANALOG VALUE OUT OF RANGE, POSSIBLY DEFECTIVE BOARD.

I/O Errors

2001 FIOS FOUND NO (HOME) SWITCH.2002 NOT IN FACTORY MODE.2020 OUTPUT FAULT AT DIGITAL IO GROUP 20.2021 OUTPUT FAULT AT DIGITAL IO LINE 21.2022 OUTPUT FAULT AT DIGITAL IO LINE 22.2023 OUTPUT FAULT AT DIGITAL IO LINE 23.2024 OUTPUT FAULT AT DIGITAL IO LINE 24.2025 OUTPUT FAULT AT DIGITAL IO LINE 25.2026 OUTPUT FAULT AT DIGITAL IO LINE 26.2030 OUTPUT FAULT AT DIGITAL IO GROUP 30.2031 OUTPUT FAULT AT DIGITAL IO LINE 31.2032 OUTPUT FAULT AT DIGITAL IO LINE 32.2033 OUTPUT FAULT AT DIGITAL IO LINE 33.2034 OUTPUT FAULT AT DIGITAL IO LINE 34.2035 OUTPUT FAULT AT DIGITAL IO LINE 35.2036 OUTPUT FAULT AT DIGITAL IO LINE 36.2040 OUTPUT FAULT AT DIGITAL IO GROUP 40.

Page 93: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

91

2041 OUTPUT FAULT AT DIGITAL IO LINE 41.2042 OUTPUT FAULT AT DIGITAL IO LINE 42.2043 OUTPUT FAULT AT DIGITAL IO LINE 43.2044 OUTPUT FAULT AT DIGITAL IO LINE 44.2045 OUTPUT FAULT AT DIGITAL IO LINE 45.2046 OUTPUT FAULT AT DIGITAL IO LINE 46.2050 OUTPUT FAULT AT DIGITAL IO GROUP 50.2051 OUTPUT FAULT AT DIGITAL IO LINE 51.2052 OUTPUT FAULT AT DIGITAL IO LINE 52.2053 OUTPUT FAULT AT DIGITAL IO LINE 53.2054 OUTPUT FAULT AT DIGITAL IO LINE 54.2055 OUTPUT FAULT AT DIGITAL IO LINE 55.2056 OUTPUT FAULT AT DIGITAL IO LINE 56.2101 ANALOG RANGE NOT ALLOWED.2102 ANALOG DESTINATION/SOURCE NOT ALLOWED.2103 ANALOG DESTINATION/SOURCE ALREADY USED.2104 INVALID ANALOG CHANNEL NUMBER.2105 ANALOG LAW NOT ALLOWED.2106 CAN’T ENABLE JOYSTICK WHILE IN MOTION OR CAN’T EXEC MOTION CMD

WITH JOYSTICK ENABLED.2200 CAN ERRORS: 1-6,11-16,21-26,31-36.

Clock Errors

3001 TRIED TO SET CLK TO NON CLOCK LINE OR WRONG LINE.3002 CAN’T HAVE CLOCK TYPE APPLIED TO IT.3003 CAN’T HAVE RATIO AND NO_CLK.3004 CLK IO CAN’T BE SET FOR RATIO MODE.3005 IN HALF-AXIS MODE.3006 TRIED TO SET TO INPUT WHEN DRIVE CONNECTED.3007 NO IO SET FOR INPUT + RATIO.

Syntax Errors

4001 INVALID IO NUMBER.4002 TRIED TO WRITE GROUP TO NON-USER.4003 TRIED TO WRITE TO A NON-USER LINE.4004 TRIED TO WRITE TO AN INPUT.4005 TRIED TO SET AN OUTPUT ONLY TO INPUT.4006 TRIED TO SET AN INPUT ONLY TO OUTPUT.4007 TRIED TO SET LINE TYPE TO LINE THAT CAN’T BE SET THAT WAY.4008 NOT A VALID IO TYPE.4009 IO TYPE SW. PREVIOUSLY DEFINED.4010 FIND SW MUST BE SET AS INPUT.4011 MORE THAN ONE IO SET FOR RATIO INPUT.4012 ILLEGAL RUN/EXEC MODE.4013 RECEIVED UNACCEPTIBLE COMMAND.4014 ILLEGAL PAR IN “INPUT PAR” COMMAND.4015 LABEL HAS TO BE TEXT.4016 ILLEGAL DATA ENTERED IN PRINT FORMAT.4017 NO DATA ENTERED, COMMAND IGNORED.4018 ILLEGAL DRIVE NAME.4019 ADDRESS DOESN’T POINT TO VALID INSTRUCTION.4020 TRIED TO EXECUTE A BAD USER PROGRAM INSTRUCTION.4021 ILLEGAL LINE NUMBER.4022 MULTI LINE PRINTS NOT ALLOWED IN BINARY MODE.4023 ILLEGAL HOLD TYPE.4024 NOT ALLOWED IN IMMEDIATE MODE.

Page 94: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

92

4025 AN INPUT IS ALREADY PENDING.4026 SELECTED COMM, PORT2, CANNOT BE SEPARATELY SELECTED.4027 LINE NUMBER NOT NEEDED.

Var iab le/F lag Errors

5001 ILLEGAL VARIABLE ENTERED.5002 ILLEGAL FLAG ENTERED.5003 ILLEGAL FLAG OR VARIABLE ENTERED.5004 NO EQUAL IN: SET VARIABLE TO VALUE.5005 ILLEGAL CHARACTER FOLLOWS DECLARATION OF VARIABLE OR FLAG.5006 UNDEFINED USER VAR OR FLG.5007 TRIED TO REDEFINE LBL/VAR/FLG.5008 TRIED TO REDEFINE GBL/LCL LBL/VAR/FLG.5009 INSTRUCTION/VARIABLE/FLAG NOT IMPLEMENTED IN THIS VERSION.5010 VALUE OF LBL/VAR/FLG CHANGED - WARNING.5011 FLAG IS READ ONLY.5012 VARIABLE IS READ ONLY.5013 CAN ONLY INIT ALL, VARS, FLAGS.5016 CAN’T SET MULTI VARIABLES, READ ONLY.

Mot ion Errors

6001 REACHED PLUS LIMIT SW.6002 REACHED MINUS LIMIT SW.6003 TIME NEEDED TO MAKE MOVE LESS THAN 200USEC.6004 NO DISTANCE FOR MOVE.

Encoder Errors

7001 STALL DETECTED.7002 IMPROPER RATIO OF MUNIT TO EUNIT.7003 MOVED OUT OF DEADBAND.

NVM Errors

8001 LABEL AREA FULL.8002 SAVE FAILED.8003 TRIED TO TAKE FROM EMPTY STACK.8004 DATA NOT IN NVM.8005 TRIED TO OVER FILL FOREGROUND STACK.8006 TRIED TO SAVE WHILE MOTION IN PROGRESS.8007 TRIED TO OVER FILL BACKGROUND STACK.8008 BAD SECTOR IN PAGE 0 OF FLASH.8009 BAD SECTOR IN PAGE 1 OF FLASH.8010 BAD SECTOR IN PAGE 2 OF FLASH.8011 BAD SECTOR IN PAGE 3 OF FLASH.

Out O f Range Errors

9001 IO FILTER OUT OF RANGE.9002 IO GROUP OUT OF RANGE.9003 PROGRAM ADDRESS OUT OF RANGE.9004 RATIO OUT OF RANGE.9005 DATA OUT OF RANGE FOR VARIABLE.9006 PULSE WIDTH OUT OF RANGE.9007 TOO MANY DIGITS SPECIFIED IN PRINT FORMAT.9008 SUM OF ID AND FD EXCEEDS MAX NUMBER OF DIGITS.9009 VALUE MUST BE POSITIVE ONLY.

Page 95: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

93

9010 VM IS SET LESS THAN OR EQUAL TO VI.9011 VI IS SET BELOW MIN_VELOCITY.9012 MOVE DISTANCE TOO SHORT FOR PRESENT DECEL RATE.9013 JOG SPEED LESS THAN MIN_VELOCITY.9014 ANALOG INPUT NOT ALLOWED FOR DATA.9015 COMM PORT OUT OF RANGE.

Page 96: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

94

Page 97: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

T W E N T Y - F O U R M O N T H L I M I T E D W A R R A N T Y

Intelligent Motion Systems, Inc., warrants its products against defects in materials and work-manship for a period of 24 months from receipt by the end-user. During the warranty period, IMSwill either, at its option, repair or replace Products which prove to be defective.

E X C L U S I O N S

The above warranty shall not apply to defects resulting from: improper or inadequate handlingby customer; improper or inadequate customer wiring; unauthorized modification or misuse; oroperation outside of the electrical and/or environmental specifications for the Product.

O B T A I N I N G W A R R A N T Y S E R V I C E

To obtain warranty service, a returned material authorization number (RMA) must be obtainedfrom customer service at (860) 295-6102 before returning product for service. Customer shall prepayshipping charges for Products returned to IMS for warranty service and IMS shall pay for return ofProducts to customer. However, customer shall pay all shipping charges, duties and taxes for Prod-ucts returned to IMS from another country.

W A R R A N T Y L I M I T A T I O N S

IMS makes no other warranty, either expressed or implied, with respect to the Product. IMSspecifically disclaims the implied warranties of merchantability and fitness for a particular purpose.Some jurisdictions do not allow limitations on how long an implied warranty lasts, so the abovelimitation or exclusion may not apply to you. However, any implied warranty of merchantability orfitness is limited to the 24-month duration of this written warranty.

E X C L U S I V E R E M E D I E S

If your Product should fail during the warranty period, call customer service at (860) 295-6102to obtain a returned material authorization number (RMA) before returning product for service.Please include a written description of the problem along with contact name and address. Send failedproduct to: Intelligent Motion Systems, Inc., 370 N. Main St. Marlborough, Connecticut 06447. Alsoenclose information regarding the circumstances prior to Product failure.

Page 98: mlqr 02 15 2000 · 2008-08-11 · LYNX software component that may be set to a logic state to indicate status and enable/disable functions. Flags may be either system or user-defined

MicroLYNX Quick GuideMX-OM300-000V02.15.2000