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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

plc states - 12.8<br />

State diagrams can be converted directly to ladder logic using block logic. This<br />

technique will produce larger programs, but it is a simple method to underst<strong>and</strong>, <strong>and</strong> easy<br />

to debug. The previous traffic light example is to be implemented in ladder logic. The<br />

inputs <strong>and</strong> outputs are defined in Figure 12.9, assuming it will be implemented on an<br />

Allen Bradley Micrologix. first scan is the address of the first scan in the PLC. The locations<br />

B3/1 to B3/4 are internal memory locations that will be used to track which states are<br />

on. The behave like outputs, but are not available for connection outside the PLC. The<br />

input <strong>and</strong> output values are determined by the PLC layout.<br />

STATES<br />

B3/1 - state 1 - green E/W<br />

B3/2 - state 2 - yellow E/W<br />

B3/3 - state 3 - green N/S<br />

B3/4 - state 4 - yellow N/S<br />

OUTPUTS<br />

O/1 - L1<br />

O/2 - L2<br />

O/3 - L3<br />

O/4 - L4<br />

O/5 - L5<br />

O/6 - L6<br />

INPUTS<br />

I/1 - S1<br />

I/2 - S2<br />

S2:1/14 - first scan<br />

Figure 12.9<br />

Inputs <strong>and</strong> Outputs for Traffic Light <strong>Control</strong>ler<br />

The initial ladder logic block shown in Figure 12.10 will initialize the states of the<br />

PLC, so that only state 1 is on. The first scan indicator first scan will execute the MCR<br />

block when the PLC is first turned on, <strong>and</strong> the latches will turn on the value for state 1 B3/<br />

1 <strong>and</strong>turnofftheothers.

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

Saved successfully!

Ooh no, something went wrong!