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.

Visualizing a Traffic Signal Unit...<br />

3.2 Visualizing a Traffic Signal Unit...<br />

With the visualization of CoDeSys you can quickly and easily bring project variables to life. We will<br />

now plot two traffic signals and an ON-Switch for our traffic light unit which will illustrate the switching<br />

process.<br />

Creating a new visualization<br />

In order to create a visualization you must first select the range of Visualization in the Object<br />

Organizer. First click on the lower edge of the window on the left side with the POU on the register<br />

card with this symbol and the name Visualization. If you now choose the command 'Project'<br />

'Object Add', then a dialog box opens.<br />

Enter here any name. When you confirm the dialog with OK, then a window opens in which you can<br />

set up your new visualization.<br />

Insert element in Visualization<br />

For our TRAFFICSIGNAL visualization you should proceed as follows:<br />

Give the command 'Insert' 'Ellipse'.Insert..Ellipse.>Proc and try to draw a medium sized circle (2cm).<br />

For this click in the editor field and draw with pressed left mouse button the circle in its length.<br />

Now doubleclick the circle. The dialog box for editing visualization elements opens<br />

Choose the category Variables and in the field Change color enter the variable name .L1_red or<br />

"L1_red". That means that the global variable L1_red will cause the color change as soon as it is set<br />

to TRUE. The dot before the variable name indicates that it is a global variable, but it is not<br />

mandatory.<br />

Then choose the category Color and click on the button Inside in the area Color. Choose as neutral<br />

a color as possible, such as black.<br />

Now click on the button within in the area Alarm color and choose the red which comes closest to<br />

that of a red light.<br />

3-12 CoDeSys V2.3

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

Saved successfully!

Ooh no, something went wrong!