15
99
15 - Graphical programming
15�6 Connecting operators
There are certain rules you need to follow when you connect the operators in the workspace. An
input can only be connected to an output. The connection is made from left to right, in other words
the input must be one column to the right of the output. An input can only be connected to one
output, but a single output can be connected to multiple inputs.
You cannot erase a connection – instead you create a new connection to replace the old one. You
will not be able to save your graphical program until you have connected up all inputs and outputs
for all operators, inputs and outputs. Otherwise you will see an error message and the operator that
is not connected is highlighted.
15�7 Editing the program
You can remove a square with an operator by selecting it and clicking Delete Selected Item. You can
also move operators. To move an operator, hold down the Shift key on the keyboard, click on the
operator and drag it where you want it to go. If the destination square has a green border, you can
move the operator there. Otherwise the square has a blue border. If you release the mouse button
when a square has a green border, the operator is dropped there, bringing all its connections with it.
If the square has a blue border when you release the mouse button, nothing happens. You can only
move an operator to a square if the square is empty, if the operator is allowed on the square and if
none of the connection rules are broken.
Next to the Save button at the top of the screen there is a button called Erase. This deletes the entire
program. There is also a list of all graphical programs in the device. Select the program you want to
edit, but remember to save any changes before switching.
To create a new program, type a name in the New program name eld and click the Create button.
You cannot rename an existing program, and you must be careful not to use the same name twice.
The name cannot include special characters or numbers.
15�8 Example – outdoor
lighting
This graphical program will control
outdoor lighting. There will be a time
function to determine the times of
day you want the lights to switch on.
The system also includes a burglar
alarm. If the alarm detects a break-in,
the lights will be switched on regard-
less of the time of day. If someone
arrives at the building when the lights
are o, they can be switched on using a pushbutton. They will stay on for ten minutes (600 seconds)
before switching o again.