23.11.2012 Views

2 Visual Components Manuals

2 Visual Components Manuals

2 Visual Components Manuals

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.

• Inserting Using the Variable Declaration Dialog Box<br />

• Inserting a Cyclic Task<br />

4.2.1.3.1 Inserting Using the Variable Declaration Dialog Box<br />

In the Software view, right click on CPU. Choose Declaration from the shortcut menu. This opens the dialog box<br />

for declaring variables.<br />

Place the mouse pointer anywhere in the empty area of the variable list. Right mouse click and select New<br />

Variable from the shortcut menu. Enter the name of the variable to be used. In this case, it will be called<br />

"IOValue". Pressing "Enter" creates the variable.<br />

Now double−click in the "Type" column to specify the data type for the variable.<br />

Choose data type UDINT for an unsigned 32−bit integer value and confirm with OK.<br />

Now create a second variable with the name "LedCtrl" of data type USINT. Your variable declarations should<br />

now look like this.<br />

Now close the declaration dialog box.<br />

To save memory, variables are only sent to the controller if they are used in at least one control task. To meet<br />

this requirement, we will create a very small task in Automation Basic which uses these variables.<br />

Right click on CPU and choose Insert Object... from the shortcut menu.<br />

Introduction to <strong>Visual</strong> <strong>Components</strong> 2.3<br />

224 4.2.1.3 CAN − Step 3: Inserting PV Variables

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

Saved successfully!

Ooh no, something went wrong!