beautypg.com

Sample programs for flex integra analog modules, Plc-3 programming – Rockwell Automation 1793-OE2S FLEX INTEGRA ANALOG MOD User Manual

Page 24

background image

Publication 1793-6.5.1 - April 1999

3-2

Module Programming

Sample programs for FLEX
Integra Analog Modules

The following sample programs show you how to use your analog module
efficiently when operating with a programmable controller.

These programs show you how to:

• configure the module

• read data from the module

• update the module’s output channels (if used)

These programs illustrate the minimum programming required for
communication to take place.

PLC-3 Programming

Block transfer instructions with the PLC-3 processor use one binary file in a
data table section for module location and other related data. This is the
block transfer control file. The block transfer data file stores data that you
want transferred to your module (when programming a block transfer write)
or from your module (when programming a block transfer read). The
address of the block transfer data files are stored in the block transfer
control file.

The same block transfer control file is used for both the read and write
instructions for your module.
A different block transfer control file is
required for every module.

A sample program segment with block transfer instructions is shown in
Figure 3.1, and described below.

Figure 3.1
PLC-3 Family Sample Program Structure for a 1793-IE4 Module

EN

BTR

EN

BTW

DN

B3:0

05

ER

Enable

Done

Error

12

15

13

Enable

Done

Error

02

05

03

1

2

DN

ER

B3:0

15

Program Action

B4:8

15

Pushbutton

Power-up Bit

1

1

Power-up bit included in Series B modules only.

At power-up in RUN mode, or when the
processor is switched from PROG to RUN,
the user program enables a block transfer
read. Then it initiates a block transfer write
to configure the module if the power - up bit
is set.

Thereafter, the program continuously
performs read block transfers.

Note: You must create the data file
for the block transfers before you
enter the block transfer instructions.

The pushbutton allows the user to
manually request a block transfer write to
configure the module.

Block Transfer

Read Done Bit

Block Transfer
Write Done Bit

BLOCK XFER READ
RACK:

7

GROUP:

0

MODULE:

0

CONTROL:

#B3:0

DATA FILE:

#B4:0

LENGTH:

9

BLOCK XFER WRITE
RACK:

7

GROUP:

0

MODULE:

0

CONTROL:

#B3:0

DATA FILE:

#B5:0

LENGTH:

1