![IDEC SmartAXIS Touch FT1A Series User Manual Download Page 909](http://html.mh-extra.com/html/idec/smartaxis-touch-ft1a-series/smartaxis-touch-ft1a-series_user-manual_617387909.webp)
SmartAXIS Touch User’s Manual
20-39
5 Script Coding Examples
20
Scr
ipt
Script
Operation description
Converts the decimal numeric value in LDR200 to a string and stores it in order with LDR100 as the starting address.
Converting 1234 (when the data type is BIN16+)
Converting -12345 (when the data type is BIN16+/-)
Converting 1234567890 (when the data type is BIN32+)
Converting -1234567890 (when the data type is BIN32+/-)
■
Example 5.7.20
Convert decimal to string
DEC2ASCII([LDR 100], [LDR 200]);
• This function can be used with data types BIN16(+), BIN16(+/-), BIN32(+), BIN32(+/-), BCD4, and
BCD8.
• 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 3 “3.1 System Tab” on page 3-19.
• A NULL terminating character (0x00) is added to the end of the string.
Device
Stored value
Device
Stored value
Upper byte
Lower byte
LDR200
1234
LDR100
'1' = 0x31
'2' = 0x32
LDR101
'3' = 0x33
'4' = 0x34
LDR102
0x00
0x00
Terminating character
Device
Stored value
Device
Stored value
Upper byte
Lower byte
LDR200
-12345
LDR100
'-' = 0x2D
'1' = 0x31
LDR101
'2' = 0x32
'3' = 0x33
LDR102
'4' = 0x34
'5' = 0x35
LDR103
0x00
0x00
Terminating character
Device
Stored value
Device
Stored value
Upper byte
Lower byte
LDR200
1234567890
LDR100
'1' = 0x31
'2' = 0x32
LDR201
LDR101
'3' = 0x33
'4' = 0x34
LDR102
'5' = 0x35
'6' = 0x36
LDR103
'7' = 0x37
'8' = 0x38
LDR104
'9' = 0x39
'0' = 0x30
LDR105
0x00
0x00
Terminating character
Device
Stored value
Device
Stored value
Upper byte
Lower byte
LDR200
-1234567890
LDR100
'-' = 0x2D
'1' = 0x31
LDR201
LDR101
'2' = 0x32
'3' = 0x33
LDR102
'4' = 0x34
'5' = 0x35
LDR103
'6' = 0x36
'7' = 0x37
LDR104
'8' = 0x38
'9' = 0x39
LDR105
'0' = 0x30
0x00
Terminating character
Summary of Contents for SmartAXIS Touch FT1A Series
Page 1: ...FT1A Series FT9Y B1390 4 SmartAXIS Touch User s Manual ...
Page 22: ...Contents Preface 21 SmartAXIS Touch User s Manual ...
Page 240: ...6 Using Library Screens 4 36 SmartAXIS Touch User s Manual ...
Page 416: ...2 Multi State Lamps 8 26 SmartAXIS Touch User s Manual ...
Page 558: ...9 Calendar 9 142 SmartAXIS Touch User s Manual ...
Page 668: ...6 Timer 11 52 SmartAXIS Touch User s Manual ...
Page 754: ...4 Using Data and Detected Alarms 13 34 SmartAXIS Touch User s Manual ...
Page 792: ...4 Using the Data 14 38 SmartAXIS Touch User s Manual ...
Page 810: ...4 Using the Data 15 18 SmartAXIS Touch User s Manual ...
Page 870: ...3 Text Manager 19 16 SmartAXIS Touch User s Manual ...
Page 924: ...6 Important Notes 20 54 SmartAXIS Touch User s Manual ...
Page 1036: ...5 User Communication 22 74 SmartAXIS Touch User s Manual ...
Page 1092: ...2 Monitoring on the Touch 24 26 SmartAXIS Touch User s Manual ...
Page 1142: ...2 Word Devices 27 18 SmartAXIS Touch User s Manual ...
Page 1186: ...2 Analog Cartridge 29 34 SmartAXIS Touch User s Manual ...
Page 1194: ...3 Handling Problems 30 8 SmartAXIS Touch User s Manual ...