13
GF U3000 V2 Ultrasonic Flowmeter
Modbus Supplement to the operating instructions
3.6.3
Changing the Damping Time, Mode and Dynamic Damping Threshold
In this example we will set the Fixed damping time to 20 seconds, change the damping mode to Dynamic and change the Dynamic
Damping Acceleration Threshold to 0.25 m/s2.
1. Ensure inhibit bits are not set and that the update flags (bit 0 and bit 1 of the Status Flags register) are reset.
2. Send a MASK WRITE REGISTER message (command 22 or 0x16) to register address 5 with the AND mask being set to 0xFFFE
and the OR mask being 0x0001. This will set the “Lock-out Updates” flag (bit 0) of the Instrument Control Flags register.
3. There are two ways to set the value in the Damping register. Since 7 bits (0-6) are used for the Fixed damping time and the 7th
bit controls the mode (1=dynamic,0=fixed). These values can be set using MASK WRITE REGISTER message to set each field, or
first send A WRITE SINGLE REGISTER Command with the damping time, followed by a MASK WRITE REGISTER message to set
bit 7, or alternately just send a single WRITE SINGLE REGISTER command with the value of the damping time plus 128. All these
approaches are acceptable. This example will use the second method.
Since the damping time is 20 seconds, send a WRITE SINGLE REGISTER message (command 06) with the value 20 to register
address 138. Now send a MASK WRITE REGISTER message (command 22 or 0x16) to register address 138 with the AND mask
being set to 0xFF7F and the OR mask being 0x0080. This will set the Damping Type (mode) to dynamic.
The alternate method would be to send a WRITE SINGLE REGISTER message (command 06) with the value 20+128 = 148 to re-
gister address 138.
Send a float with the value 0.25 to register address 148. (It’s BIG-ENDIAN hex representation is 0x3e800000).
4. Send a MASK WRITE REGISTER message (command 22 or 0x16) to register address 136 with the AND mask being set to 0xFFEF
and the OR mask being 0x0010. This will start the update.
5. Send a MASK WRITE REGISTER message (command 22 or 0x16) to register address 5 with the AND mask being set to 0xFFFE
and the OR mask being 0x0000. This will clear the “Lock-out Updates” flag (bit 0) of the Instrument Control Flags register.
It should be noted that if any of these operations can be performed on its own. For example, it is possible to only change the damping
time by writing to the lower 7 bits (b0 to b6) of the Damping register. Equally it is possible to only change the damping mode by wri-
ting to bit 7 of Damping register. Finally, it is possible to just update the Damping Acceleration Threshold by changing only its value.
In essence, values in both the Damping register and the Damping Acceleration Threshold are written, but if they haven’t been chan-
ged, they will remain set as they were before.
3.7
Diagnostics
The DIAGNOSTICS command number is 08. Three DIAGNOSTICS sub-commands are supported. As mentioned earlier, they are sub-
command 00, Return Query Data, subcommand 01, Restart Communications and subcommand 04, Force Listen Only Mode.
Subcommand 00 allows a simple echo function to be performed. This is a good way to ensure that the unit’s communications are in
good order.
If there is reason to suspect that the communications link is being corrupted by a faulty unit, then subcommand 04 should be used
to take the suspect unit offline. Issues may then be addressed. After subcommand 04 is issued, the unit will ignore all commands but
one. The only command / subcommand that the Modbus board will respond to after being taken offline, is DIAGNOSTICS (command
8), sub command 01, which will restart the communications link. Provided any issues found have been addressed, after a couple of
seconds the unit should be back online again.
3.8
Read Device Identification
Both stream and individual access to device identification is supported for both BASIC and REGULAR data types. EXTENDED data
types are not supported but may be added in the future.