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

The text of a manual · part 26 of 59

Mini-PLC-2/02, 2/16, 2/17 Processor (cat. no. 1772-LZ, LZP, LX, LXP, LW, LWP) User Manual: 15 - EAF Log, Trig, and FIFO Instructions, pages 204 to 212

Pages 204 to 212 of 492, from Mini-PLC-2/02, 2/16, 2/17 Processor (cat. no. 1772-LZ, LZP, LX, LXP, LW, LWP) User Manual

The original document is the PDF (2.5 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-LX / LXP

Page 204

Chapter 15 EAF Logarithmic, Trigonometric and FIFO Instructions

FIFO Load Figure 15.9 First Data Is Ready to Be Loaded

130

050

01

15

060 G 000

030 G 040

031 G 005

032 G 060

EXECUTE AUX FUNCTION FUNCTION NUMBER:28 DATA ADDR: 030 RESULT ADDR: 050

(

050 G 000

15-10

(

040 G 000

041 G 000

042 G 000

130

050

01

14

061 G 000

033 G 040

034 G 005

035 G 061

043 G 000

044 G 000

070 ) 00

070 ) 00

(

070 ) 00

(

070 ) 00

EXECUTE AUX FUNCTION FUNCTION NUMBER: 29 DATA ADDR: 033 RESULT ADDR: 050

Page 205

Chapter 15 EAF Logarithmic, Trigonometric and FIFO Instructions

Figure 15.10 shows how the first data is stored in the data table before the FIFO Load is energized. Figure 15.10 First Data Stored in the Data Table 030 031 032 033 034 035

17

0 0 0 0 0 0

10 07

00

4 0 6 4 0 6

0 5 0 0 5 1

040 041 042 043 044

0 0 0 0 0

0 0 0 0 0

0 0 0 0 0

050

0

0

0

060 061

1 0

1 0

1 0

130

0 0

10367-I

15-11

Page 206

Chapter 15 EAF Logarithmic, Trigonometric and FIFO Instructions

Figure 15.11 shows a full file. Inspect word 050 (Figure 15.12), you will find that bit 15 is set (1) indicating the file is full. Bit 17 follows the condition of the rung. Bit 17 is set (1) if the FIFO Load rung is true. Bit 17 is reset (0) if the rung is false. Figure 15.11 This Is a Full File of Five Words

130

050

01

15

060 G 000

030 G 040

031 G 005

032 G 060

EXECUTE AUX FUNCTION FUNCTION NUMBER:28 DATA ADDR: 030 RESULT ADDR: 050

050 G 000

15-12

040 G 000

041 G 000

042 G 000

130

050

01

14

061 G 000

033 G 040

034 G 005

035 G 061

043 G 000

044 G 000

(

070 ) 00

(

070 ) 00

(

070 ) 00

EXECUTE AUX FUNCTION FUNCTION NUMBER: 29 DATA ADDR: 033 RESULT ADDR: 050 (

070 ) 00

Page 207

Chapter 15 EAF Logarithmic, Trigonometric and FIFO Instructions

Figure 15.12 shows how a full file is stored in the data table. Figure 15.12 This Is a Full File Stored in the Data Table

040 041 042 043 044

050

060 061

130

1 0 1 0

0 0 0 0 0 0

10 07

00

4 0 6 4 0 6

0 5 0 0 5 1

5 4 3 2 1

5 4 3 2 1

5 4 3 2 1

0

0

5

5 0

5 0

5 0

<

030 031 032 033 034 035

17

The full file

0 1

10368-I

If you want to load zero as valid FIFO data, insert zeros in the Input Word. Do a SEARCH 53, enter the address of the input word, and set any one of the upper four bits on. Set bit 15 since this is the designated “zero” bit for EAF instructions. Then, when you load the data into the file, the file will accept “zero” as valid FIFO data (Figure 15.13).

15-13

Page 208

Chapter 15 EAF Logarithmic, Trigonometric and FIFO Instructions

Figure 15.13 Zero as Valid FIFO Data

130

050

01

15

060 G 000

030 G 040

031 G 005

032 G 060

EXECUTE AUX FUNCTION FUNCTION NUMBER:28 DATA ADDR: 030 RESULT ADDR: 050

050 G 000

15-14

040 G 000

041 G 000

042 G 000

130

050

01

14

061 G 000

033 G 040

034 G 005

035 G 061

043 G 000

044 G 000

(

070 ) 00

(

070 ) 00

(

070 ) 00

EXECUTE AUX FUNCTION FUNCTION NUMBER: 29 DATA ADDR: 033 RESULT ADDR: 050 (

070 ) 00

Page 209

Chapter 15 EAF Logarithmic, Trigonometric and FIFO Instructions

Figure 15.14 shows how zero is stored in the file as valid FIFO data. Figure 15.14 Zero Stored in the Data Table 030 031 032 033 034 035

17

0 0 0 0 0 0

10 07

00

4 0 6 4 0 6

0 5 0 0 5 1

040 041 042 043 044

0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0

4 0 3 2 1

4 0 3 2 1

4 0 3 2 1

050

1 0 1 0

0

0

5

4 0

4 0

4

060 061

130

Zero is a valid number

0

0 1

10369-I

15-15

Page 210

Chapter 15 EAF Logarithmic, Trigonometric and FIFO Instructions

If you want to keep zero as valid FIFO data, leave the bit set and it will progress through the file as any other word would. However, if you want to get rid of zero, you could reset the bit with ladder logic. The Result Word will not reflect the change until the next data is transferred into or out of the file. The zeros are then over-written. Valid data moves up to take the place of the zeros when either a FIFO Load or Unload executes (Figure 15.15). Figure 15.15 Zero Has Been Eliminated

130

050

01

15

060 G 000

030 G 040

031 G 005

032 G 060

EXECUTE AUX FUNCTION FUNCTION NUMBER:28 DATA ADDR: 030 RESULT ADDR: 050

050 G 000 040 G 000

041 G 000

042 G 000

130

050

01

14

061 G 000

033 G 040

034 G 005

035 G 061

043 G 000

044 G 000

(

070 ) 00

(

070 ) 00

(

070 ) 00

EXECUTE AUX FUNCTION FUNCTION NUMBER: 29 DATA ADDR: 033 RESULT ADDR: 050 (

070 ) 00

FIFO Unload Figure 15.16 shows data unloaded from the file into the Output Word. Bit 16 of the output word follows the condition of the FIFO Unload rung. Bit 16 is set (1) if the rung is true. Bit 16 is reset (0) if the rung is false. Observe that 111 was the first data in the file and it is the first data out or first in – first out (FIFO). Also, the Result Word has decremented by one. It now shows four indicating that there are now four words in the file.

15-16

Page 211

Chapter 15 EAF Logarithmic, Trigonometric and FIFO Instructions

Figure 15.16 First Data Has Been Unloaded

130

050

01

15

060 G 000

030 G 040

031 G 005

032 G 060

EXECUTE AUX FUNCTION FUNCTION NUMBER:28 DATA ADDR: 030 RESULT ADDR: 050

050 G 000 040 G 000

041 G 000

042 G 000

130

050

01

14

061 G 000

033 G 040

034 G 005

035 G 061

043 G 000

044 G 000

(

070 ) 00

(

070 ) 00

(

070 ) 00

EXECUTE AUX FUNCTION FUNCTION NUMBER: 29 DATA ADDR: 033 RESULT ADDR: 050 (

070 ) 00

15-17

Page 212

Chapter 15 EAF Logarithmic, Trigonometric and FIFO Instructions

Figure 15.17 shows how the first unloaded data is stored in the data table. Figure 15.17 Unloaded Data Stored in the Data Table 030 031 032 033 034 035

17

0 0 0 0 0 0

040 041 042 043 044

050

060 061

130

1

10 07

00

4 0 6 4 0 6

0 5 0 0 5 1

0 5 4 3 2

0 5 4 3 2

0 5 4 3 2

0

0

4

5 1

5 1

5 1

Unloaded data

1 1

10370-I

15-18