About Symbol Tables

  • Upload
    ddadara

  • View
    13

  • Download
    0

Embed Size (px)

DESCRIPTION

About Symbol Tables.pdf, OMRON PLC

Citation preview

  • About Symbol TablesSymbol Tables Symbol Editing Data TypesSymbol Concept Symbol Options Symbol Naming

    ____________________________________________________________________Definition Graphical Display Global & Local Tables Symbol Table Operation

    Validating Symbols Delete Unused Symbols Auto Allocation Import/Export

    DefinitionA Symbol is a symbolic representation of an Address or Value which can be used as an Operand for Ladder ProgrammingA symbol has the following parts:

    l Name: Comply with IEC61131-3

    l Data Type: Type of data i.e. BOOL, UINT, CHANNEL.

    l Address or Value

    l Comment: This is optional.

    l Network Variable: This is displayed for CJ2H-CPU -EIP or CJ2M-CPU3 PLCs. When ticked, you can access the network variables from the outside of CPU Unit.

    l Link to CX-Server: This allows the sharing of Symbols between other applications which use CX-Server.

    The Symbol Table contains 0 or more of these definitions.The address can map to an IO point or Memory Area on the PLC, and can also be a constant value.

    Graphical DisplaySymbols are contained in a table as follows:

    The table provides a list of Symbol definitions, it also shows the Symbols Rack Location and Usage.

    Global & Local Symbol TablesThere are two types of symbol table, Global and Local, as shown below:

    Page 1 of 5Symbols About

    15.2.2013mk:@MSITStore:C:\Program%20Files\OMRON\CX-One\CX-Programmer\cx-p.chm::/...

  • Both the Global and Local tables can contain user defined symbol definitions.

    Global Symbol TableAll programs can use Symbols defined in this table. Any symbols that are linked to CX-Server must be contained in this table.In addition this table contains the Predefined Symbols.

    Predefined symbolsWhen the operator creates a new PLC Configuration or Uploads a program from the PLC the application will generate a list of predefined symbols. These symbols are PLC specific and the operator has no control over how these are created.These predefined symbols are contained only in the Global Symbol Table. They are read only and can not be modified however, you are free to use them in any PLC program.The [Net. Variable] column shows the set attribute of the network symbol. This column is not displayed for the local symbols and PLCs other than CJ2H-CPU -EIP or CJ2M-CPU3 .

    Local Symbol TableSymbols in this table are defined as 'Local Scope', and they can only be used by the program that owns the table. Local symbols take priority over Global Symbols, thus a local symbol can override a global symbol by name or address.Refer to Symbol Linking ' for more information about the rules of Symbol Linking.

    Symbol Table Operation

    SortingThe symbols in the symbol table may be sorted by each of the field names by simply clicking on the name. Clicking on the field name again will order the table in the reverse order.The sorting will be either alphabetic or numeric according to which field is chosen. The only exception to this is the NUMBER data type, which will be sorted separately when the sort by 'Address / Value' is selected.

    SelectionSymbols can be selected using the standard Windows UI methods, which are:

    l Press and hold the control key, use the cursor keys to move and press the space bar.

    l Press and hold the control key select symbols using the left mouse button.

    l Press and hold the shift key, use the cursor keys to move. This will select a block of symbols from the starting position to end position. Alternatively the left mouse button can be used for this.

    Page 2 of 5Symbols About

    15.2.2013mk:@MSITStore:C:\Program%20Files\OMRON\CX-One\CX-Programmer\cx-p.chm::/...

  • InsertingSelect Insert Symbol from the 'Insert/Symbol' menu item. The following dialog should be displayed.

    The network symbol can be set when the global symbols are registered for the CJ2H-CPU -EIP or CJ2M-CPU3 PLCs.Type in the Symbol Name, select the Type, type in its Address and give it a Comment, comment is optional. The symbol should then be validated, if the symbol is invalid a message is displayed stating the error. The dialog will remain displayed until the correct information is entered or Cancel is selected.

    ModifyingSelect the symbol to modify using the mouse or cursor keys. Select the menu item Edit/Edit or double click with the left mouse button. A similar dialog to that used for inserting is displayed and the same procedure used as for inserting symbols.

    DeletingSelect the Symbol or Symbols to be deleted using the selection operation and press the delete key. A warning message will be displayed asking for confirmation. Selecting Yes will delete the selected symbol/s, No will cancel the operation.

    Copying and Pasting SymbolsSelect the Symbol/s to be copied and select 'Edit/Copy'. The selected symbols are copied to the clipboard in two formats the Export format, explained latter and the Application specific format. Pasting these symbols back into the same table will create copies of the Symbols, pasting them into another table will add new Symbols. If Symbols with the same name are already present then the following dialog is displayed.

    Page 3 of 5Symbols About

    15.2.2013mk:@MSITStore:C:\Program%20Files\OMRON\CX-One\CX-Programmer\cx-p.chm::/...

  • You then have the option of overwriting the symbol/s or not. If you choose selects not to overwrite then you have opportunity to correct the error. Symbols can be copied from a symbol table in the CX-Designer and pasted in a symbol table in the CX-Programmer. Symbols can also be pasted using an import format.

    Pasting Symbols with ErrorsOnly 2 of the following Symbols are correct the others are not, pasting all these Symbols will generate errors.

    If the above symbols are copied and pasted into a symbol table then the user will be presented with the following Dialog.

    You now have the option to edit the Symbol and correct the error, the new correction will appear in the 'New ?' column or to mark it for deletion. Selecting OK will commit the Symbols, with changes, to the Symbol Table for checking and inserting. Selecting Cancel will delete all the symbols in error.

    Validating SymbolsThe 'Validate Symbols' menu option is displayed on the 'Edit' menu. It is also displayed on the context menu (obtained by right-mouse-clicking). When Validate Symbol (Selected Item) is selected, the symbol table, where the cursor is, will be checked. Validate Symbol (ALL) will check all the symbol tables in the PLC, where the cursor is. The option performs the following validation checks:

    l the data of each symbol, in the selected symbol table, and outputs a warning message in the output window if any invalid symbols are found.

    l each symbol for duplicate addresses, in the selected symbol table, and outputs a warning message (including the symbol names) in the output window if any are found.

    l to see if any symbols, in the selected local symbol table, are overriding symbols defined in the global

    AmberLight BOOL 10.01 Correct SymbolAmberLight BOOL 10.01 Duplicate NameAmberLightTimerDone BOOL T0004 Correct SymbolGreenLight BOOL 999999 Incorrect AddressGreenTimerDone UNKNOWN Incorrect Type

    Page 4 of 5Symbols About

    15.2.2013mk:@MSITStore:C:\Program%20Files\OMRON\CX-One\CX-Programmer\cx-p.chm::/...

  • symbol table and outputs a warning message in the output window if any are found.

    l to see if any duplicated symbol names are defined in the symbol tables, and if any are found they are output into the output window.

    l to see if any Auto-Allocated addresses have been created that do not have addresses assigned to them and if any are found they are output into the output window as an error.

    Delete Unused SymbolsAny defined symbols in the symbol tables (both Global and Local) that are not used in the program, can be deleted by selecting the Delete Unused Symbols option from the Edit menu. In the Select area to delete dialog select the appropriate delete unused option and highlight the areas to be deleted.Symbols used in the Watch window, PLC Memory component, or Datatrace/Timechart Monitor component, they will not be counted as used symbols, therefor these symbols will be deleted from the symbol tables.

    Auto AllocationRefer to the 'Auto Allocation ' for a full explanation of the Auto Allocation functionality.

    Setting of Automatically Allocated AreasFor auto allocation to work it must be first set up to do this select menu item 'PLC/Automatic Allocation'. The auto allocation dialog should appear. Sets of auto allocated areas can then be added.

    CreatingTo create an auto allocated symbol, Insert or Modify a symbol but leave the address field empty. If auto allocation is on an address can be allocated, the auto allocated address should be shown as: AutoAllocatedSymbol CHANNEL 0[Auto]If no address can be allocated then the symbol should be displayed as:- AutoAllocatedSymbol CHANNEL n/a [Auto]Using this symbol, for which no address is allocated, within a Ladder Program should generate a compile error.

    ReallocatingIf the auto allocated areas are modified then the symbol table should be automatically updated to reflect these changes.

    Import and ExportUsing the following tabbed format symbols can be pasted into the Symbol Table. /t denotes tab Name/tData Type/tAddress/tComment/tLink to CX-ServerThe address can be left blank as this will create an auto allocated symbol. Comment is optional.Linking to CX-Server this is optional but if set to '1' will link Symbols to CX-Server through their CDM file. This option will only work if symbols are pasted into the Global Table. When copying symbols from the Symbol Table these are also added into the Clipboard in the tabbed format.For a further explanation see the Document Symbol Table Linking paragraph Microsoft Excel Format.The following is a set of test Symbols which can be copied and pasted into the Symbol Table.

    Name Data Type Address Comment Link to CX-ServerGlobalSymbol1 BOOL 1 Local Symbol 1 duplicate name 1GlobalSymbol2 BOOL 2 Global Symbol 2 1LocalSymbol1 BOOL 1 Local Symbol 1 -LocalSymbol1 BOOL 2 Local Symbol 1 duplicate name -LocalSymbol2 INT 123456 Local Symbol 2 in error -LocalSymbol3 BOOL 4 Local Symbol 3 -LocalSymbol4 BOOL 5 Local Symbol 4 -LocalSymbol5 BOOL 6 Local Symbol 5 -LocalSymbol6 BOOL 7 Local Symbol 6 -LocalSymbol7 CHANNEL 999999 Local Symbol 7 in error -LocalSymbol8 UINT 19 Local Symbol 8 -LocalSymbol9 BOOL 10 Local Symbol 9 -

    Page 5 of 5Symbols About

    15.2.2013mk:@MSITStore:C:\Program%20Files\OMRON\CX-One\CX-Programmer\cx-p.chm::/...