24.01.2015 Views

PLC Programming

  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5 - Editors in CoDeSys<br />

5 Editors in CoDeSys<br />

5.1 This is for all Editors...<br />

Components of an Editor<br />

Print margins<br />

Comment<br />

Zoom to POU<br />

Open instance<br />

All editors for POUs (Program Organization Units) consist of a declaration part and a body. The body<br />

can consist of other a text or a graphic editor; the declaration portion is always a text editor. Body and<br />

declaration part are separated by a screen divider that can be dragged, as required, by clicking it with<br />

the mouse and moving it up or down.<br />

The vertical and horizontal margins that apply when the editor contents are printed, are shown by red<br />

dashed lines if the 'Show print range' option in the project options in the dialog 'Workspace' was<br />

selected. The properties of the printer that was entered apply, as well as the size of the print layout<br />

selected in the 'File' 'Printer Setup' menu. If no printer setup or no print layout is entered, a default<br />

configuration is used (Default.DFR and default printer). The horizontal margins are drawn as if the<br />

options 'New page for each object' or 'New page for each sub-object' were selected in 'Documentation<br />

settings'. The lowest margin is not displayed.<br />

Note: An exact display of the print margins is only possible when a zoom factor of 100% is selected.<br />

User comments must be enclosed in the special symbol sequences „(*" and „*)". Example: (*This is a<br />

comment.*)<br />

Comments are allowed in all text editors, at any location desired, that is in all declarations, the IL and<br />

ST languages and in self-defined data types. If the Project is printed out using a template, the<br />

comment that was entered during variable declaration appears in text-based program components<br />

after each variable.<br />

In the FBD and LD graphic editors, comments can be entered for each network. To do this, search for<br />

the network on which you wish to comment and activate 'Insert' 'Comment'. In the Ladder Editor<br />

additionally a comment for each particular contact and coil can be added, if the corresponding options<br />

are activated in the menu 'Extras' 'Options'. In CFC there are special comment POUs which can be<br />

placed at will.<br />

In SFC, you can enter comments about a step in the dialog for editing step attributes.<br />

Nested comments are also allowed if the appropriate option in the 'Project' 'Options' 'Build Options'<br />

dialog is activated.<br />

In Online mode, if you rest the mouse cursor for a short time on a variable, the type and if applicable<br />

the address and comment of that variable are displayed in a tooltip.<br />

Shortcut: +<br />

With this command a selected POU is loaded into its editor. The command is available in the context<br />

menu () or in the 'Extras' menu, if the cursor is positioned on the name of a POU in a text editor<br />

or if the POU box is selected in a graphic editor.<br />

If you are dealing with a POU from a library, then the library manager is called up, and the<br />

corresponding POU is displayed.<br />

This command corresponds to the 'Project' 'Open instance' command.<br />

CoDeSys V2.3 5-1

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

Saved successfully!

Ooh no, something went wrong!