07.03.2014 Views

Introduction.

Introduction.

Introduction.

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.

Workshop PG5 Exercise Chapter 7<br />

Binary operations & counters<br />

Example:<br />

Parking lot<br />

Output 17<br />

(red light) is<br />

lit as soon as<br />

the parking<br />

lot is full<br />

(Lot_full)<br />

Input 0<br />

( NewCar )<br />

Input 1<br />

( Car_leaving )<br />

You have a parking lot with 8 parking slots.<br />

You have to sensors : One at the entrance gate which gives a pulse each time a<br />

car enters (Input 0 NewCar ) a second sensor at the exit tells you when a car is<br />

leaving (input 1 Car_leaving ).<br />

A signal ( output 17 Lot_full ) is lit as soon as 8 cars are in the parking lot.<br />

Cars can enter the lot even if the lot is already full !!<br />

Set the counter to 0 when you start up.<br />

Goal:<br />

This is a example you already know from the FUPLA examples.<br />

You learn to use counters in IL<br />

You learn to document the program.<br />

You learn how to reset values at start up.<br />

© Saia-Burgess Controls Ltd. Page 7E-7

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

Saved successfully!

Ooh no, something went wrong!