![Campbell CR3000 Micrologger Скачать руководство пользователя страница 480](http://html1.mh-extra.com/html/campbell/cr3000-micrologger/cr3000-micrologger_operators-manual_489090480.webp)
Section 8. Operation
480
8.10.3.2.5
Reading Inverse Format Modbus Registers
Some Modbus devices require reverse byte order words (CDAB vs. ABCD).
This can be true for either floating point, or integer formats. Since a slave
CR3000 uses the ABCD format, either the master has to make an adjustment,
which is sometimes possible, or the CR3000 needs to output reverse-byte order
words. To reverse the byte order in the CR3000, use the MoveBytes()
instruction as shown in the sample code below.
for
i = 1
to
k
MoveBytes
(InverseFloat(i),2,Float(i),0,2)
MoveBytes
(InverseFloat(i),0,Float(i),2,2)
next
In the example above, InverseFloat(i) is the array holding the inverse-byte
ordered word (CDAB). Array Float(i) holds the obverse-byte ordered word
(ABCD).
See Endianness
(p. 601).
8.10.3.2.6
Timing
The timeout is a critical parameter of Modbus communication. The response time
of devices is usually not specified by the manufacturer and can range from 100 ms
to more than 5 seconds. When the CR3000 is acting as a slave device, it typically
responds very quickly. The default timeout in a master device polling the CR3000
will typically not need adjustment from the default. When the CR3000 is acting as
a master, the response time of a slave needs particular attention. The best practice
is to monitor the communication between the CR3000 and the slave device with
the comms sniffer (terminal mode
(p. 523)
W command). The comms sniffer allows
you to see the actual response time of the slave device. The TimeOut parameter of
ModbusMaster() can then be adjusted accordingly.
8.10.3.3 Troubleshooting (Modbus)
Test Modbus functions on the CR3000 with third party Modbus software.
Further information is available at the following links:
•
www.simplyModbus.ca/FAQ.htm
•
www.Modbus.org/tech.php
•
www.lammertbies.nl/comm/info/modbus.html
8.10.3.4 Modbus over IP
When the CR3000 acts as the Modbus master, a TCPOpen() instruction must
precede the ModbusMaster() instruction. The connection handle returned by
TCPOpen() is used for the ComPort parameter.
In the case of ModbusSlave(), no TCPOpen() instruction is needed. Simply use
502 for the ComPort parameter.
Содержание CR3000 Micrologger
Страница 2: ......
Страница 3: ......
Страница 4: ......
Страница 6: ......
Страница 30: ......
Страница 34: ......
Страница 36: ......
Страница 96: ......
Страница 200: ...Section 7 Installation 200 FIGURE 42 Running Average Frequency Response FIGURE 43 Running Average Signal Attenuation ...
Страница 485: ...Section 8 Operation 485 8 11 2 Data Display FIGURE 110 Keyboard and Display Displaying Data ...
Страница 487: ...Section 8 Operation 487 FIGURE 112 CR1000KD Real Time Custom ...
Страница 488: ...Section 8 Operation 488 8 11 2 3 Final Storage Data FIGURE 113 Keyboard and Display Final Storage Data ...
Страница 489: ...Section 8 Operation 489 8 11 3 Run Stop Program FIGURE 114 Keyboard and Display Run Stop Program ...
Страница 491: ...Section 8 Operation 491 FIGURE 116 Keyboard and Display File Edit ...
Страница 495: ...Section 8 Operation 495 Low power standby whenever possible Low power bus sets bus and modules to low power ...
Страница 496: ......
Страница 502: ......
Страница 564: ...Section 11 Glossary 564 FIGURE 126 Relationships of Accuracy Precision and Resolution ...
Страница 566: ......
Страница 594: ......
Страница 598: ......
Страница 600: ......
Страница 602: ......
Страница 624: ......
Страница 642: ......
Страница 643: ......