PART 1: CX-Programmer
CHAPTER 4 – Reference
OMRON
CX-Programmer _Page 52
Programs written for one type of PLC may not be fully compatible with another type of PLC. In this event, CX-
Programmer attempts to change addresses and mnemonic instructions from the source PLC type to equivalent
addresses and instructions on the new type of PLC. It is not possible to convert a program that contains errors.
Any addresses and instructions that cannot be directly replaced are listed in the
Compile
tab of the Output
window. Refer to
Chapter 5 - Advanced Topics
for further information.
Deleting a PLC from the Project
Use 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 is displayed.
3. Select
the
Yes
pushbutton to remove the PLC. Select the
No
pushbutton to abort the
operation.
When a PLC is deleted, all associated information including the Ladder program/s are deleted from the project.
Symbols
Traditionally, 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 addresses have no
obvious meaning.
Some packages have allowed the user to give comments to the addresses, so that the program has some readable
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 used during
programming. This helps the readability and maintainability of the program. For example, it is possible to
change the address of a symbol, which changes the program to use the new address automatically.
Furthermore, CX-Programmer allows symbols to be defined for either a PLC or a program. This allows a
programmer to keep the definitions of the symbols for a particular program private from other programs within
the PLC. The symbols that are to be used in more than one program (global symbols) are then defined for the
PLC. Program symbols (local symbols) are kept in a local symbol table. PLC symbols are kept in a global
symbol table for the PLC.
Data Types
In addition to an address or number, a symbol has a
data type
. This describes the physical format of the data
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 the correct
way. More importantly, CX-Programmer checks that the symbol is not used in an inappropriate manner.
For example, a symbol can be defined with a data type of ‘UINT_BCD’, which means that the data within the
address is unsigned, single word integer of BCD format. CX-Programmer checks that the symbol is used only
for BCD type instructions, and issues a warning if it is not.
The available data types are listed below An icon is associated with each type, which indicates the internal
format of the type. The icon is shown in the symbol tables.
Name Size
Signed
Format
Notes
BOOL 1
bit
– Binary
Address of a logical binary value (Bit).
Used for contacts and coils.
CHANNEL
1 or
more
words
- Any
Address of a non-bit value (i.e. a single
word or longer value, unsigned or signed).
This type is used for backward
compatibility. If a non-bit address is given a
comment, the resulting symbol is given a
‘CHANNEL’ type.
DINT
2 words
Yes
Binary
Address of a double integer
INT
1 word
Yes
Binary
Address of an integer
Содержание Sysmac WS02-CXPC1-EV3
Страница 1: ...Cat No W414 E1 01 SYSMAC...
Страница 2: ......
Страница 3: ...SYSMAC WS02 CXPC1 EV3 CX Programmer Ver 3 1 Operation Manual Revised November 2002...
Страница 4: ......
Страница 6: ......
Страница 7: ...PART1 CX Programmer...
Страница 8: ......
Страница 24: ......
Страница 34: ......
Страница 106: ......
Страница 130: ......
Страница 131: ...PART 2 CX Server PLC Tools...
Страница 132: ......
Страница 136: ......
Страница 158: ......
Страница 168: ......
Страница 194: ......
Страница 206: ......
Страница 250: ......
Страница 298: ......
Страница 304: ......
Страница 305: ...PART 3 CX Server Runtime...
Страница 306: ......
Страница 310: ......
Страница 338: ......
Страница 344: ......
Страница 378: ......
Страница 384: ......
Страница 388: ......
Страница 390: ...Cat No W414 E1 01 Note Specifications subject to change without notice Printed in Japan Authorized Distributor...