3 reading and writing data in application tasks – Rockwell Automation 57C419 5V-24V DC Input Module User Manual

Page 19

Advertising
background image

4Ć3

If you are using AutoMax Version 3.0 or later, see the AutoMax

Programming Executive (JĆ3750) for information about configuring

variables.

4.3

Reading And Writing Data In Application

Tasks

In order for an input module to be referenced by application

software, it is necessary to assign symbolic names to the physical

hardware. In AutoMax Version 2.1 and earlier, this is accomplished by

either IODEF or RIODEF statements in the configuration task. In

AutoMax Version 3.0 and later, you assign variable name using the

Programming Executive.
Each application program that references the symbolic names

assigned to the module must declare those names COMMON.
The frequency with which tasks read their inputs and write their

outputs depends on the language being used. Ladder logic and

Control Block tasks read inputs once at the beginning of each scan

and write outputs once at the end of scan. BASIC statements in

BASIC tasks or Control Block tasks read an input and write an output

for each reference throughout the scan.

4.3.1

Ladder Logic Task Example

run

STARTPB

1050

run

LIGHT

The symbolic names LIGHT and STARTPB reference the input

modules that were defined in the rack configuration. The trailing at

symbol @" is not used in Ladder Logic tasks. The symbolic name

run" is local to the Ladder Logic task and does not have I/O

associated with it.

4.3.2

BASIC Task Example

1000

COMMONLIGHT@

\!Fault Light

1010

COMMONSTARTPB@

\!Start PushĆbutton

2000

LOCAL RUN@

\!Line run

3000

!

4000

!

5000

RUN@ = NOT LIGHT@ AND &

( STARTPB@ OR RUN@)

5500

!

6000

END

The symbolic names LIGHT@ and STARTPB@ reference the input

modules that were defined in the rack configuration. The symbolic

name RUN@ is local to the BASIC task and does not have I/O

associated with it.

Advertising