Introduction
This app note aims to take the user through the installation and basic usage of the command tool line tool.
The RTU unit will regulate a current loop according to the channel setting on the device. The unit requires an external voltage source for the loop to be provided, this can be between 9-33V
The RTU unit provides isolation between each channel, and each channel is powered by the loop voltage.
IMPORTANT : Note power off both sensor(s) and RTU unit before attaching/removing any wiring
Download and install software
If not already installed, run the command below to install the libmodbus dependencies
# apt-get install libmodbus5 libmodbus-dev
Next download and compile the demo app
$ wget https://github.com/synapsertu/rtu-ao4/archive/refs/heads/main.zip $ unzip main.zip $ cd rtu-ao4-main/ $ make
The tool provides a number of different options for controlling and presenting datapoint values read from the RTU unit
Check Basic Connectivity
Connect up the unit as shown below, taking care to connect the RS485 signal wires to the correct ports
Run the tool to make a sample read, depending on which COM port you have the RTU device attached to you should alter the line below accordingly
$ ./rtu-ao4 -p /dev/ttyAMA0
If you do not get a response check your RS485 cabling and connection order
Wiring Schedule
In this example we will show how to connect up the unit to a loop analyser to illustrate basic usage of the unit, in this case the loop analyser takes the place of the device to be controlled so we can see the mA current loop value being set by the RTU unit.
If we run the command below we can see the unit is set to output 0mA
$ ./rtu-ao4 /dev/ttyAMA0
Looking at the attached loop meter we can see the total loop draw is 1.58mA, this is the idle draw of the RTU's output channel.
A valid reading would be between 4-20mA, giving a margin for powering any devices on the loop.
0mA is usually indicative of an open circuit loop so useful for field diagnostics.
If we run the command below we can see the unit is set to output 10.80mA
$ ./rtu-ao4 /dev/ttyAMA0 -o 1 -s 1080