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.

TestDI Tests if a digital input is set<br />

TestDI is used to test whether a digital input is set.<br />

Examples<br />

IF TestDI (di2) THEN . . .<br />

If the current value of the signal di2 is equal to 1, then . . .<br />

IF NOT TestDI (di2) THEN . . .<br />

If the current value of the signal di2 is equal to 0, then . . .<br />

WaitUntil TestDI(di1) AND TestDI(di2);<br />

Program execution continues only after both the di1 input and the di2 input have<br />

been set.<br />

Return value Data type: bool<br />

Arguments<br />

Syntax<br />

TRUE = The current value of the signal is equal to 1.<br />

FALSE = The current value of the signal is equal to 0.<br />

TestDI (Signal)<br />

Signal Data type: signaldi<br />

The name of the signal to be tested.<br />

TestDI ’(’<br />

[ Signal ’:=’ ] < variable (VAR) of signaldi > ’)’<br />

A function with a return value of the data type bool.<br />

<strong>RAPID</strong> Reference Manual 9-TestDI-1

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

Saved successfully!

Ooh no, something went wrong!