22.07.2013 Views

Step7 Basic operations, program blocks - DCE FEL ČVUT v Praze

Step7 Basic operations, program blocks - DCE FEL ČVUT v Praze

Step7 Basic operations, program blocks - DCE FEL ČVUT v Praze

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.

FB and FC parameters<br />

Simple types<br />

BYTE, WORD, BOOL, etc.<br />

Complex types<br />

ARRAY, TIMER, COUNTER, etc.<br />

BE CAREFUL: when calling <strong>blocks</strong> several times in one scan cycle<br />

Rising edge detection<br />

Timer value<br />

…<br />

• There is one or more data <strong>blocks</strong> (DB) dedicated to each<br />

function block (FB)<br />

– e.g. operation of more devices of the same type with different<br />

parameters<br />

• Multiple‐instance call<br />

– The called FB is a static parameter of the calling function block<br />

– The called FB are under Multiple Instances<br />

– The upper FB must be created with “Allow multiple instances”<br />

– Not so many DBs needed<br />

Multiple-instance<br />

FB<br />

(upper laying)<br />

in …<br />

out …<br />

stat motor1 FB1<br />

stat motor2 FB1<br />

FB10<br />

Function block calls<br />

FB1<br />

FB1<br />

FB1<br />

Function <strong>blocks</strong> in the<br />

static parameters of<br />

the upper FB<br />

3.10.2012<br />

8

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

Saved successfully!

Ooh no, something went wrong!