11 - 44 11 - 44
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
DATA
Instruction
DATA
• Specifies values and character strings to be read by READ.
DATA <constant> [ <, constant> …]
Syntax
constant
• • • •
Specify any numeric value constant (fixed point
constant, floating point constant, integer constant), or
a character string constant.
Examples
DATA 1, 2, 3
• • • •
Defines the data (1, 2, 3) that is read by the READ
instruction.
Description
• The DATA instruction specifies the data to be read by the READ instruction.
• The DATA instruction is a non-executable instruction and can be written in any place of the
program.
• One DATA instruction can specify as many constants as they fit in one line (255
characters) separated by comma (,).
If the character string constant contains comma (,), colon (:), semicolon (;), or a space
before or after, the constant needs to be enclosed with the double quotation marks (“).
Otherwise, no quotation marks are necessary.
• One program can contain multiple DATA instructions.
• The READ instruction reads data in the ascending order of the line number that contains a
DATA instruction.
• The type of the constant in a DATA instruction and the type of the variable that
corresponds to the READ instruction must match.
The constant of the DATA instruction can be read again from any location by executing a
RESTORE instruction.
• The DATA instruction is normally used in a pair with the READ instruction. See the READ
instruction for details.
• An “Out of DATA” error occurs if there are fewer number of data than the count to be read
by the READ instruction.
Содержание A1SD51S
Страница 183: ...11 13 11 13 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS RUN Before swap A 0 H924 A 1 H1159 After swap A 0 H1159 A 1 H924 OK...
Страница 331: ...11 161 11 161 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CON ON OFF STOP and ZOPEN functions and Section 7 4...
Страница 557: ...11 387 11 387 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CHR SPACE and SPC functions...
Страница 629: ...11 459 11 459 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZOPEN ZSEND and ZCNTL instructions and Section 7 3 4...
Страница 645: ...11 475 11 475 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZEVENT ZSIGNAL and DEF ZEVENT instructions...