Measurement Computing CB-7000 Utilities User Manual
Page 38

34
4
Frequently Asked Questions
4.1
7000 FAQ
Q: How is the checksum computed?
A: The steps to compute checksum are as following:
Step 1: Checksum=0;
Step 2: For overall command byte with index, do this loop:
Checksum = Checksum + Command byte [index]
Step 3: Checksum = Checksum & 0xff
Step 4: Convert checksum to ASCII high byte and ASCII low byte
For example,
Command = $012[Enter]
Checksum = '$'+'0'+'1'+'2' = 0x24+0x30+0x31+0x32 = 0xB7
Checksum & 0xff = 0xB7
Checksum high byte = 'B'
Checksum low byte = '7'
Command with checksum = $012B7[Enter]
Q
:
When to do I use a repeater in the RS-485 network?
A: The us er should use repeater when the network has m ore than 256 m odules, or it is over
1.2 km long.
Q: What is the maximum scan rate in the RS-485 network?
A: The s can rate depends on t he baud rate of RS-232 COM port, checksum status, module
numbers, channels, command to send, result string that received and system performance.
•
For the environment to test:
•
7012 module: x 1
•
Channel: x 1
•
Baud Rate: 115200 bps
•
Command: #AA (cr)(null) ==> 5 Chars
•
Result: >SDDDDDD (cr) ==> 9 Chars
•
1 Char: 1 Start bit + 8 Data bits + 1 Stop bit = 10 bits
•
Every communications: Command string + Result string
•
= 14 Chars = 140 bits
•
140 (bits/communication) / 115200 (bits/sec)
•
= 0.00122 (sec/communication)
•
Hardware delays (every communications): 1 ms
•
Scan rate: 1/ (0.00122 + 0.001) = 450 (communication/sec)
•
Estimated scan rate:
•
450 times/sec maximum.
•
Tested value of scan rate:
•
440 times/sec maximum without system message processing.
•
360 times/sec maximum with system message processing.