0 programming, 1 register organization, 2 configuration – Rockwell Automation 57C415 24V AC/DC Input Module User Manual

Page 15: 3 reading data in application tasks

Advertising
background image

4Ć1

4.0 PROGRAMMING

This section describes how data is organized in the module and

provides examples of how the module is accessed by the application

software. For more detailed information, refer to the AutoMax

Enhanced BASIC Language Instruction Manual (JĆ3675).

4.1

Register Organization

The data in the module is organized as one 16 bit register. The

software allows you to define the module as a single register (up to

16 bits) by referencing the entire module as a unit, or as up to 16

individual bits by treating each of the bits separately. Refer to figure

4.1.

register 0

R R R R R R R R R R R R R R R R

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

Figure 4.1Ć Organization of Register Bits

4.2

Configuration

Before any application programs can be written, it is necessary to

configure, or set, the definitions of systemĆwide variables, i.e. those

that must be globally accessible to all tasks.
For DCS 5000 and AutoMax Version 2.1 and earlier, you define

systemĆwide variables by writing a Configuration task. For AutoMax

Version 3.0 and later, you define systemĆwide variables using the

AutoMax Programming Executive. After these variables are defined,

you can generate the configuration file automatically, which

eliminates the requirement to write a configuration task for the rack. If

you are using AutoMax Version 2.1 or earlier, refer to Appendix E for

examples that show how to define variables in the configuration task.

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 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. This is accomplished by either IODEF or RIODEF

statements in the configuration task.
Each application program that references the symbolic names

assigned to the input module in configuration 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 tasks read an input

and write an output for each reference throughout the scan.

Advertising