5 User Communication
22-48
SmartAXIS Touch User's Manual
■
Conversion Type
After calculating the data using the specified calculation type, select the type of conversion for the data from the
following.
■
Number of bytes
After converting according to the specifed conversion type, select
1
or
2
for the number of bytes for transmission
data.
Example: BCC for transmission command data
This example describes the case of transmitting the BCC calculation result from the following transmission data as
BCC data.
• Calculation Start Position and Calculation End Position
When Calculation Start Position is 2 and Calculation End Position is 1: Calculates the range
1234
.
• Calculation Type
• Conversion Type
When the BCC calculation result is
0004h
, the converted data is as follows.
Modbus RTU (CRC):
CRC-16 (Generating polynomial:x
16
+x
15
+x
2
+1) is calculated according to the following
procedure. Conversion Type: No Conversion,
Number of bytes: 2
1. Obtain an exclusive OR (XOR) of 1 byte data at Calculation Start Position and FFFFh.
2. If the least significant bit of the result of step 1 is 0, shift to the right by one bit. If the
bit is 1, shift to the right by 1 bit and obtain XOR of the result and the value (A001h).
3. Repeat step 2 to shift 8 times.
4. Obtain XOR of the next one byte of data and the result of step 3.
5. Repeat steps 2 through 4 until the data at Calculation End Position is processed.
6. Send the result of step 5 in the order of the lower byte and upper byte.
Example: 1234h
→
34h, 12h
Binary (HEX) to ASCII
Considers the data as binary-coded hexadecimal number and converts it to ASCII data.
No conversion:
No conversion is performed.
XOR:
31h^32h^33h^34h^=04h
ADD:
31h+32h+33h+34h=CAh
ADD (2's Complement): Inverts the bit of CAh+1=36h
Modbus ASCII (LCR):
BA
→
42h, 41h
Modbus RTU (CRC):
BA30h
→
BAh, 30h
1
(31h)
4
(34h)
5
(35h)
2
(32h)
STX
(02h)
3
(33h)
BCC
CR
(0Dh)
1
(31h)
4
(34h)
5
(35h)
2
(32h)
STX
(02h)
3
(33h)
BCC
CR
(0Dh)
(1)
(2)
(3)
(4)
(5)
(6)
Calculation Start Position:
(5)
(4)
(3)
(2)
(1)
(0)
Calculation End Position:
Data used for BCC calculation
0004h
Binary (HEX) to ASCII
0
(30h)
Data
4
(34h)
0004h
No conversion
00h
Data
04h
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 ...