Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 4 of 9

Analog Output Module User Manual (Cat. No. 1771-OFE Series B), pages 31 to 40

Pages 31 to 40 of 84

The original document is the PDF (555 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Allen-Bradley 1771-OFE1

Page 31

3-5

Some examples of how to determine the value of the data word needed to produce the desired output voltage or current follow: Example 1 Output Range Data Format Desired Output D I/Bit

4-20mA BCD (0-4095) 9.5mA 0.0039mA/Bit (from Table 3.B)

Remember, 4mA corresponds to scale minimum (9.5mA Ć 4mA) 0.0039mA/Bit

@ 1410 (decimal) = 0001 0100 0001 0000 (BCD)

You would enter 1410 (BCD) or 0001 0100 0001 0000 into the data word in order to get an output of 9.5 mA. Example 2 Output Range Data Format Desired Output D I/Bit 9.0V 2.44mV/Bit

0-10V 12Ćbit binary (0-FFF) 9.0V 2.44mV/Bit (from Table 3.B) @ 3689 (decimal) = 0000 1110 0110 1001 (binary)

You would enter 0000 1110 0110 1001 into the data word to get an output of 9.0V. These values are loaded into the module’s memory, from the processor, with a block transfer write. Important:

If you are using BCD data format, you must download values to the module in the BCD format and set the corresponding data polarity bit (see Figure 3.1) if a negative output is desired.

Important:

If the binary data format is selected, data can be downloaded in a binary or 2’s complement binary data format. If binary is used, the appropriate data polarity bit must be set to express a negative value. The 2’s complement format expresses a negative value via the bit pattern.

If the processor input information governs the module’s outputs, remember that data written to the output module must fall within certain limits. Both BCD and binary data must fall within the range +9999. You can use the negative ranges by setting the “negative data” bits in word 5 of the BTW.

Publication 1771-6.5.30 - November 1998

Page 32

3-6

Scaling

Scaling is the conversion of unscaled data to engineering units--such as gallons/minute, degrees centigrade, and pounds/square inch. You can use the scaling feature to send the data for each channel to the module in an optional scaled value representing actual engineering units. This value is scaled by the module to a proportional binary value before it is used by the corresponding channel. The resolution of this data is one part in 4095. The scaling feature is implemented by entering scaling values in the data format selected in words 6 through 13 of the BTW.

Scaling Value Polarity Bits 04 to 11 (04 to 13 octal) of the configuration word (word 5) in the write block designate positive or negative scaling values (Figure 3.2). By setting the appropriate negative scaling bit in word 5, you can scale negative data or enable a negative scaling value. The sign bits are ignored if a corresponding channel is not scaled. Figure 3.2 Location of Scaling Value Polarity Bits in the Block Transfer Write Configuration Word Word/Dec. Bit

15

14

13

12

11

10

09

08

07

06

05

04

03

02

01

00

Word/Octal Bit

17

16

15

14

13

12

11

10

07

06

05

04

03

02

01

00

-

-

-

-

Maximum and Minimum Scaling Values Words 6-13 of the write block transfer contain maximum and minimum scaling values for each channel. Word 6 corresponds to Channel 1 scale minimum, word 7 to Channel 1 scale maximum, word 8 to Channel 2 scale minimum, and so on (Figure 3.3). The maximum and minimum scaling values are the upper and lower limits for output data. The module’s microprocessor reads these values and automatically scales output data from the write block transfer.

-

Page 33

3-7

The largest value that you can enter for a maximum scaling value is 9999. The smallest value you can enter for a minimum scaling value is -9999 (the minus sign is implemented by setting the appropriate bit in the configuration word). Important:

The maximum scale value must be larger than the minimum scale value. If not, block transfers continue but data is not acknowledged by the module’s microprocessor. Outputs remain in their last state before the fault.

Even if you scale fewer than four channels, a full 13-word block transfer is performed. When scaling, all scaling information must be entered into the data table using the same format that the module sends to the data table. If Module is configured for:

Then enter scaling values in:

BCD format

BCD

2's complement Signed Magnitude Binary

Important:

Binary

PLC-2 users should always use BCD format because the PLC-2 processor performs math functions using BCD data. The PLC-3, PLC-5 and PLC-5/250 use integer math, you should use 2”s complement binary for any data that will be used with math instructions (including PID and CAR routines). BCD format is usually reserved for display purposes only.

Figure 3.3 Location of Maximum and Minimum Scaling Values in the Write File Word

Description

1

Channel 1 Data Value

2

Channel 2 Data Value

3

Channel 3 Data Value

4

Channel 4 Data Value

5

Configuration Word

6

Channel 1 Minimum Scaling Value

7

Channel 1 Maximum Scaling Value

8

Channel 2 Minimum Scaling Value

9

Channel 2 Maximum Scaling Value

10

Channel 3 Minimum Scaling Value

11

Channel 3 Maximum Scaling Value

12

Channel 4 Minimum Scaling Value

13

Channel 4 Maximum Scaling Value

Publication 1771-6.5.30 - November 1998

Page 34

3-8

If you do not wish to scale a particular channel, set the scaling values as shown below. If your range is:

Set Maximum Scaling Value to:

Set Minimum Scaling Value to:

4095

0000

4095

Ć40951

4-20mA 1-5V 0-10V +10 to Ć10V

1 This also requires you to set the appropriate sign bit in the configuration word for the minimum scaling value.

For example, suppose you choose the 1 to 5 volt range and BCD data format for your module. You have a thermocouple input that reports a temperature between 100oC and 900oC back to your processor. You would like this input temperature scale to correspond to an output meter scale. You would enter the following minimum and maximum scaling values into Words 6 and 7 of the write block: Meter Scale Value

Scaled Value

Output Voltage

Unscaled Value (BCD)

Meterscale 100%

900oC

5.0V

4095

700oC

4.0V

3072

Example: Word 6 = 0100 Word 7 = 0900

500oC

3.0V

2048

Example: Meterscale 31% Meterscale 25%

350oC 300oC

2.25V 2.0V

1280 1024

Meterscale 0%

100oC

1.0V

0

If the processor sends a data value to the module that corresponds to 350oC, the value is scaled to the 100oC to 900oC range and the corresponding output voltage for that channel is 2.25 volts, which would position the scale accordingly at 31% of full scale.

Publication 1771-6.5.30 - November 1998

Page 35

3-9

Procedure for Configuring Your Module

Now that we have explained the purpose and function of each word in the block transfer write block, you should be ready to enter configuration data. Consult your programming manuals for the proper techniques required to set up block transfer instructions with your programmable controller. Refer to chapter 4 for example programs. Important:

Chapter Summary

A block transfer write length of 0 will result in a default length of 13. A block transfer read length of 0 will result in a default length of 5.

In this chapter, you learned how to configure your module using a block transfer write instruction.

Page 36 read from a scan by OCR; it may hold reading errors

3-10

Publication 1771-6.5.30 - November 1998

Page 37

- What This Chapter Contains

Block Transfer with the Analog Output Module

In this chapter you will read about: For information on

See page

/#,"

('%1

('%1

('%1

2

If you have used other intelligent I/O modules, you may be familiar with bidirectional block transfer programming. Bidirectional block transfer is the sequential performance of both read and write operations. Typically, in previous bidirectional block transfer modules, the enable bits of both read and write instructions could be set ON at the same time. Although the module can perform both read and write operations, the module does not allow the enable bit of both read and write instructions to be set ON at the same time. Your program must toggle requests for the read and write instructions as shown in our sample programs.

! Block Transfer Programming Formats

ATTENTION: At no time should both the read and write instructions be enabled. Undesirable data could transfer resulting in unpredictable machine operation.

In order for the processor to exchange data with the output module, you must include block transfer read and write instructions in your program. The types of programming formats available for block transfer are block format and multiple GET instructions. You can program most processors that use the 1771 I/O structure with block format instructions. Exceptions are the Mini-PLC-2 (cat. no. 1772-LN3) and PLC-2/20 (cat. no. 1772-LP1, -LP2) processors; they use the multiple GET instructions. Refer to Appendix B for information on block transfer with the Mini-PLC-2 and the PLC-2/20. There are three types of block format instructions--one each for the PLC-2, PLC-3, and PLC-5 processors. Each is described in the paragraphs that follow.

2

Page 38

4-2

Block Transfer Programming Ć PLC-2 Family Processors Only

Output data is transferred from the processor’s data table to the module with a write block transfer. Diagnostic information is transferred from the module to the processor’s data table with a read block transfer. In order for these transfers to take place, you must enter certain parameters into your block transfer instructions. A sample program segment with block transfer read and write is shown in Figure 4.1 and described in the following paragraphs. An example program with block transfer instructions is shown in Figure 4.2. A data table map (Table 4.A) and a data table word assignment (Table 4.B) are also shown. Figure 4.3 shows how the binary representation of configuration options is represented in BCD (as it appears in our data table map).

Program Action

Figure 4.1 PLC-2 Family Sample Program Structure

At powerĆup, the program performs a write block transfer that configures the module. When the first write block transfer is complete, the program toggles between read and write block transfers. The program takes into account that the read and write request bits cannot be set simultaneously. Upon completion of a successful read block transfer, data from the module is moved from the buffer file (block transfer read file) to a storage data file. This prevents the processor from using invalid data should block transfer communications fail. Rungs 1 and 2 The first two rungs of the sample program segment toggle requests for the read and write instructions. Notice that the EXAMINE ON instructions in Rungs 1 and 2 are the done bits of the read and write instructions. By latching or unlatching a storage bit, the write done bit (XXX/X6) triggers the read block transfer instruction and the read done bit (XXX/X7) triggers the write block transfer instruction. Rung 3 The write block transfer instruction in Rung 3 sends configuration, output, and scaling data to the module from the processor in one program scan. Rung 4 The read block transfer instruction in Rung 4 sends module status information and a copy of the output data to the processor from the module in one program scan. Rung 5 When a read block transfer has been successfully completed, its done bit (Bit XXX/X7) is set. When the done bit is set, it enables the fileĆtoĆfile move instruction. The read block transfer data file (buffer) is then moved into a storage data file. This prevents the processor from transmitting invalid data should a block transfer communication fault occur.

Publication 1771-6.5.30 - November 1998

1

2

3

4

5

Write Block Transfer Done Bit

Storage Bit L

Read Block Transfer Done Bit

Storage Bit U

Storage Bit

Storage Bit

BLOCK XFER WRITE Data Address: Module Address: Block Length: File:

xxx RGS 00 xxx-xxx

BLOCK XFER READ Data Address: Module Address: Block Length: File:

xxx RGS 00 xxx-xxx

Read Block Transfer Done Bit FILE TO FILE MOVE Counter Address: Position: File Length: File A: File R: Rate per Scan:

xxx xxx xxx xxx-xxx xxx-xxx xxx

Enable EN 16 Done DN 16 Enable EN 17 Done DN 17 Enable EN 17 Done DN 15

Page 39

4-3

PLC-2 Family Example Program Module Location

Rack 1, Module Group 0, Slot 1

T/C Addresses

030 for Block Transfer Write 031 for Block Transfer Read

BTW File (Configuration file)

0200-0214

BTR File (Buffer file)

0300-0304

Output Data File

0400-0404

Storage Bit

050/00

BTW Done Bit

110/16

BTR Done Bit

110-17

Module Configuration

1771-OFE1 (Voltage Version)

Voltage Range

1 to 5V

Data Format

BCD

Scaling Parameters

Channels 1 and 2 = No scaling Channel 3 = Ć20 to 275 Channel 4 = 100 to 500

Figure 4.2 PLC-2 Family Example Program START 110

LADDER DIAGRAM

BLOCK XFER WRITE Data Address: Module Address: Block Length: File:

030 101 00 200-277

BLOCK XFER READ Data Address: Module Address: Block Length: File:

031 101 00 300-377

050 L 00 050 U 00 010 EN 16 110 DN 16 010 EN 17 110 DN 17

FILE TO FILE MOVE Counter Address: Position: File Length: File A: File R: Rate per Scan:

040 001 005 300-304 400-404 005

040 EN 17 040 DN 15

16 110 17 050 00

050 00

110 17

Publication 1771-6.5.30 - November 1998

Page 40

4-4

Table 4.A Data Table Map Allen-Bradley Programmable Controller Data Table MAP (128Ćword) PROJECT NAMEOFE

Data Table–Write Block

DESIGNER

PROCESSOR

00 01 02 03 04 05 06 07 10 11 12 13 14 15 16 17 20 21 22 23 24 25 26 27 30 31 32 33 34 35 36 37 40 41 42 43 44 45 46 47 50 51 52 53 54 55 56 57 60 61 62 63 64 65 66 67 70 71 72 73

PLC-2 Family STARTING WORD ADDRESS 00

BIT NUMBER 2

OF TO

DATA TABLE SIZE STARTING WORD ADDRESS 00

17

PAGE ADDRESS

10 07

5 Words-No Scaling

13 words-With Scaling

Publication 1771-6.5.30 - November 1998

00

DESCRIPTION

BIT NUMBER 3

Configuration Data (BTW)

17

10 07

00

00 01 02 03 04 05 06 07 10 11

Buffer Area BTR

STARTING WORD ADDRESS 00 BIT NUMBER 17 4

00 01 02 03 04 05 06 07 10 11 12 13 14 15 16 17 20 21 22 23 24 25 26 27 30 31 32 33 34 35 36 37 40 41 42 43 44 45 46 47 50 51 52 53

DESCRIPTION

10 07

00

DESCRIPTION Input Data File FFM

11157