Professional Documents
Culture Documents
Introductory
Relay Logic
Lab
Getting Started:
From the Main Menu screen of the PSIM program, select the I/O simulation
display.
The I/O simulator allows you to change the state of the switches connected
to the Input Card of our simple PLC. The windows in the centre of the
display allow us to monitor the state of the PLC's Data Table. Although all
PLCs store this data as ones and zeros, our simulator substitutes a period in
place of any zero in order to make the display easier to read. In addition, we
can have the simulator alternatively display this information in both decimal
and hexadecimal format by pressing the [F3] "Toggle Radix" function key.
You can control the state of the switches connected to Input Card of
our simple PLC by pressing the F1 function key. To select which
switch is to be toggled, first use the Up and Down arrow keys on the
keyboard to move the cursor focus to the desired switch.
Pressing the Toggle Radix function key toggles between Binary and
Decimal/ Hexadecimal display of Data Table information.
Pressing this key takes you to the Ladder Rung Program Editor. We
will use this shortly to enter our first practice program.
Pressing F6 or the Esc key will return you to the PSIM Main Menu
display.
From the I/O simulator screen select the Rung Edit function [F5] The Rung
Editor Screen shown below should now be displayed on your Computer.
The Editor is displaying a single rung which marks the end of the
program. This rung is present in every program and is included in
the count of the program rungs. Thus an empty program will still
have a rung count of one.
Note the Function Key Menu along the Bottom of the screen. For
most operations you will be required to press the corresponding
Function Key on your Keyboard in order to invoke the specified
operation which is described by this and other Function Key Menus.
Entering a Rung
Note
All keystrokes that you are required to enter are shown in square
brackets [ ].
Ensure that the NumLock light is on if using the numeric keypad for
numbers.
Note: The backspace key (the left arrow key above the Enter key)
may be used to delete incorrect entries prior to pressing Enter.
Adding a Rung
From the I/O simulator screen select the Rung Edit function.
Modify your program by adding a second rung as shown above.
Note: "Insert Rung" adds a rung above the rung the cursor is on.
"Append Rung" adds a rung below the rung the cursor is on.
From the I/O simulator screen select the Rung Edit function
Modify your program by adding the above rung to the Top of your program.
1. Using the arrow keys, move the cursor to the first rung of your
program. Insert a Rung above this first rung by pressing the Insert
(above) rung key F2.
2. Press the Branch Start Key F3.
3. Press the XIC key and enter the address [ I 1 0 0 ].
4. Press F1 again to enter the second XIC instruction. Enter its
address.[ I 1 0 2 ]
5. Press the F3 (Branch Start) key a second time. The cursor should
now be on the branch below the first XIC instruction.
6. Enter the 3rd XIC instruction and address. [ I 1 0 3 ]
7. Now press F4 (Branch Close) to complete the branch.
8. Select the output menu and enter the OTE instruction and address. [
O102]
9. Return to the I/O simulator and test the operation of your program.
Using the arrow keys, ensure that the cursor is positioned on the first
instruction of the above rung.
1. With the cursor on the above rung, press the F3 (Modify Rung)
function key.
You should now be in the Modify Rung mode and able to place the
cursor over any of the instructions on the selected rung using the left
and right arrow keys. A new function key Menu should be in place
and the current instruction and its address as denoted by the cursor
should be displayed on the command line at the bottom of the
screen.
2. Using the right arrow key, move the cursor to the XIC I:103
instruction located on the lower branch of the rung.
3. Press the F1 (Insert Instruction) function key selection.
4. Press the XIC key and enter the address [ I 1 0 0 ].
5. Using the arrow keys, place the cursor over the OTE O:1/02 output
instruction.
6. Press the F4 (Modify Instruction) function key.
7. Select the OTE instruction from the Output instructions menu and
enter the new address [ O 1 0 7 ].
Practice Exercises
Enter the Rung Editor from the I/O simulator and erase your current
program.
1. Enter and test out the operation of the following program rung which
emulates the operation of a typical Stop/Start motor control circuit.
2. Add a rung which will turn on light O:101 whenever light O:100 is off.
When you have completed testing this new rung, print a diagram of
it on the back of this page.
3. Add a rung which will turn on light O:102 whenever light 0:100 is on
and switch I:105 is momentarily pressed. List the rung on the back
of this page.
4. Using an output latch instruction (OTL), add a rung which will latch
on light O:103 whenever switch I:107 is on and either switch I:103 or
switch I:104 are momentarily pressed. Also add a rung to unlatch
light O:103 when switch I:105 is pressed. List these 2 rungs.
5. Erase your program from memory.
6. Create, enter and test a program which will emulate the common
wiring function of controlling a single light from two different
locations. Light O:100 should change state whenever switch I:100 or
switch I:101 change state. List your program.
Optional Exercises
Enter the Rung Editor from the I/O simulator and erase your current
program.
1. Create, enter and test a program which will change the state of light
O:101 whenever switch I:104 or switch I:105 is momentarily pressed
and then released.
2. Create, enter and test a program which uses a single switch (I:102)
to control the operation of 3 lights (O:100,O:101,O:102) using the
following sequence of steps.
Step#
1. when switch I:102 is first pressed, the first light O:100 will
turn on and remain on when the switch is released.
2. when switch I:102 is pressed for the second time, the first
light O:100 will turn off and the second light O:101 will turn
on and remain on when the switch is released.
3. when the switch is pressed for the third time, the second
light O:101 will turn off and the third light O:102 will turn on
and remain on when the switch is released.
4. when the switch is pressed for the 4th. time, the third light
O:102 will turn off and the first light (O:100) will turn on and
remain on when the switch is released.
5. The sequence now continues at Step #2 above.