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

'Extras' 'Set/Reset'<br />

Symbol:<br />

With this command you can define outputs as Set or Reset Outputs. A grid with Set Output is<br />

displayed with [S], and a grid with Reset Output is displayed with [R].<br />

Set/Reset Outputs in FBD<br />

'Extras' 'View'<br />

Open instance<br />

An Output Set is set to TRUE, if the grid belonging to it returns TRUE. The output now maintains this<br />

value, even if the grid jumps back to FALSE.<br />

An Output Reset is set to FALSE, if the grid belonging to it returns FALSE. The output maintains its<br />

value, even if the grid jumps back to FALSE.<br />

With multiple executions of the command, the output will alternate between set, reset, and normal<br />

output.<br />

Using this command for a POU created in the FBD-Editor you can choose, whether it should be<br />

displayed in the LD- (ladder logic) or in the FBD-Editor (Function block diagram). This is possible in<br />

offline as as well as in online mode.<br />

This command corresponds to the 'Project' 'Open instance' command.<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 />

Cutting, Copying, Pasting, and Deleting in FBD<br />

The commands used to 'Cut', 'Copy', 'Paste', and 'Delete' are found under the 'Edit' menu item.<br />

If a line cross is selected(Cursor Position 5) (see 'Cursor positions in FBD'), then the assignments,<br />

jumps, or RETURNS located below the crossed line will be cut, deleted, or copied.<br />

If a POU is selected (Cursor Position 3), then the selected object itself, will be cut, deleted, or copied,<br />

along with all of the branches dependent on the inputs, with the exception of the first (highest position)<br />

branch.<br />

Otherwise, the entire branch located in front of the cursor position will be cut, deleted, or copied.<br />

After copying or cutting, the deleted or copied part is located on the clipboard and can now be pasted,<br />

as desired.<br />

In order to do so, you must first select the pasting point. Valid pasting points include inputs and<br />

outputs.<br />

If a POU has been loaded onto the clipboard (As a reminder: in this case all connected branches<br />

except the first are located together on the clipboard), the first input is connected with the branch<br />

before the pasting point.<br />

Otherwise, the entire branch located in front of the pasting point will be replaced by the contents of the<br />

clipboard.<br />

In each case, the last element pasted is connected to the branch located in front of the pasting point.<br />

CoDeSys V2.3 5-23

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

Saved successfully!

Ooh no, something went wrong!