24.01.2015 Views

PLC Programming

  • No tags were found...

Create successful ePaper yourself

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

Declaration Editor...<br />

It is available in the context menu () or in the 'Extras' menu, if the cursor is positioned on the<br />

name of a function block in a text editor or if the function block box is selected in a graphic editor.<br />

Intellisense Function<br />

If the option List components is activated in the project options dialog for category 'Editor' , then the<br />

"Intellisense" functionality will be available in all editors, in the Watch- and Receiptmanager, in the<br />

Visualization and in the Sampling Trace:<br />

• If you insert a dot "." instead of an identifier, a selection box will appear, listing all local and global<br />

variables of the project. You can choose one of these elements and press 'Return' to insert it<br />

behind the dot. You can also insert the element by a doubleclick on the list entry.<br />

• If you enter a function block instance or a structure variable followed by a dot, then a selection box<br />

listing all input and output variables of the corresponding function block resp. listing the structure<br />

components will appear, where you can choose the desired element and enter it by pressing<br />

'Return' or by a doubleclick.<br />

Example:<br />

Insert "struvar." -> the components of structure struct1 will be offered:<br />

5.2 Declaration Editor...<br />

Declaration Part<br />

The declaration editor is used to declare variables of POUs and global variables, for data type<br />

declarations, and in the Watch and Receipt Manager. It gives access to the usual Windows functions,<br />

and even those of the IntelliMouse can be used if the corresponding driver is installed.<br />

In Overwrite mode, 'OV' is shown in black on the status bar; switching between Overwrite and Insert<br />

modes can be accomplished with the key.<br />

The declaration of variables is supported by syntax coloring.<br />

The most important commands are found in the context menu (right mouse button or +).<br />

All variables to be used only in this POU are declared in the declaration part of the POU. These can<br />

include: input variables, output variables, input/output variables, local variables, retain variables, and<br />

constants. The declaration syntax is based on the IEC61131-3 standard. An example of a correct<br />

declaration of variables in CoDeSys-Editor:<br />

5-2 CoDeSys V2.3

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

Saved successfully!

Ooh no, something went wrong!