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<br />

Program structures<br />

5.2 Program Blocks (PB 0 to 299)<br />

What’s a PB:<br />

You may also work with PB’s (Program Blocks). PB’s offer a good way to organize<br />

your program in a hierarchical manner. PB’s are only activated if they are<br />

called. They may be called from a COB or from another PB.<br />

There are two ways to call a PB: Conditional call or unconditional call. Conditional<br />

calls depend on the result of a logical operation. You can call the same PB several<br />

times in the program. If one PB calls another PB and so on, then you can do so<br />

up to seven levels.<br />

A PB call can<br />

be conditional<br />

or unconditional:<br />

COB 7<br />

Enable input is always<br />

high. Therefore the PB2<br />

will be called in every<br />

cycle => It's an unconditional<br />

call<br />

PB<br />

PB<br />

PB<br />

PB<br />

When the signal "move"<br />

becomes high the PB is<br />

called. This is a conditional<br />

call.<br />

Program blocks can not only be called from COB's, but also from PB’s, FB’s, or<br />

SB’s.<br />

© SAIA-Burgess Controls AG Page 5-3

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

Saved successfully!

Ooh no, something went wrong!