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

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

Advertisement

2 Instruction Descriptions
 Date and Time Data
The structure of the text string to which the value of the member is converted is shown below.
Year
Hyphen
Month
The month (MM), day (DD), hour (hh), minutes (mm), and integer part of the seconds (ss) are
converted to two digits each and output to the text string. The fractional part of the seconds (ss) is
converted to nine digits and output to the text string.
An example is shown below.
Value of member
DT#2004-09-23-12:16:8.12
 Time of Day Data
The structure of the text string to which the value of the member is converted is shown below.
hh : mm : ss . SS
Colon
Colon
Hour
Minutes
The hour (hh), minutes (mm), and integer part of the seconds (ss) are converted to two digits each
and output to the text string. The fractional part of the seconds (ss) is converted to nine digits and
output to the text string.
An example is shown below.
Value of member
TOD#2:16:28.12
 Text String Data
The text string is output without any changes. The NULL character at the end of the text string is not
included. For example, if the value of the member is 'ABC' and includes a NULL character at the
end, 'ABC' without the NULL character is output to the text string.
 Structure Data
The values of the members are converted in order from the start of the structure down to the nesting
levels that are not structures. The values of the members are converted to text strings according to
the rules for their data types. For example, if a member of structure A has a data type of
Structure_B, the conversion works as shown below. Commas are used as delimiters in this example.
Data type
Member
Structure
memberA
A
memberB
Structure_B
memberC
 Enumeration Data
The value of the enumeration is treated as DINT data and converted accordingly.
For example, assume that an enumeration Color has three enumerators: red, yellow, and green. The
numbers associated with these enumerators are as follows: red = 1, yellow = 2, green = 3. If the
value of a member of enumeration Color is yellow, the text string will be '2'.
2-574
YYYY - MM - DD - hh : mm : ss . SS
Hyphen
Hyphen Hour Colon Minutes
Day
'2004-09-23-12:16:08.120000000'
Decimal
Decimal part
point
of seconds
Integer part
of seconds
'02:16:28.120000000'
Structure
Value
'ABC'
STRING
B
---
STRING
'XYZ'
Decimal part
Decimal
Colon
of seconds
point
Integer part
of seconds
Converted text string
Converted text string
Member Data type Value
member1
INT
INT#12
member2
INT
INT#34
member3
INT
INT#56

NY-series Instructions Reference Manual (W560)

Structure A is converted to a text string.
'ABC,12,34,56,XYZ'

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents