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

The text of a manual · part 11 of 29

1772 Mini PLC-2/05 Processor (Cat. No. 1772-LS, LSP) Programming and Operations Manual, pages 101 to 110

Pages 101 to 110 of 289

The original document is the PDF (1.4 MB). 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 1772-LSP

Page 101

Chapter 10 Math Instructions

9.

Enter <data> if appropriate.

10. Press -[G]-. 11. Enter <address>. 12. Enter <data> if appropriate. 13. Close the rung. Press [SHIFT][EAF]. 14. Enter the appropriate function number 15. Enter <data address>. 16. Enter <result address>. Optional Ladder Diagram Keystrokes: You enter the instructions for an alternate ladder diagram to monitor an addition, subtraction, multiplication, or division operation by performing the following groups of steps. The first group of steps you perform enters the branch for term C. 1.

Open the rung. Press the branch start key [ ].

2.

Press -[G]-.

3.

Enter <address>.

4.

Enter <data> if appropriate.

5.

Press -[G]-.

6.

Enter <address>.

7.

Enter <data> if appropriate.

8.

Press -[G]-.

9.

Enter <address>.

10. Enter <data> if appropriate. 11. Press -[G]-. 12. Enter <address>. 13. Enter <data> if appropriate. The second group of steps you perform enters the branch for term A. 10-13

Page 102

Chapter 10 Math Instructions

1.

Press the branch start key [ ].

2.

Press -[G]-.

3.

Enter <address>.

4.

Enter <data> if appropriate.

5.

Press -[G]-.

6.

Enter <address>.

7.

Enter <data> if appropriate.

8.

Press -[G]-.

9.

Enter <address>.

10. Enter <data> if appropriate. 11. Press -[G]-. 12. Enter <address>. 13. Enter <data> if appropriate. The third group of steps you perform enters the branch for term B. 1.

Press the branch start key [ ].

2.

Press -[G]-.

3.

Enter <address>.

4.

Enter <data> if appropriate.

5.

Press -[G]-.

6.

Enter <address>.

7.

Enter <data> if appropriate.

8.

Press -[G]-.

9.

Enter <address>.

10. Enter <data> if appropriate. 11. Press -[G]-. 12. Enter <address>. 10-14

Page 103

Chapter 10 Math Instructions

13. Enter <data> if appropriate. 14. Close the branches. Press the branch end key [ ]. 15. Complete the rung. Press [SHIFT][EAF]. 16. Enter the appropriate function number (Table 10.C). 17. Enter <data address>. 18. Enter <result address>. Editing a Completed Rung Operands A, B and Result: Follow the editing procedures for a Get instruction. EAF Instruction: You can edit an EAF instruction to change an address or the function by performing the following steps. 1.

Press [SHIFT][EAF].

2.

Enter the appropriate function number (Table 10.C).

3.

Enter <data address>.

4.

Enter <result address>.

Square Root You must decide whether or not to enter a data address. If you choose to enter a data address, the processor seeks its data at that address in the data table. If you choose not to enter a data address and use the default number (010), the processor seeks its data from the instructions in the rung. The primary ladder diagram that enables the processor to execute an EAF square root instruction is shown in Figure 10.5. You can monitor the values of an expanded math square root operation using the optional ladder diagram shown in Figure 10.6. Figure 10.5 Primary Ladder Diagram for EAF Square Root 050 051 052 053 G G G G 000 625 000 000

Start Executive Aux Function Function Number: Data Addr: Result Addr:

05 010 060

10-15

Page 104

Chapter 10 Math Instructions

Figure 10.6 Optional Ladder Diagram for EAF Square Root 060 G 000 050 G 000

061 G 625 051 G 625

062 G 000 052 G 000

063 G 000 053 G 000

Start Executive Aux Function Function Number: Data Addr: Result Addr:

05 010 060

Only the six most significant digits are taken for a square root. The result is displayed in the result address words. Primary Ladder Diagram Keystrokes: You enter the instructions for the primary ladder diagram to execute a square root operation by performing the following steps. 1.

Press -[G]-.

2.

Enter <address>.

3.

Enter <data> if appropriate.

4.

Press -[G]-.

5.

Enter <address>.

6.

Enter <data> if appropriate.

7.

Press -[G]-.

8.

Enter <address>.

9.

Enter <data> if appropriate.

10. Press -[G]-. 11. Enter <address>. 12. Enter <data> if appropriate. 13. Close the rung. Press [SHIFT][EAF]. 14. Enter 05 (function number). 15. Enter 010 (data address). 16. Enter <result address>. Optional Ladder Diagram Keystrokes: You enter the instructions for an optional ladder diagram to 10-16

Page 105

Chapter 10 Math Instructions execute and monitor an square root operation by performing the following steps. The first group of steps you perform enters the branch for the result. 1.

Open the rung. Press the branch start key [ ].

2.

Press -[G]-.

3.

Enter <address>.

4.

Enter <data> if appropriate.

5.

Press -[G]-.

6.

Enter <address>.

7.

Enter <data> if appropriate.

8.

Press -[G]-.

9.

Enter <address>.

10. Enter <data> if appropriate. 11. Press -[G]-. 12. Enter <address>. 13. Enter <data> if appropriate. The second group of steps you perform enters the branch for the number taken for a root. 1.

Press the branch start key [ ].

2.

Press -[G]-.

3.

Enter <address>.

4.

Enter <data> if appropriate.

5.

Press -[G]-.

6.

Enter <address>.

7.

Enter <data> if appropriate.

8.

Press -[G]-.

9.

Enter <address>. 10-17

Page 106

Chapter 10 Math Instructions

10. Enter <data> if appropriate. 11. Press -[G]-. 12. Enter <address>. 13. Enter <data> if appropriate. 14. Close the branches. Press the branch end key [ ]. 15. Close the rung. Press [SHIFT][EAF]. 16. Enter 05 (function number). 17. Enter 010 (data address). 18. Enter <result address>. Editing a Completed Rung Operand and Result: Follow the editing procedures for a Get instruction. EAF Instruction: You can edit a square root operation to change an address by performing the following steps. 1.

Press [SHIFT][EAF].

2.

Enter 05 (function number).

3.

Enter 010 (data address).

4.

Enter <result address>.

BCD to Binary You must decide whether or not to enter a data address. If you choose to enter a data address, the processor seeks the conversion number at that address in the data table. If you choose not to enter a data address and use the default number (010), the processor seeks its conversion number from the instructions in the rung. The ladder diagram that enables the processor to perform a BCD to Binary conversion is shown in Figure 10.7. The default number is used as the data address.

10-18

Page 107

Chapter 10 Math Instructions

Figure 10.7 Optional ladder diagram for BCD to Binary Conversion 060 G 2DE 050 G 000

Start

051 G 734

Executive Aux Function Function Number: Data Addr: Result Addr:

13 010 060

If the operand is greater than (+) 32 767, the result 7FFFh is displayed. If the operand is more negative than (-) 32 767, the result 8001 is displayed at the result address. All negative values are stored as 2’s complement. Keystrokes: You enter instructions to perform a BCD to Binary EAF conversion by performing the following steps. The first group of steps you perform enters the branch for the result (term F). 1.

Open the rung. Press the branch start key [ ].

2.

Press -[G]-.

3.

Enter <address>.

4.

Enter <data> if appropriate.

The second group of steps you perform enters the branch for the conversion number (term E). 1.

Press the branch start key [ ].

2.

Press -[G]-.

3.

Enter <address>.

4.

Enter <data> if appropriate.

5.

Press -[G]-.

6.

Enter <address>.

7.

Enter <data> if appropriate.

8.

Close the branches. press the branch end key [ ].

9.

Close the rung. Press [SHIFT][EAF]. 10-19

Page 108

Chapter 10 Math Instructions

10. Enter 13 (function number). 11. Enter 010 (default number). 12. Enter <result address>. Editing a Completed Rung Operand and Result: Follow the editing procedures for a Get instruction. EAF Instruction: You can edit a conversion operation to change an address by performing the following steps. 1.

Press [SHIFT][EAF].

2.

Enter 13 (function number).

3.

Enter 010 (data address).

4.

Enter <result address>.

Binary to BCD Conversion You must decide whether or not to enter a data address. If you choose to enter a data address, the processor seeks the binary number to be converted at that address in the data table. If you choose not to enter a data address and use the default number (010), the processor seeks its binary number to be converted at that address in the data table. The ladder diagram that enables the processor to execute a Binary to BCD conversion is shown in Figure 10.8. Figure 10.8 Optional Ladder Diagram for Binary to BCD Conversion 060 061 G G 000 734 050 G 2DE

Start Executive Aux Function Function Number: Data Addr: Result Addr:

13 010 060

Keystrokes: You enter the instructions for a Binary to BCD conversion by performing the following steps. The first group of steps you perform enters the branch for the result (term E).

10-20

1.

Open the rung. Press the branch start key [ ].

2.

Press -[G]-.

3.

Enter <address>.

Page 109

Chapter 10 Math Instructions

4.

Enter <data> if appropriate.

5.

Press -[G]-.

6.

Enter <address>.

7.

Enter <data> if appropriate.

The second group of steps you perform enters the branch for the number to be converted (term F). 1.

Open the rung. Press the branch start key [ ].

2.

Press -[G]-.

3.

Enter <address>.

4.

Enter <data> if appropriate.

5.

Close the branches. press the branch end key [ ].

6.

Close the rung. Press [SHIFT][EAF].

7.

Enter 14 (function number).

8.

Enter 010 (data address).

9.

Enter <result address>.

Editing a Completed Rung Operand and Result: Follow the editing procedures for a Get instruction. EAF Instruction: You edit an EAF instruction to change an address by performing the following steps.

Chapter Summary

1.

Press [SHIFT][EAF].

2.

Enter 14 (function number).

3.

Enter 010 (data address).

4.

Enter <result address>.

We showed you how to program different types of math functions. The next chapter tells how to transfer data files.

10-21

Page 110

Chapter

11

Data Transfer File Instructions

Chapter Objectives

This chapter describes the data transfer file instructions: file to file move word to file move file to word move A file is a group of consecutive data table words used to store information. A file can be between 1 and 999 words in length. The address of word 1 defines the address of the file. When displayed, the words of a file are designated consecutively by positions 001-999 according to the length of the file. The word address defines: the location in the data table to which or from which the data will be moved. this word address can be manipulated by ladder diagram logic

Types of File Instructions

There are two types of file instructions: those with an externally indexed counter (word-to-file move and file-to-word move) those with an internally indexed counter (file-to-file move) Figure 11.1 shows the difference in format between these two types of file instructions.

11-1