Senin, 16 Februari 2009

Working With Blocks in VersaMax versapro programming from Ge fanuc

The Series 90-30 and VersaMax PLCs support multiple blocks per folder (the total umber of blocks vary, depending on the PLC configured). All PLCs require that ne of the blocks is _MAIN. This block is automatically created when you create a ew folder. This chapter describes how to work with blocks using VersaPro Programming Software.
Chapter Contents
· How to create and open blocks and objects
· How to manage blocks and related components in the folder browser
· How to work with variables associated with folder components.
· How to convert blocks between IL and LD

Creating, Inserting and Opening Blocks
VersaPro allows you to use multiple blocks per folder, one of which must always be a _MAIN block. A name is always required in order for a block to be created. Note that each PLC model has a different limit for the number of blocks, excluding _MAIN, that can be created in a folder. (Series 90 Micro supports only a _MAIN block.) More than one block can be open at once. Once a block has been created, it can be called from within the _MAIN or any other block. You can also call a block that does not yet exist, but that you intend to create. When you compile, a syntax error appears, reminding you that the new block has not been defined.

Creating a Subroutine
1. With a folder open, choose New from the File or Context-Sensitive menu. From the Subroutine submenu, select Ladder or Instruction List. (You can also create a Ladder subroutine by clicking the New Block button on the toolbar. The Create New Ladder Diagram or Create New Instruction List dialog box appears.
2. On the Basic Properties tab, enter a unique name for the new block. Restrictions on name entries. If you are creating a timed interrupt block for a 90-30 PLC, the block name must on form to the requirements for Timed Interrupt.
3. If you wish, enter a description for the block.
4. To assign Interrupt parameters to the block, select the Schedule tab. Double click under the Type column to select I/O Interrupt or Timed Interrupt. For details about the interrupt parameters, click the dialog box Help button.

Note: For a 90-30 timed interrupt block, the block name determines the time base, delay, and time interval parameters. If you change these values, an error message will appear when you try to close the dialog.
5. To place restrictions on editing or viewing the block, select the Lock tab.
6. Click OK. A new block is created. If the Folder Browser is open and a block is selected, the block is added to the Folder Browser above the currently selected item. If the Folder Browser is closed, or the Folder node, Hardware Configuration, or VDT in the browser is selected, the block is added at the end of the browser.

Creating an External C Block
Note: The C executable file must be created using the C Programmer’s Toolkit for Series 90 PLCs. Also, it must be created specifically for the target PLC (90-70 or high-end 90-30). 90-30 C blocks do not use input/output parameters.
1. With a folder open, choose New, External from the File or Context-Sensitive menu. The Create New C Block dialog box appears.
2. On the Basic Properties tab, enter a unique name for the new block. Restrictions on name entries.
3. If you wish, enter a description for the block. Restrictions on Descriptions..
4. To associate a C executable file (.exe) to the block, select the C Binary tab. To locate the C program that you want to use, click the browser button next to the Update Using field.
5. To assign Interrupt parameters to the block, select the Schedule tab. Double click under the Type column to select I/O Interrupt or Timed Interrupt. For details about the interrupt parameters, click the dialog box Help button. (A C block can have either Interrupt parameters or Input/Output parameters, not both.)
6. To assign Input/Output parameters to the block, select the Parameters tab. Up to seven parameter pairs can be assigned to an external C block for 90-70.
7. Click OK. A new block is created. If the Folder Browser is open and a block is selected, the block is added to the Folder Browser above the currently selected item. If the Folder Browser is closed, or the Folder node, Hardware Configuration, or VDT in the browser is selected, the block is added at the end of the browser.

Tidak ada komentar: