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.

Compact IF If a condition is met, then... (one instruction)<br />

Examples<br />

Arguments<br />

Syntax<br />

Compact IF is used when a single instruction is only to be executed if a given condition<br />

is met.<br />

If different instructions are to be executed, depending on whether the specified<br />

condition is met or not, the IF instruction is used.<br />

IF reg1 > 5 GOTO next;<br />

If reg1 is greater than 5, program execution continues at the next label.<br />

IF counter > 10 Set do1;<br />

The do1 signal is set if counter > 10.<br />

IF Condition ...<br />

Condition Data type: bool<br />

The condition that must be satisfied for the instruction to be executed.<br />

(EBNF)<br />

IF ( | ) ’;’<br />

Related information<br />

Described in:<br />

Conditions (logical expressions) <strong>Basic</strong> <strong>Characteristics</strong> - Expressions<br />

IF with several instructions Instructions - IF<br />

<strong>RAPID</strong> Reference Manual 8-Compact IF-1

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

Saved successfully!

Ooh no, something went wrong!