Syntax changes to version 2.0 from version 1.xx, Define home (dh), Print and read – Rockwell Automation 1398-PDM-xxx IQ Master Version 3.2.4 for IA-2000 and IQ-5000 Positioning Drive Modules, IQ-55 User Manual

Page 434: Gearen, Loop, Appendixes

Advertising
background image

412

What’s New in Each Version • New Features

Publication 1398-PM601A-EN-P — October 2000

APPENDIXES

JACCEL = 100

JDECEL = V1

Many other parameters, system variables, and system flags have been added to the programming
language. Refer to the Help menu or the Version 2 IQ manual for a complete list of programming
language statements.

Syntax Changes to Version 2.0 from Version 1.xx

Define Home (DH)

The Define Home statement, DH, cannot specify a position. DH can only be used to define the present
position as Home (0). A new statement, DP = position, has been added to allow the present position to
be redefined. The new position may be a constant or a variable. Both DH & DP reset POS2 to zero.

DH

;define present position as home (position 0)

DP = 2.5;define present position as position 2.5

DP = V1;define present position as the position defined

;by the contents of V1

PRINT and READ

All PRINT and READ statements must have a comma before a variable name:

PRINT 1,2 "distance = " ,G17,5,2;PRINT "The answer is :" ,V1

READ 2,4 "Enter distance " ,V23;READ "Enter distance " ,SHOW G8

PRINT and READ statements that print a variable value will now always print the fractional portion as
a decimal with the specified precision (or default of 2 decimal places if precision is not specified). A
new option has been added to allow printing as a fraction if desired--add “,F” after precision. If preci-
sion is zero and “,F” is specified, the fractional portion will always be displayed as a fraction even if it
can be displayed accurately as a decimal (for example 1/100). If precision is 1 to 4 and “,F” is specified,
the fractional portion will be displayed as a decimal if accuracy allows or else it will be displayed as a
fraction.

The complete syntax for the PRINT and READ statements is:

PRINT [#n] [row,column] ["text"] [,variable] [,field,precision[,F]]
READ [#n] [row,column] ["text"] , [SHOW] variable [,field,precision[,F]] [(min,max)]

GEAREN

The Gear enable statement, GEAR ON or GEAR OFF, must be changed to GEAREN ON or GEAREN
OFF. The statement to set a gear ratio does not change:

GEAREN ON

GEAREN OFF

GEAR = 2.5

LOOP

The LOOP statement cannot have a loop name, only a count. The RPT statement cannot be followed by
a name as well. Loops may be nested--the RPT statement will refer to the first LOOP statement preced-
ing it.

LOOP 100

LOOP V1

RPT

The variables for capturing positions on occurrence of an index pulse have changed. The variable IXP1
(POS1 captured on index 1) has been changed to IX1P1. IXP2 (POS2 on index 2) is now IX2P2.

G2 = IX1P1

The values for the OTMON variable have been incremented by one. (OTMON is used to automatically
display system variables on the Operator Terminal screen.) For example, OTMON=1 was used to dis-
play POSN. Now, OTMON=2 is used to display POSN. OTMON=255 was used to clear the top line of
the Operator Terminal (the monitor line)--now OTMON=0 must be used to clear the monitor line.

IF OTMON = 3 OTMON = 0 ELSE OTMON = 3

Advertising