
WindO/I-NV4 User’s Manual
20-47
5 Script Coding Examples
20
Script
Script
Operation description
Converts the decimal numeric value in LDR200 to a string and stores it in order with LDR100 as the starting address number.
Converting 1234 (when the data type is UBIN16(W))
Converting -12345 (when the data type is BIN16(I))
Converting 1234567890 (when the data type is UBIN32(D))
Converting -1234567890 (when the data type is BIN32(L))
■
Example 5.7.20
Convert decimal to string
DEC2ASCII([LDR 100], [LDR 200]);
• This function can be used with data types UBIN16(W), BIN16(I), UBIN32(D), BIN32(L), BCD4(B), and
BCD8(EB).
• Only internal devices can be used.
• When using functions that handle strings, check the
Storage Method of string data
setting on the
System
tab in the
Project Settings
dialog box. Depending on the setting, the upper and lower bytes
are stored in the reverse of the following explanation.
For details, refer to Chapter 4 “3.1 System Tab” on page 4-25.
• A NULL terminating character (0x00) is added to the end of the string.
Device address
Stored value
Device address Stored value
Upper byte
Lower byte
2
3
x
0
=
'
2
'
1
3
x
0
=
'
1
'
LDR100
4
3
2
1
LDR200
LDR101 '3' = 0x33
'4' = 0x34
LDR102 0x00
0x00
Terminating character
Terminating character
Device address
Stored value
Device address Stored value
Upper byte
Lower byte
1
3
x
0
=
'
1
'
D
2
x
0
=
'
-
'
LDR100
5
4
3
2
1
-
LDR200
LDR101
'2' = 0x32
'3' = 0x33
LDR102
'4' = 0x34
'5' = 0x35
LDR103 0x00
0x00
Terminating character
Device address
Stored value
Device address Stored value
Upper byte
Lower byte
LDR200
LDR201
1234567890
LDR100
'1' = 0x31
'2' = 0x32
4
3
x
0
=
'
4
'
3
3
x
0
=
'
3
'
LDR101
LDR102
'5' = 0x35
'6' = 0x36
LDR103
'7' = 0x37
'8' = 0x38
LDR104
'9' = 0x39
'0' = 0x30
LDR105 0x00
0x00
Terminating character
Terminating character
Device address
Stored value
Device address Stored value
Upper byte
Lower byte
LDR200
-1234567890
LDR100
'-' = 0x2D
'1' = 0x31
3
3
x
0
=
'
3
'
2
3
x
0
=
'
2
'
LDR101
LDR201
LDR102
'4' = 0x34
'5' = 0x35
LDR103
'6' = 0x36
'7' = 0x37
LDR104
'8' = 0x38
'9' = 0x39
LDR105
'0' = 0x30
0x00
Terminating character
Terminating character
Summary of Contents for MICRO/I HG4G-CJT22 F-B Series
Page 1: ...B 1701 11 User s Manual ...
Page 26: ...Preface 25 WindO I NV4 User s Manual ...
Page 106: ...5 WindO I NV4 Common Operations and Settings 2 74 WindO I NV4 User s Manual ...
Page 254: ...7 BACnet Communication 3 148 WindO I NV4 User s Manual ...
Page 362: ...5 Screen Restrictions 5 28 WindO I NV4 User s Manual ...
Page 402: ...3 Text 7 30 WindO I NV4 User s Manual ...
Page 574: ...9 Potentiometer 8 172 WindO I NV4 User s Manual ...
Page 1052: ...4 Using the Data 15 22 WindO I NV4 User s Manual ...
Page 1170: ...6 Important Notes 20 60 WindO I NV4 User s Manual ...
Page 1200: ...5 Restrictions 22 18 WindO I NV4 User s Manual ...
Page 1260: ...5 Editing User Accounts on the MICRO I 23 60 WindO I NV4 User s Manual ...
Page 1322: ...2 Monitoring on the MICRO I 25 28 WindO I NV4 User s Manual ...
Page 1414: ...4 E mail Function 28 66 WindO I NV4 User s Manual ...
Page 1554: ...3 Settings 34 14 WindO I NV4 User s Manual ...
Page 1642: ...2 Handling Problems 36 6 WindO I NV4 User s Manual ...
Page 1652: ...5 Text Alignment A 10 WindO I NV4 User s Manual ...
Page 1664: ...Index 12 WindO I NV4 User s Manual ...