Ny-Series Instructions Reference Manual (W560 - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

 Array Data
The text strings for the elements of the array are separated with the delimiter. The value of each ele-
ment is converted according to the conversion rules for the data type of the array. Only one-dimen-
sional arrays are converted.
For example, take the INT array myArray[0..2]. If the value of myArray[0] is INT#225, the value of
myArray[1] is INT#-128, the value of myArray[2] is INT#0, and the delimiter is a comma, the text
string would be as follows: '225,−128,0'.
Notation Example
The following notation is used to convert the myStruct structure to the myString text string. The ','
(comma) is the delimiter.
LD
myStruct
_COMMA
Structure
myStruct
member1
member2
member3
member4
Additional Information
• You can combine this instruction with the FilePuts instruction (page 2-1289) to easily write values to
specified CSV files in an SD Memory Card. Refer to Sample Programming for an application exam-
ple.
• You can use the SubDelimiter instruction (page 2-582) to read text strings that were converted with
the AddDelimiter instruction and output them as the values of the members of a structure.
Precautions for Correct Use
• Do not use the delimiter in the values of the members of In. If the delimiter is used in the values of the
members of In, the SubDelimiter instruction will not correctly convert the text strings to the values of
the members of a structure.
• An error occurs in the following cases. ENO will be FALSE, and Out will not change.
• The text string that resulted from conversion exceeds 1,986 bytes, including the final NULL char-
acter.
• A member of In is an array with more than one dimension.
• A member of In is a union.
Version Information
A CPU Unit with unit version 1.02 or later and Sysmac Studio version 1.03 or higher are required
to use this instruction.

NY-series Instructions Reference Manual (W560)

AddDelimiter
EN
ENO
In
myString
Delimiter
Data type
Value
Member
STRING
'XYZ'
INT#12
INT
WORD
WORD#16#00AB
REAL
REAL#3.14e0
2 Instruction Descriptions
ST
myString:=AddDelimiter(myStruct,_COMMA);
Converted to a text string.
'XYZ,12,00AB,3.140000e+00'
Out = myString
2
2-575

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents