12.05.2014 Views

Automating Manufacturing Systems - Process Control and ...

Automating Manufacturing Systems - Process Control and ...

Automating Manufacturing Systems - Process Control and ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

plc basic functions - 15.25<br />

15.4.4 Flashing Lights<br />

Problem: We are designing a movie theater marquee, <strong>and</strong> they want the traditional<br />

flashing lights. The lights have been connected to the outputs of the PLC from O:001/00 to<br />

O:001/17. When the PLC is turned, every second light should be on. Every half second the<br />

lights should reverse. The result will be that in one second two lights side-by-side will be<br />

on half a second each.<br />

Solution:<br />

T4:1/DN<br />

TON<br />

timer T4:0<br />

Delay 0.5s<br />

T4:0/DN<br />

TON<br />

timer T4:1<br />

Delay 0.5s<br />

T4:0/TT<br />

MOV<br />

Source B3:0<br />

Dest O:001<br />

T4:0/TT<br />

NOT<br />

Source B3:0<br />

Dest O:001<br />

B3:0 = 0101 0101 0101 0101<br />

Figure 15.27<br />

A Flashing Light Example<br />

15.5 SUMMARY<br />

• Functions can get values from memory, do simple operations, <strong>and</strong> return the<br />

results to memory.<br />

• Scientific <strong>and</strong> statistics math functions are available.<br />

• Masked function allow operations that only change a few bits.<br />

• Expressions can be used to perform more complex operations.<br />

• Conversions are available for angles <strong>and</strong> BCD numbers.<br />

• Array oriented file comm<strong>and</strong>s allow multiple operations in one scan.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!