09.12.2012 Views

Basic Characteristics RAPID

Basic Characteristics RAPID

Basic Characteristics RAPID

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

ool Logical values<br />

Description<br />

Examples<br />

Bool is used for logical values (true/false).<br />

The value of data of the type bool can be either TRUE or FALSE.<br />

flag1 := TRUE;<br />

flag is assigned the value TRUE.<br />

VAR bool highvalue;<br />

VAR num reg1;<br />

.<br />

highvalue := reg1 > 100;<br />

highvalue is assigned the value TRUE if reg1 is greater than 100; otherwise,<br />

FALSE is assigned.<br />

IF highvalue Set do1;<br />

The do1 signal is set if highvalue is TRUE.<br />

highvalue := reg1 > 100;<br />

mediumvalue := reg1 > 20 AND NOT highvalue;<br />

Related information<br />

mediumvalue is assigned the value TRUE if reg1 is between 20 and 100.<br />

Described in:<br />

Logical expressions <strong>Basic</strong> <strong>Characteristics</strong> - Expressions<br />

Operations using logical values <strong>Basic</strong> <strong>Characteristics</strong> - Expressions<br />

<strong>RAPID</strong> Reference Manual 7-bool-1

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

Saved successfully!

Ooh no, something went wrong!