Appendix c – Rockwell Automation AutoMax Enhanced Ladder Editor User Manual

Page 77

Advertising
background image

CĆ1

Appendix C

Using the PreĆDefined (Reserved) Ladder

Language Variables

The Editor contains preĆdefined variables that you can use in an individual

ladder program to:
D execute logic based on a Processor scan
D specify how to handle error conditions
D check scan time execution
The preĆdefined ladder language variables are local variables, which you can

use for ladder instruction parameters. Their names are reserved and appear in

the choices offered by the Variable Smart Matching option.
Using the PreĆDefined Program Scan Variables
Use the following Boolean variables to execute logic based on the Processor's

scan. Only use these variables for input parameters (readĆonly):

D first_scan

Use this variable to execute logic during a program's

first scan. This variable is true during the initial scan

of the ladder rung and false during all other scans.

D second_scan

Use this variable to execute logic during a program's

second scan. This variable is true during the second

scan of the ladder rung and false during all others.

D last_scan

Use this variable to execute logic during a program's

last scan. This variable is true on the final pass of the

ladder rung after you have selected TASK STOP. This

variable is not set when a STOP ALL error occurs.
To use the last_scan variable, your program scan

must be less than 0.5 seconds.
I

MPORTANT

Do not use the last_scan variable in an eventĆdriven

program. Because these programs are based on the

occurrence of an event, the last_scan variable may

never be executed when used in an eventĆdriven

program.

Advertising