You are on page 1of 9

PSIM

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:

The I/O (Input/Output) simulation screen shown above should now be


displayed on the display.

Using The I/O simulator

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.

 [F1] Toggle Switch State

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.

 [F2] Toggle Tables


When you first enter the I/O simulation, the upper data window
displays the Output image words of our simple PLC. The lower
window displays the Input Image words. The [F2] key allows you to
display other areas of PLC's data table such as those areas used by
timers and counters etc. For this exercise however, we only wish to
view the Input and Output section of the Data Table. Each time you
press this key another view of the PLC's data table will be shown. If
you keep pressing this key you will eventually return to the original
Input/Output display.

 [F3] Toggle Radix

Pressing the Toggle Radix function key toggles between Binary and
Decimal/ Hexadecimal display of Data Table information.

 [F5] Rung Edit

Pressing this key takes you to the Ladder Rung Program Editor. We
will use this shortly to enter our first practice program.

 [F6] Exit (Esc)

Pressing F6 or the Esc key will return you to the PSIM Main Menu
display.

Entering The Rung Editor

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

Ensure that you are in the Rung Editor

Enter the above program by following these steps:

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.

1. Insert a Rung into your empty program by pressing the F2 function


key
2. Select the XIC (Examine-On) instruction by pressing F1.
3. Now enter the address of the first toggle switch by entering [ I 1 0 0 ]
followed by pressing the Return or Enter Key.

Note: The backspace key (the left arrow key above the Enter key)
may be used to delete incorrect entries prior to pressing Enter.

4. Next, press the F8 (Output Instructions) which will display a new


menu at the bottom of the screen.
5. Select the OTE (Output Energize) instruction by pressing the F1
function key.
6. Now enter the address of the first simulator Light. [ O 1 0 0 ]
followed by the Enter key.
7. The rung should now be complete and a second rung will have been
started. Exit from the insert mode by pressing the F10 (Exit) key or
the Esc key.
8. You can now test your program by exiting the editor (F10 or Esc).
When you exit back to the I/O simulation display the PLC is
automatically placed in the RUN mode.
9. Toggle the switch several times and observe the operation of your
program. Light 00 should light whenever switch 00 is true (closed).

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.

1. Append a second Rung to your program by pressing the F1 function


key

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.

2. Select the XIC instruction and enter the address [ I 1 0 1 ] followed


by Enter.
3. Now press F1 again to enter the second XIC instruction and enter its
address. [ I 1 0 6 ] followed by Enter.
4. Press the F8 function key to display the Output Instructions menu.
5. Select the OTE instruction and enter its address. [ O 1 0 1 ]
6. Finally exit the insert mode of the editor and then the editor itself by
pressing the F10 twice in a row.
7. Test your program by toggling switch 01 and 06 to different states.
Light 01 should light only when both input 01 and 06 are true
(closed).

A Branch within a Rung

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.

Saving and Retrieving a Program


 From the I/O simulator screen select the Rung Edit function
 While in the Rung-Editor we will use the Program Utility function to
save and later retrieve a program to and from the computer's Disk
Drive.
 Select the Program Utility function by pressing the F7 function key.
 The Program Utility's function key Menu shown below, should now
be displayed at the bottom of your computer's screen.

1. Press the [F1] function key to Save your program to Disk.


2. When you press the F1 key, the Disk activity light should illuminate
briefly as the computer writes your program to the disk. When
complete the computer will then replace the Program Utility Function
Key Menu with the normal Menu.
3. If you missed seeing the activity light, enter the program utility again
and repeat the program save operation.
4. Press the F8 (Clear Memory) function key to erase your current
program.
5. We have now erased the program from the memory of the
computer. Our program however is safe on the computer's Disk and
we can retrieve it at will by using the Load Program utility function.
6. Select the Program Utility function and then retrieve your program
by pressing the F2 (Load Program) function key.

Modifying Instructions Within a Rung


Ensure that you are in the Rung Editor and your program is displayed on the
computer's screen.

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 ].

Your program should now look like the following:


Now return to the I/O simulator and test the operation of your program.

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.

 
 

You might also like