Sabtu, 22 Mei 2010
Procedure When the Device Type and CPU Type Are Not Known
Selasa, 10 Maret 2009
Control Program Of PLC
types of instructions:
• contacts
• coils
Contacts are instructions that refer to the input conditions to the control program—that is, to the information supplied by the input field devices. Each contact in the control program monitors a certain field device. The contact waits for the input to do something in particular (e.g., turn on, turn off, etc.—this all depends on what type of contact it is). Then, the contact tells the PLC’s control program, “The input device just did what it’s supposed to do. You’d better check to see if this is supposed to affect any of the output devices.”
A contact is a computer code that monitors the status of an inputÉ ÉA coil is a computer code that monitors the status of an output. Coils are instructions that refer to the outputs of the control program— that is, to what each particular output device is supposed to do in the system. Like a contact, each coil also monitors a certain field device. However, unlike a contact, which monitors the field device and then tells the PLC what to do, a coil monitors the PLC control program and then tells the field device what to do. It tells the output device, “Hey, the PLC just told me that the switch turned on. That means that you’re supposed to turn on now. So let’s go!”
Central Procssing Unit of PLC
The CPU has three parts:
• the processor
• the memory system
• the power supply
The processor is the section of the CPU that codes, decodes, and computes data. The memory system is the section of the CPU that stores both the control program and data from the equipment connected to the PLC. The power supply is the section that provides the PLC with the voltage and current it needs to operate. The input/output (I/O) system is the section of a PLC to which all of the field devices are connected. If the CPU can be thought of as the brains of a PLC, then the I/O system can be thought of as the arms and legs. The I/O system is what actually physically carries out the control commands from the program stored in the PLC’s memory. The I/O system consists of two main parts:
• the rack
• I/O modules
The rack is an enclosure with slots in it that is connected to the CPU. I/O modules are devices with connection terminals to which the field devices are wired. Together, the rack and the I/O modules form the interface between the field devices and the PLC. When set up properly, each I/O module is both securely wired to its corresponding field devices and securely installed in a slot in the rack. This creates the physical connection between the field equipment and the PLC. In some small PLCs, the rack and the I/O modules come prepackaged as one unit.
• inputs
• outputs
Inputs are devices that supply a signal/data to a PLC. Typical examples of inputs are push buttons, switches, and measurement devices. Basically, an input device tells the PLC, “Hey, something’s happening out here…you need to check this out to see how it affects the control program.” Outputs are devices that await a signal/data from the PLC to perform their control functions. Lights, horns, motors, and valves are all good examples of output devices. These devices stay put, minding their own business, until the PLC says, “You need to turn on now” or “You’d better open up your valve a little more,” etc.
why we use PLC
LetÕs say that two push buttons, PB1 and PB2, are connected to a PLC. Two pilot lights, PL1 and PL2, are also connected to the PLC. The way these devices are connected now pressing push button PB1 turns on pilot light PL1 and pressing push button PB2 turns on pilot light PL2. LetÕs say that you want to change this around so that PB1 controls PL2 and PB2 controls PL1. In a traditional system, you would have to rewire the circuit so that the wiring from the first push button goes to the second pilot light and vice versa. However, because these devices are connected to a PLC, making this change is as simple as making a small change in the control program.
In addition to the programming flexibility we just mentioned, PLCs offer other advantages over traditional control systems. These advantages include:
• high reliability
• small space requirements
• computing capabilities
• reduced costs
• ability to withstand harsh environments
• expandability
Jumat, 06 Maret 2009
Function block in the ladder diagram.
1. Choose Data Move from the box on the left side of the Compact Function Toolbar. The listbox will become populated with the Data Move Functions.
2. Choose MOVE_WORD from the listbox, click the Function Drop Mode button , and move the cursor into the ladder diagram. A small function block icon will appear next to the mouse pointer.
3. Place the MOVE_WORD instruction in the diagram underneath the rung you created earlier by clicking in this location. Notice that this automatically becomes Rung 2 in the margin. Press the Escape key.
4. Wire the power flow input of the function to the power rail using the point-to-point wiring method.
5. Click in the grid block next to the IN input on the MOVE_WORD function. A gray box will appear next to the input.
6. Type 16#A01 and press Enter. You have just entered a hexadecimal constant as input to the function. The same convention is followed for octal and binary numbers (8#, 2#). You do not need to type a 0 in as a placeholder.
7. After hitting Enter, the gray box moved over to the space next to the Q output. Type REG_1,1R and press the Enter key. The name and address are added to the VDT.
8. Next, double click on the function block. The Function Properties Dialog Box appears. Enter the desired length (and for other functions, the address) and click OK.
Insert a row and drag & drop.
1. Insert an empty row between the Rungs 1 and 2 by right clicking on the MOVE_WORD function and selecting Insert Row from the context-sensitive menu.
2. Highlight the function block by clicking on the space to the left of the block and dragging down and to the right. Make sure the entire block and connected values are highlighted, including the constant 16#A01 and the output Reg_1. Release the mouse button.
3. Place the pointer back in the highlighted area and click and drag. When the function block is in the desired position, release the mouse button. The entire block has been cut and pasted into the new location.
4. Note that similar results can be achieved by highlighting an area and then right clicking and choosing Cut and then moving the cursor to the new location, right clicking, and selecting Paste. Or, you can use Ctrl + C
and Ctrl + V to cut and paste the highlighted elements.
5. Save your work: Select File, Save All or press Ctrl + Shift + A.
Insert a comment.
1. Click in an area below Rung 2.
2. From the Insert menu, select Comment. A comment line will appear in the area where the cursor was. This is automatically named Rung 3.
3. Double click on the comment line. A scroll box will appear.
4. Type in your comment, hitting enter when you want to create a new line. When you want to exit, press Ctrl + Enter to leave the comment window. Your LD program should be similar to the one shown below.
Note: To change the comment display format, select Tools, Options and choose the Brief or Full option on
the General tab.
Compile the program and navigate to errors
1. Insert a few contacts without naming them and a few function blocks without assigning lengths or inputs or outputs
2. Select Folder, Check Block _MAIN. This compiles the folder and brings up the Information Window. If the Information Window is too small, place the cursor on the edge of the window and
click and drag to enlarge it.
3. Scroll through the Information Window to see the errors. To navigate to an error, place the cursor on the error text and double click. The area where the error occurred will be highlighted in the
Ladder Editor window.
4. Fix the errors and check the block again. When there are no more errors, the Syntax Check Summary in the Information Window will show “Total errors: 0.”
Creating New Blocks
You can create new objects in the folder by right clicking in the Folder Browser and picking the appropriate menu item from the File menu or the context-sensitive menu.
Note: If you are using a Series 90 Micro PLC or Series 90-70 PLC, which do not support Instruction List subroutines, you will want to skip Lessons 7 and 8. You can continue with lessons 9 and 10.
Create an Instruction List block.
1. Right click in the Folder Browser and select New, Subroutine, Instruction List from the context sensitive menu. The Create New Instruction List dialog box will be displayed.
2. Name the new block and type in a brief description of the block. Click OK. An Instruction List editor window for the new block will open.
3. Set temporary variables for the IL block. Select Edit, Properties, Variable Table. Select the Temporary Variables radio button. In the Boolean Address Start field, type 1T (or %T00001). In the Integer Address Start field, type 500R (or %R00500). Click OK.
Place a call to your new block in the _MAIN program.
1. Open the _MAIN program. (If the _MAIN program is already open, select it from the Window menu. If it is not open, double click the _MAIN-LD block in the folder browser.)
2. Click the Call button in the Ladder Toolbar and then click in the ladder diagram below the comment you created in Lesson 6. Press Enter. The Call function block will appear as follows.
3. Press Enter and select the new block from the list box that appears.
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.)
Sabtu, 21 Februari 2009
automation ladder diagram basic knowledge
Enter the following simple rung in the Ladder Diagram editor by selecting each ladder component from the tool bar and placing it in the Editor window. To enter the contact variable, select the normal pointer (press escape), double click above the contact, and choose T_100MS from the list box. To enter the coil reference address, double click the coil and type 1q. T_100MS %Q00001
Edit a variable name.
In the Variable Declaration Table, type in a name and description for %Q00001. The name may be up to 32characters in length, and the description may contain up to 64 characters. The workspace on your desktop should now be similar to the one pictured on page 5. VersaPro PLC Programming Software Familiarization Lab October 2000
Importing Files
One of the first tasks you might undertake is to import a program developed using one of GE Fanuc’s earlier PLC programmer products, Logicmaster or Control. (VersaPro also provides the ability to import variables created in other applications such as CIMPLICITY HMI, Logicmaster, Control, or tools like Excel or Access.) To accomplish the tasks in this lesson, you will need syntactically correct Control and Logicmaster folders and Excel. The tasks are independent of each other – if you skip one, you will still be able to do the others.
Import a Logicmaster folder.
Series 90-70, Series 90-30, and Series 90 Micro folders can be imported from Logicmaster.
1. Select File, New Folder.
2. You will be prompted to close and save your existing open folder. (Only one folder can be open at a time.) Click Yes.
3. The New Folder Wizard will appear. Type a name of your choice for the folder. If you want to put the new folder in a directory different from that specified in the Location field, click the browse button next to the Location field to select the folder path.
4. Click the Next button.
5. On the next screen, choose Import Logicmaster 90. In the From field, use the browse button to locate a Logicmaster folder.
7. Spend a few minutes reviewing this folder. Note that all nicknames are imported and that all comments retain their original format. See how different instructions look in the VersaPro ladder diagram editor. You can use the function toolbar to create new logic. VersaPro PLC Programming Software Familiarization Lab October 2000
Import a Control software folder.
You can import VersaMax (.F2K), Series 90-30 (.F3X), and Series 90-70 (.EF7) folders from Control.
Note: When importing a Control folder, variables must first be exported from the Control folder in shared name file (SNF) format, if you want to import the variables.
1. Create an SNF File.
a. If you do not already have an .snf file containing variable information, open a folder in Control
software and use the Export feature from the Variable Declaration Table to create an .snf file.
b. Close Control before you proceed.
2. Create a new folder in VersaPro.
a. Select File, New Folder.
b. You will be prompted to close your existing open folder. (Only one folder can be open at a time.)
c. The New Folder Wizard will appear. Create a new folder with a new name. If you want to put the new folder in a directory different from that specified in the Location field, click the browse
button next to the Location field to select the folder path.
d. Click the Next button.
e. Choose Import Control on the next screen. In the From field, use the browser button to locate a Control folder.
f. Select the Include SNF checkbox, then click the Browse button and, in the Browse dialog box that appears, locate the SNF file that is associated with the Control file to be imported. (This field is optional.)
g. Click OK to begin the Import process.
h. Spend a few minutes reviewing this folder. Note that all nicknames are imported. Also, note that Comment contents are not imported. See how different instructions look in the VersaPro ladder diagram editor. You can use the function toolbar to create new logic.
3. Import a Shared Name File.
a. In the folder you just created, select any cell in the Variable Declaration Table. Select Tools,
Import Variables.
b. Locate the Shared Name File (filename extension .snf) on your computer. A browser window will open.
c. Click Open to import the file. If the file being imported contains variables that conflict (same
name and scope) with those in the VersaPro folder, the Variable Resolution dialog box will
appear. If this happens, you can simply click OK to accept the default settings, or press F1 to get
more information about the Variable Resolution settings.
d. The results of the Import process will be logged in the Information Window. Verify that the
variables you imported appear in the Variable Declaration Table.