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.

5 - Editors in CoDeSys<br />

Depending on the selected position (see 'Cursor positions in FBD'), insertion takes place directly in<br />

front of the selected input (Cursor Position 2), directly after the selected output (Cursor Position 4) or<br />

at the end of the network (Cursor Position 6).<br />

For an inserted assignment, a selection can be made accompanying the entered text "", and the<br />

assignment can be replaced by the variable that is to be assigned. For this you can also use the Input<br />

Assistant.<br />

In order to insert an additional assignment to an existing assignment, use the 'Insert' 'Output'<br />

command.<br />

'Insert' 'Jump' in FBD<br />

Symbol:<br />

Shortcut: +<br />

This command inserts a jump.<br />

Depending on the selected position (see 'Cursor positions in FBD'), insertion takes place directly in<br />

front of the selected input (Cursor Position 2), directly after the selected output (Cursor Position 4) or<br />

at the end of the network (Cursor Position 6).<br />

For an inserted jump, a selection can be made accompanying the entered text "", and the jump<br />

can be replaced by the label to which it is to be assigned.<br />

'Insert' 'Return' in FBD<br />

Symbol:<br />

Shortcut: +<br />

This command inserts a RETURN instruction.<br />

Depending on the selected position (see 'Cursor positions in FBD'), insertion takes place directly in<br />

front of the selected input (Cursor Position 2),directly after the selected output (Cursor Position 4),<br />

directly before the selected line cross (Cursor Position 5), or at the end of the network (Cursor<br />

Position 6)<br />

'Insert' 'Box' in FBD<br />

Symbol:<br />

Shortcut: +<br />

With this command, operators, functions, function blocks and programs can be inserted. First of all, it<br />

is always inserted an "AND" operator. This can be converted by Selection and Overwrite of the type<br />

text („AND") into every other operator, into every function, into every function block and every<br />

program. You can select the desired POU by using Input Assistant (). If the new selected block<br />

has another minimum number of inputs, these will be attached. If the new block has a smaller highest<br />

number of inputs, the last inputs will be deleted.<br />

In functions and function blocks, the formal names of the in- and outputs are displayed.<br />

In function blocks there exists an editable instance field above the box. If another function block that is<br />

not known is called by changing the type text, an operator box with two inputs and the given type is<br />

displayed. If the instance field is selected, Input Assistant can be obtained via with the<br />

categories for variable selection.<br />

The newest POU is inserted at the selected position:<br />

• If an input is selected (Cursor Position 2), then the POU is inserted in front of this input. The first<br />

input of this POU is linked to the branch on the left of the selected input. The output of the new<br />

POU is linked to the selected input.<br />

• If an output is selected (Cursor Position 4), then the POU is inserted after this output. The first<br />

input of the POU is connected with the selected output. The output of the new POU is linked to the<br />

branch with which the selected output was linked.<br />

• If a POU, a function, or a function block is selected (Cursor Position 3), then the old element will be<br />

replaced by the new POU.<br />

CoDeSys V2.3 5-21

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

Saved successfully!

Ooh no, something went wrong!