Appendixes – 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 405

Advertising
background image

Application Examples • Thermoformer Application

383

Publication 1398-PM601A-EN-P — October 2000

APPENDIXES

ASSIGN SPEED

G3

;Move speed

ASSIGN ALPHA

G4

;Acceleration

ASSIGN TIME

G5

;Dwell time

ASSIGN OUT_LEN

G8

;Anticipation output length

ASSIGN REL_LEN

V31

;Output length relative to start of move

ASSIGN SCREEN

V34

;Current operator terminal screen

ASSIGN STATE

V35

;State of the control

ASSIGN TEMP_CNT

V38

;Temporary counter used for batch count

ASSIGN READY

I10

;I10 is the Ready input

ASSIGN ANTICIPATE

O2

;O2 is the Anticipate output

ASSIGN CUT

O3

;O3 is the Cut output

ASSIGN BATCH_CMPLT O4

;O4 is the Batch complete output

;

;Scanned event S1 turns the anticipate output on when

the position

;command exceeds the relative output length

S1:IF @PCMD > REL_LEN ANTICIPATE=ON

;

;This X1 key routine is used for operator entry of

; two different parameters for the thermoformer

; operation. The actual print and read statements

; used are determined by the variable SCREEN, which

; indicates which menu the operator interface is

; displaying.

X1:

;X1 key program

CLEAR 1

;Clear the operator terminal screen line 1

;Determine which menu is currently displayed

ON SCREEN JMP X1_0,X1_1,X1E

X1_0:

;If screen = 0 read new length

READ 1,4 "^D0LENGTH^D1 " ,SHOW LENGTH,7,3(0,999)

PRINT 1,1 "X1:LENGTH " ,LENGTH,7,3

JMP X1E

X1_1:

;If screen = 1 read new accel

READ 1,4 "^D0ACCEL^D1 " ,SHOW ALPHA,4,0(0,9999)

PRINT 1,1 "X1:ACCEL " ,ALPHA,4,0

ACCEL=ALPHA

;Update accel used for move

X1E:

XEND

;End of X1 key program

;

;The X2 key routine is similar to X1 for different

; variables.

X2:

;X2 key program

CLEAR 2

;Clear operator terminal line 2

;Determine which menu is currently displayed

ON SCREEN JMP X2_0,X2_1,X2E

X2_0:

;If screen = 0 read new speed

READ 2,4 "^D0SPEED^D1 " ,SHOW SPEED,4,0(0,9999)

PRINT 2,1 "X2:SPEED " ,SPEED,4,0

JMP X2E

X2_1:

;If screen = 1 read new dwell

READ 2,4 "^D0DWELL^D1 " ,SHOW TIME,6,3(0,99)

PRINT 2,1 "X2:DWELL " ,TIME,6,3

X2E:

XEND

;End of X2 key program

;

;The X3 key routine is similar to X1 for different

; variables.

X3:

;X3 key program

CLEAR 3

;Clear operator terminal line 3

;Determine which menu is currently displayed

ON SCREEN JMP X3_0,X3_1,X3E

X3_0:

;If screen = 0 read new count

Advertising