122
Procedures
Section 3-2
1,2,3...
1.
After inputting the variable name in the New Variable Dialog Box, click the
Advanced
Button. The Advanced Settings Dialog Box will be displayed.
2.
Select
Array Variable
in the
Array Settings
and input the maximum number
of elements in the array.
When the name of an array variable is entered in the algorithm in the func-
tion block definition, square brackets surrounding the index will appear af-
ter the array name.
For example, if you create a variable named PV with a maximum of 3 ele-
ments, PV[0], PV[1], and PV[2] could be specified as instruction operands.
There are three ways to specify indices.
• Directly with numbers, e.g., PV[1] in the above example (for ladder pro-
gramming or ST language programming)
• With a variable, e.g., PV[a] in the above example, where “a” is the
name of a variable with a data type of INT (for ladder programming or
ST language programming)
• With an equation, e.g., PV[a+b] or PV[a+1} in the above example,
where “a” and “b” are the names of variables with a data type of INT
(for ST language programming only)
Using Structured Text
When using structured text, a dialog box will not be displayed to register the
variable whenever a variable name that has not been registered is input. Be
sure to always register variables used in standard text programming in the
variable table, either as you need them or after completing the program.
(Place the cursor in the tab page on which to register the variable, right-click,
and select
Insert Variable
from the popup menu.
Note
For details on structured text specifications, refer to
Appendix B Structured
Text (ST Language) Specifications.
Copying User Program Circuits and Pasting in Ladder Programming of Function
Block Definitions
A single circuit or multiple circuits in the user program can be copied and
pasted in the ladder programming of function block definitions. This operation,
however, is subject to the following restrictions.
Source Instruction
Operand: Address Only
Addresses are not registered in the function block definition variable tables.
After pasting, the addresses will be displayed in the operand in red. Double-
click on the instruction and input the variable name into the operand.
Note
Index Registers (IR) and Data Registers (DR), however, do not require modifi-
cation after pasting and function in the operand as is.
Select
Array Variable.
Input the number of elements.
Summary of Contents for CS1-H Series
Page 3: ...iv...
Page 5: ...vi...
Page 7: ...viii TABLE OF CONTENTS...
Page 15: ...xvi Application Precautions 4...
Page 151: ...136 Procedures Section 3 2...
Page 153: ...138 Data Types Appendix A...
Page 177: ...162 External Variables Appendix C...
Page 181: ...166 Revision History...