CX-Programmer User Manual (986752), страница 13
Текст из файла (страница 13)
Toolbars created in this way can also be deleted. Notehowever that although all the buttons can be removed from a default toolbar the toolbar it’s self can notbe deleted.Use the following procedure to create or delete a customised toolbar.1, 2, 3…Revision 2.01.Select Toolbar from the View menu. The Toolbars dialogue is displayed.2.Click the New button. This displays the New Toolbar dialogue.Page 61CHAPTER 3 – Project ReferencePage 62OMRON3.Enter a name for the new toolbar and click OK. The new toolbar will then beadded to the list of toolbars and displayed on the screen.
It can then be repositionedif necessary by dragging and dropping.4.To move a button from an existing toolbar to the new one, select the button to bemoved and drag and drop it in position in the new toolbar.5.If a particular button is not visible click the Commands tab and from the list ofCategories select the type of buttons to be viewed6.Click on the selected button and drag and drop it in position in the new toolbar.7.To delete a customised toolbar select it from the list of toolbars and click the Deletebutton.Revision 2.0OMRONCHAPTER 4 – ReferenceCHAPTER 4ReferenceThis chapter introduces the objects contained in the project workspace and discusses their associatedcommands and features.The following components, which are available either from the project hierarchy or from main menu,form part of the CX-Server software.♦PLC Memory.
Refer to Chapter 4 - PLC Memory Component of the CX-Server User Manual;♦IO Table. Refer to Chapter 5 - IO Table Component of the CX-Server User Manual;♦PLC Settings. Refer to Chapter 6 - PLC Setup Component of the CX-Server User Manual;♦Data Trace/Time Chart Monitor. Refer to Chapter 7 - Data Trace/Time Chart Monitor Componentof the CX-Server User Manual;♦Error Log. Refer to Chapter 8 - PLC Error Component of the CX-Server User Manual;♦Clock. Refer to the CX-Server User Manual.♦Memory Card. Refer to Chapter 9 - Memory Card Component of the CX-Server User Manual.PLCs and ProjectsA project file contains one or more PLCs that are (potentially) connected to the computer. These PLCsdo not really have to be connected unless communications with them are to occur.
A full description ofthe communications possibilities for C-series PLCs, CV-series PLCs and CS1-series PLCs is providedin the CX-Server User Manual.The PLCs selected also affect which setup procedures need to be performed. For example, the CV-seriesand CS1-series require setting up the IO Table via the IO Table object in the project workspace and usingthe PLC settings object to establish specific PLC characteristics.Connection to the PLC requires the specification of the type of communications interface to be used toconnect to the PLC.
Two methods of communication are available: serial communications and networkcommunications. Serial and network communications can be made using communication types althoughthese are dependent upon the type of communicating PLC.Adding a PLC to the ProjectCX-Programmer supports multiple PLC and multiple program support. When a project is initiallyconfigured, it contains one PLC and one program. Additional PLCs and programs can be added.Revision 2.0Page 63CHAPTER 4 – ReferenceOMRONUse the following procedure to add a PLC to a project.1, 2, 3…1.Select the Project object in the project workspace.2.Select the New PLC button from the toolbar.
The Change PLC dialogue isdisplayed, part of the CX-Server application.3.Setup the PLC as required. Refer to the CX-Server User Manual for furtherinformation.The project workspace is updated with a new PLC entry plus its associated global symbol table, IO Table,PLC Settings, Memory data and Program. An empty Ladder program is also displayed in the DiagramWorkspace.The initial project, program and PLC settings are made whilst the PLC is offline. In order to test theprogram, examine memory or monitor PLC operations, communications must first be established withthe PLC. Refer to Chapter - 4 Working On-line.Changing a PLC in a ProjectTo change a PLC, double-click on the PLC object in the project workspace.
The Change PLC dialogueis displayed. Refer to the CX-Server User Manual for further information.Programs written for one type of PLC may not be fully compatible with another type of PLC. In thisevent, CX-Programmer attempts to change addresses and mnemonic instructions from the source PLCtype to equivalent addresses and instructions on the new type of PLC. It is not possible to convert aprogram that contains errors. Any addresses and instructions that cannot be directly replaced are listedin the Compile tab of the Output window. Refer to Chapter 5 - Advanced Topics for further information.Deleting a PLC from the ProjectUse the following procedure to delete a PLC.1, 2, 3…1.Select the PLC object in the project workspace.2.Select Delete from the context sensitive menu.
A confirmation dialogue isdisplayed.3.Select the Yes pushbutton to remove the PLC. Select the No pushbutton to abortthe operation.When a PLC is deleted, all associated information including the Ladder program/s are deleted from theproject.SymbolsTraditionally, PLC programmers have used numbers and addresses for operands within their programs.Without further documentation, the program becomes very difficult to read and maintain, since addresseshave no obvious meaning.Page 64Revision 2.0OMRONCHAPTER 4 – ReferenceSome packages have allowed the user to give comments to the addresses, so that the program has somereadable documentation.
CX-Programmer supports this feature.However, it is more powerful to use symbolic programming, where names are used instead of addresses.A symbol is a named variable that can have an address or number. The name of the symbol is then usedduring programming. This helps the readability and maintainability of the program. For example, it ispossible to change the address of a symbol, which changes the program to use the new addressautomatically.Furthermore, CX-Programmer allows symbols to be defined for a PLC or a program. This allows aprogrammer to keep the definitions of the symbols for a particular program private.
The symbols thatare to be used in more than one program are then defined for the PLC. Program symbols are kept in alocal symbol table. PLC symbols are kept in a global symbol table for the PLC.Data TypesIn addition to an address or number, a symbol has a data type. This describes the physical format of thedata that is held within the symbol, including its size.Since a symbol’s format is known, CX-Programmer is able to monitor the contents of the symbol in thecorrect way. More importantly, CX-Programmer checks that the symbol is not used in an inappropriatemanner.For example, a symbol can be defined with a data type of ‘UINT_BCD’, which means that the datawithin the address is unsigned, single word integer of BCD format. CX-Programmer checks that thesymbol is used only for BCD type instructions, and issues a warning if it is not.The available data types are listed following.
An icon is associated with each type, which indicates theinternal format of the type. The icon is shown in the symbol tables.NameSizeSigned1 bit–BinaryAddress of a logical binary value (Bit).Used for contacts and coils.1 ormorewords-AnyAddress of a non-bit value (i.e. a singleword or longer value, unsigned or signed).This type is used for backwardcompatibility. If a non-bit address is given acomment, the resulting symbol is given a‘CHANNEL’ type.DINT2 wordsYesBinaryAddress of a double integerINT1 wordYesBinaryAddress of an integerLINT4 wordsYesBinaryAddress of a long integerBOOLCHANNELRevision 2.0FormatNotesPage 65CHAPTER 4 – ReferenceNameNUMBEROMRONSizeSigned–YesFormatDecimalNotesA literal value - not an address. ‘NUMBER’type symbols can be used for numericoperands which are usually prefixed with‘#’,‘&’, ‘+’ or ‘-‘.
They can be used in BCDor binary instructions. For BCD usage, thevalue is treated as if entered in hex (e.g. thenumber ‘1234’ has the same effect asentering ‘#1234’ in the operand).A floating-point value can be entered (e.g.‘3.1416’). An engineering format numbercan be entered (e.g. ‘-1.1e4’).A decimal value is assumed. Ahexadecimal value can be entered using aprefix of ‘#’.REAL2 wordsYesIEEEAddress of a floating-point number. Theformat is the 32-bit IEEE format. For thespecial OMRON floating point format (FDIVinstruction) use the UDINT_BCD type.UDINT2 wordsNoBinaryAddress of an unsigned double integerUDINT_BCD2 wordsNoBCDAddress of an unsigned double BCDintegerUINT1 wordNoBinaryAddress of an unsigned integerUINT_BCD1 wordNoBCDAddress of an unsigned BCD integerULINT4 wordsNoBinaryAddress of an unsigned long integerULINT_BCD4 wordsNoBCDAddress of an unsigned long BCD integerData Types and Timer / CountersInformation for a timer/counter on a PLC consists of two parts – a status bit and a set-value.