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 />

'Extras' 'Connection marker'<br />

Connections can also be represented by a connector (connection marker) instead of a connecting<br />

line. Here the output and the associated input have a connector added to them which is given a<br />

unique name.<br />

Where a connection already exists between the two elements which should now be represented by<br />

connectors, the output of the connecting line is marked and the menu point ‚Extras' ‚Connection<br />

marker' is selected. The following diagram shows a connection before and after the selection of this<br />

menu point.<br />

A unique name is given as standard by the program which begins with M, but which can be changed<br />

The connector name is stored as an output parameter, but can be edited both at the input and at the<br />

output.<br />

It is important to know that the connector name is associated with a property of the output of a<br />

connection and is stored with it.<br />

1. Edit the connector at the output:<br />

If the text in the connector is replaced, the new connector name is adopted by all associated<br />

connectors at the inputs. One cannot, however, select a name which already belongs to another<br />

connection marker since the uniqueness of the connector name would be violated.<br />

2. Edit the connector at the input:<br />

If the text in a connector is replaced, it will also be replaced in the corresponding connection marker<br />

on the other POU. Connections in connector representations can be converted to normal connections<br />

in that one marks the output of the connections (Cursor position 4) and again selects the menu point<br />

'Extras' 'Connection marker'.<br />

Insert inputs/outputs "on the fly"<br />

If exactly one input or output pin of an element is selected, then the corresponding input- or outputelement<br />

can be directly inserted and its editor field filled with a string by entering the string at the<br />

keyboard.<br />

Order of execution<br />

The elements block, output, jump, return and label each possess a number indicating the order in<br />

which they are executed. In this sequential order the individual elements are evaluated at run time.<br />

When pasting in an element the number is automatically given according to the topological sequence<br />

(from left to right and from above to below). The new element receives the number of its topological<br />

successor if the sequence has already been changed and all higher numbers are increased by one.<br />

The number of an element remains constant when it is moved.<br />

The sequence influences the result and must be changed in certain cases.<br />

If the sequence is displayed, the corresponding sequential execution number is shown in the upper<br />

right hand corner of the element.<br />

'Extras' 'Order' 'Show Order'<br />

This command switches the display of the order of execution on and off. The default setting is to show<br />

it (recognised by a tick (ü) in front of the menu point).<br />

The relevant order of execution number appears in the upper right hand corner for the elements block,<br />

output, jump, return and label.<br />

CoDeSys V2.3 5-41

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

Saved successfully!

Ooh no, something went wrong!