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.

4 - The Individual Components<br />

In the case of a POU, the POU type (program, function or function block) and the language in which it<br />

is programmed must also be selected. 'Program' is the default value of Type of the POU, while that of<br />

Language of the POU is that of most recently created POU. If a POU of the function type is created,<br />

the desired data type must be entered in the Return Type text input field. Here all elementary and<br />

defined data types (arrays, structures, enumerations, aliases) are allowed. Input assistance (e.g. via<br />

) can be used.<br />

Dialog for creating a new POU<br />

After pressing OK, which is only possible if there is no conflict with the naming conventions described<br />

above, the new object is set up in the Object Organizer and the appropriate input window appears.<br />

If the command 'Edit' 'Insert' is used, the object currently in the clipboard is inserted and no dialog<br />

appears. If the name of the inserted object conflicts with the naming conventions (see above), it is<br />

made unique by the addition of a serial number appended with a leading underline character (e.g.<br />

"Rightturnsig_1").<br />

If the project is under source control in an ENI data base, it may be (depends on the settings in the<br />

Project options dialog for 'Project source control') that you will be automatically asked in which data<br />

base category you want to handle the new object. In this case the dialog 'Properties' will open where<br />

you can assign the object to one of the data base object categories.<br />

'Project' 'Object Rename'<br />

Shortcut: <br />

With this command you give a new name to the currently-selected object or folder. Remember that the<br />

name of the object may not have already been used.<br />

If the editing window of the object is open, then its title is changed automatically when the name is<br />

changed.<br />

Dialog box for renaming a POU<br />

'Project' 'Object Convert'<br />

This command can only be used with POUs. You can convert POUs from the languages SFC, ST,<br />

FBD, LD, and IL into one of the three languages IL, FBD, and LD.<br />

For this the project must be compiled. Choose the language into which you want to convert and give<br />

the POU a new name. Remember that the name of the POU may not have already been used. Then<br />

press OK, and the new POU is added to your POU list.<br />

The type of processing that occurs during conversion corresponds to that which applies to<br />

compilation.<br />

CoDeSys V2.3 4-43

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

Saved successfully!

Ooh no, something went wrong!