07.03.2014 Views

Introduction.

Introduction.

Introduction.

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Workshop PG5<br />

Project management<br />

6.2 Cyclic Blocks (COB 0 ... 15)<br />

The fact that your SB is waiting on an event must under no circumstances block the<br />

rest of the program from being executed continuously. To prevent you from programming<br />

such a structure, a SB must be called from a COB. You can’t have a SB<br />

without a COB!<br />

The SB then will be called once a cycle and the state will be tested. If the SB is<br />

waiting on an event, then the program simply returns to the COB and continues to<br />

execute the COB. The next step of the SB will not be executed until the next cycle<br />

in which it is not in a waiting state.<br />

Cycle starts<br />

here<br />

Cyclic<br />

programs:<br />

Cycle time:<br />

Cycle<br />

ends here<br />

Until now our programs have been executed in an endless loop. They always started<br />

at the beginning of a COB and then one COB after the other was executed until the<br />

program reached the last COB. Once the program reaches the end, it automatically<br />

returns to the beginning of the first COB and starts the cycle all over again.<br />

The time it takes to execute all the COB’s from the beginning of the first COB to the<br />

end of the last COB, depends on the number and type of instructions and FBOX’s<br />

you use in your program. This time is called Cycle time.<br />

The cycle time is typically in the millisecond range. If you know the cycle time, then<br />

you know how long it takes for a PCD output to react on the change of the state of<br />

an input.<br />

Cyclic programs are built with program blocks like COB’s, PB’s, FB’s, SB’s or<br />

XOB’s.<br />

PG5-06-E.doc © Saia-Burgess Controls Ltd. Page 6-2

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

Saved successfully!

Ooh no, something went wrong!