Professional Documents
Culture Documents
Ex01 - Introduction To PS501 - RevA
Ex01 - Introduction To PS501 - RevA
Goals
The goal of this exercise is to start your first project, and configure a simple program
for testing with a built in simulation facility. To be familiar with the IEC 61131
programming languages used in the PS501 Control Builder.
Legend
<> Indicates a key name.
| Indicates when you go from one menu to a sub-menu.
Bold Indicates a menu name or an option in a menu, or file structures
“ “ Indicates dialog box buttons, tabs, instructions etc.
1 / 22
PLC Training Exercises
Exercise Objective
The objective of this exercise is to code some very simple digital logic, to achieve
this:-
Result = (A and B) or C
Exercise Steps
Check that the programming software opens correctly, and then look into the project
defined options using
2 / 22
AC500 / S500 Training
Take a brief tour of the other options available (Load and Save, Editor, Desktop,
Colours, Directories, and Log)
Or alternatively, use
When a new project is built, you should always specify the controller hardware type.
This is achieved using the drop down arrow.
3 / 22
PLC Training Exercises
Programming in FBD
Do not change the name of your first program organization unit and make sure the
type is set to “Program” and the language as “FBD”
In the pane below the variable declaration there are 3 question marks (???) shown
normally in red. Click on these.
4 / 22
AC500 / S500 Training
Now type in the letter “a” (the assumption is that you can remember the name of the
variable)
Select the element to the right hand side of the letter “a” as shown below
Click on the “box” icon from the toolbar, whilst this is still selected.
Allocate the second variable “b” in a slightly different manner (the assumption is that
you can NOT remember the name of the variable) by selecting the 3 question marks as
before and pressing F2.
The input assistant will be shown.
5 / 22
PLC Training Exercises
Use the input assistant to change the box type to “OR” by pressing F2 and navigating
to FBD Operators | OR
6 / 22
AC500 / S500 Training
Allocate the second pin of the OR gate as “c” by either typing it in, or using the input
assistant.
Assign an output to the OR gate using the icon from the toolbar shown below.
7 / 22
PLC Training Exercises
And start the simulation running using the option Online | Login or press ALT+F8
Set “c” to true by highlighting it, and typing in the number “1” on the keyboard.
8 / 22
AC500 / S500 Training
Check that the value for “result” is correctly calculated as being true.
Check the AND gate operation works using a similar technique to the method above.
Stop the simulation and save your work on the hard disk of your PC.
9 / 22
PLC Training Exercises
Modify the existing project and add a new POU to it by right clicking on the POU
folder and selecting Add Object.
Give a name for the new POU and make sure the type is set to Program and the
Language as ST.
10 / 22
AC500 / S500 Training
If you would like to attempt to test the logic now, then go ahead, and
notice how the variables in run mode are shown with question marks.
And add in a new task using a right mouse click and “append task”
11 / 22
PLC Training Exercises
And then right click on the new task to append a program call
12 / 22
AC500 / S500 Training
Now test the structured text program in the same manner as before.
13 / 22
PLC Training Exercises
Modify the existing project and add a new POU to it by right clicking on the POU
folder and selecting Add Object.
Give a name for the new POU and make sure the type is set to Program and the
Language as LD.
14 / 22
AC500 / S500 Training
And we need to click on the contact icon one more time, to add another contact in
thus:-
Allocate variable a and b to the 2 contacts. Either type the variable name in, or use the
input assistant with the F2 key.
Select both a and b with the mouse by holding the Shift key down and clicking on a
and then b.
15 / 22
PLC Training Exercises
Append a program call to the Ladder Logic Program in the same manner as
previously.
16 / 22
AC500 / S500 Training
Modify the existing project and add a new POU to it by right clicking on the POU
folder and selecting Add Object.
Give a name for the new POU and make sure the type is set to Program and the
Language as CFC.
17 / 22
PLC Training Exercises
Add 2 boxes
Add in an output
18 / 22
AC500 / S500 Training
And then click and drag between the pins to connect lines as shown below.
19 / 22
PLC Training Exercises
Append a program call to the CFC program in the same manner as previously.
20 / 22
AC500 / S500 Training
Modify the existing project and add a new POU to it by right clicking on the POU
folder and selecting Add Object.
Give a name for the new POU and make sure the type is set to Program and the
Language as LD.
21 / 22
PLC Training Exercises
Append a program call to the instruction list program in the same manner as
previously.
22 / 22