PART 1: CX-Programmer
OMRON
CHAPTER 4 – Reference
CX-Programmer _Page 77
E15_, E16_, E17_, E18_, E19_, E1A_, E1B_, E1C_, E1D_, E1E_, E1F_, FB, G, H, HR,
IO, IR, L, LR, S, ST, T, TIM, TK, TN, TR, W, and S
•
Predefined Character Strings
The following predefined character strings cannot be used. (These are not case
sensitive.)
BOOL, CHANNEL, COUNTER, DINT, DWORD, INT, LINT, LREAL, LWORD,
NUMBER, REAL, STRING, TIMER, UDINT, UDINT_BCD, UINT, UINT_BCD,
ULINT, ULINT_BCD, WORD, and STRUCT
Errors will not occur in the following cases even though operation will not be normal.
1.
Using the Same Structure Symbol Name More Than Once
The name of each structure symbol in one PLC must be unique.
For example, do not register structure symbols with the same name as both a global symbol and a
local symbol. Also, do not register structure symbols with the same name for two local symbols.
2.
Programs and Function Blocks with the Same Names as Structure Symbols or Members
The name of a program or function block cannot be used as the name of a structure symbol or
member in the same PLC.
Specifying Arrays
Variables can be specified as arrays with CX-Programmer Ver. 7.2 or higher (see note).
Variables can be specified as any data type, excluding STRING and NUMBER.
Note:
Only one-dimensional arrays are possible with CX-Programmer.
An array variable is specified if more than one variable of the same data type is being used and those variables
are to be managed as a group.
Perform the following procedure to specify an array variable.
1. Enter the variable name in the New Variable or Edit Variable Dialog Box and click the
Advance Settings
Button. The Detailed Settings Dialog Box will be displayed.
2. Check the Array Variable checkbox in the array settings field and enter the maximum number of elements.
In ladder, ST, and SFC languages, the array variable name must be followed by the subscript in square brackets
[ ].
For example, the variable name “PV” with three maximum elements would be specified as PV[0], PV[1], and
PV[2] in the instruction operand.
Subscripts can be specified only by directly using numbers. Subscripts cannot be specified by using variables.
Using Subscripts with Array Variables on the CJ2
When using a CJ2 CPU Unit, the number of the element can be directly input using the subscript of an array
variable in the ladder program. The number of the element can also be indirectly specified using a word address
or symbol. The word address or symbol that indirectly specifies the number of the element is placed into
brackets [ ] after the array variable name.
The format to specify the subscript of an array variable is as follows:
A[B]
Subscript: Element number, word address,
symbol
Array variable name
The above example specifies the element that is offset from start address (A) by the value specified by the
subscript (B) (see note) based on the data type of the array variable.
An offset address cannot be used as an operand in an instruction for which immediate refreshing is specified.
Note:
When setting a subscript for an array variable, do not specify a subscript that would cause the
resulting address to be outside of the memory area that contains the first word in the array. Be
particularly careful when using a word address or symbol to specify the subscript. Depending
Summary of Contents for CX-Programmer 9
Page 1: ...Cat No W446 E1 10 CX Programmer Ver 9 SYSMAC WS02 CXPC_ V9 OPERATION MANUAL...
Page 2: ......
Page 3: ...SYSMAC WS02 CXPC V9 CX Programmer Ver 9 Operation Manual Revised December 2009...
Page 4: ......
Page 6: ......
Page 19: ...CX Programmer_Page xvi Unit Versions and Lot Numbers...
Page 30: ......
Page 31: ...PART 1 CX Programmer...
Page 32: ......
Page 100: ......
Page 120: ......
Page 198: ...PART 1 CX Programmer CHAPTER 4 Reference OMRON CX Programmer _Page 118...
Page 224: ...PART 1 CX Programmer Keyboard Shortcuts CX Programmer OMRON CX Programmer _Page 144...
Page 240: ......
Page 241: ...PART 2 CX Server PLC Tools...
Page 242: ......
Page 250: ......
Page 256: ......
Page 268: ...PART 2 CX Server PLC Tools CHAPTER 2 PLC Memory Component OMRON CX Server PLC Tools_Page 18...
Page 286: ......
Page 338: ......
Page 382: ......
Page 414: ......
Page 430: ......
Page 436: ......
Page 437: ...PART 3 CX Server Runtime...
Page 438: ......
Page 482: ......
Page 488: ......
Page 504: ......
Page 530: ......
Page 540: ......
Page 541: ......
Page 542: ......