Jumat, 06 Maret 2009

Creating ladder logic diagram using Versapro

The ladder editor in VersaPro is a free form editor that allows you to place elements in different rungs, assign names and addresses when convenient, and then check and compile the program all at once or block-by-block. The editor also includes common Windows features such as undo, copy/paste, and drag and drop.

Place, name, and assign addresses to Boolean elements in the ladder diagram.

1. Make sure that the VDT is visible. If not, select View, Variable Declaration Table, or press Alt + 3.

2. If the MAIN.blk Ladder Diagram editor window is not open, double click the _MAIN-LD block in the folder browser.

3. In the VersaPro _MAIN.blk window, click the Normally Open Contact button on the Ladder Toolbar.

4. Move your cursor into the ladder diagram. Note that the mouse pointer has a Normally Open Contact symbol as a subscript. Click in the first row and leftmost column in the ladder diagram. A

Normally Open Contact is placed in the grid where the pointer sits, and a gray box surrounds the contact.

5. Without moving the cursor, type Input_1, 1i and press Enter. The editor recognizes that you are typing a variable name and address, shows the name in the ladder diagram, and places the

name and address in the VDT. (1i indicates the address %I00001.)

6. Note that the Normally Open Contact button "sticks." Once it is selected, you will place a contact in every time you click in the diagram. Cancel the Normally Open Contact selection by

pressing the Escape key.

7. Click the cursor to the right of the Input_1 contact and type nocon (for Normally Open Contact). Since there is no element in the current space, a progressive search is performed to find the

element you want as you type. Press Enter.

Note: You can drag and drop a variable from the VDT to an element in the logic editor if the function does

not have a variable assigned to the parameter. Steps 8 and 9 use this alternate means of assigning a variable

name to an element.

8. In the VDT, type the Name, Type, Len, and Address as shown in the figure below. (You can type in the bottom, empty row or choose Insert Row from the context-sensitive menu.)

9. Select the name Input_2 and drag it to the contact that you created in step 7.

10. Choose the Normally Open Coil from the Ladder Toolbar.

11. Place the coil in the diagram a few spaces away and to the right of the second contact.

12. Type Output_1, 1q and press Enter. A variable named Output_1 with a reference address of %Q00001 will be created in the VDT. Press Escape.

13. Use point-to-point wiring to connect the contacts and the coil. Do this by placing the pointer on the right side of the second contact, then right click, hold, and drag to draw a connection

from the contact to the right side of the coil. (The cursor changes to a hand with a pencil.)

Tidak ada komentar: