The nM Automated Monitoring Node - Plus Model (AMN-PLUS) can communicate with RS485 Modbus RTU-enabled devices, such as sensors as well as Smart VFD drives that provide pump status for example.
Support for Modbus sensors was added in version 2.11 of the Automated Monitoring Node firmware. Please see the firmware update guide for information on updating the firmware.
A Modbus device typically has just two communication wires (A and B) and power and ground. There are a few exceptions, such as when the power to the sensor is separated and this will be described below as well.
Name | Purpose | nM Port |
Modbus COM A | Positive polarity, noninverting receiver input (and noninverting driver output). Impedance is >96kΩ in receive mode or unpowered. | A |
Modbus COM B | Negative polarity, inverting receiver input (and inverting driver output). Impedance is >96kΩ in receive mode or unpowered. | B |
GND | Ground | GND |
Power + | Provides power to sensor | NOTE: Typically sensors do not include this and only use A/B and ground, if provided or required, make sure to connect to the power specified by the sensor manufacturer |
The Modbus device will need to be configured as the following:
Configuration | Setting |
Baud | 9600 |
Data Bits | 8 |
Stop Bits | 1 |
Parity Bits | None |
First, you will need to open a serial terminal to the AMN and arrive at the NeatMon Main Menu. If you are unsure how to do this check the Opening Serial Terminal guide.
NeatMon Main Menu
1: Network config
2: Sensor config
3: Utilities
x: < Save & Quit
>
Choose Sensor config by pressing 2.
Sensor Config
1: Add sensor
2: Disable Battery monitor
3: List sensors
4: Delete sensor
5: Test read
x: <Back
>
Choose Add sensor by pressing 1.
Create sensor
Select type:
..
9: Next page....
x: <Back
>9
Sensor list continued...
Select type:
..
6: Modbus Sensor
..
>
Press 9 to see more sensors. Choose either generic Modbus sensor from the sensor list. Note the menu may have other sensors listed.
Enter sample rate (mins): 15
It is possible to provide a custom name to ‘tag’ data sent to the API. It is useful to know what sensor is connected. Provide a 3 character name
Enter sensor name (max 3 chars):
The Modbus device must have an ID from 0x1 - 0x20 (hex address)
Enter the modbus ID of the device: 0x
The Modbus register must have an address from 0x1 - 0x7FFFFFFF (hex address)
Enter the address to read from: 0x
The Modbus function code must be from 0x1 - 0x4 (hex address).
Enter the function code to read,
Coil Status = 0x1,
Input Status = 0x2,
Holding Registers = 0x3,
Input Registers = 0x4
> 0x
The Modbus device will be queried for data. It must return a specified number of bytes. Select 2 or 4
Enter the number of bytes to read (2 or 4):
The data returned by the Modbus device may be integer values or IEEE 754 floating points. When integer values are selected, the individual bytes returned by the device will be reported. This may require configuration of the data in the API/Online Software to represent the data if any translation is required.
Store bytes as IEEE 754? (Y/n):
The data returned by the Modbus device may be in a particular order such as Most Significant Bit first or Least Significant Bit first. Select ‘Y’ if the Most Significant Bit comes first.
Byte order MSB? (Y/n):
Once saved, the custom name if entered will be displayed, and it is possible to test read the sensor to get the converted and RAW values, by selecting option 5 and selecting the sensor to interrogate
Created psi
Sensor Config
1: Add sensor
2: Enable Battery monitor
3: List sensors
4: Delete sensor
5: Test read sensors
x: <Back
>
Choose <Back by pressing x.
Created psi
Sensor Config
1: Add sensor
2: Enable Battery monitor
3: List sensors
4: Delete sensor
5: Test read sensors
x: <Back
>x
Exiting...
neatMon Main Menu
1: Network config
2: Sensor config
3: Utilities
x: < Save & Quit
>
Choose Save & Quit by pressing x again.
NOTE: If you don't do this the sensor will not be saved. Subsequent rebooting will show that there is no sensor in the sensor list.
First, you must open a serial terminal to the AMN and arrive at the NeatMon Main Menu. If you're unsure how to do this check the Opening Serial Terminal guide.
NeatMon Main Menu
1: Network config
2: Sensor config
3: Utilities
x: < Save & Quit
>
Choose Sensor config by pressing 2.
Sensor Config
1: Add sensor
2: Disable Battery monitor
3: List sensors
4: Delete sensor
5: Test read
x: <Back
>
Choose Test read by pressing 5.
0. Battery monitor
1. psi:
Type: mb [15]
Sample rate (mins): 15
Interface: ModBus
Port: 0
Misc:
Serial Config: 9600 baud, 8 data bits, no parity, 1 stop bits (9600,8,n,1)
Device ID: 20
Read Address: 0xFFFF
Function Code: 4
Bytes: 4
Byte Format: IEEE 754
Byte Order: MSB
Enter index of sensor to read (x to cancel):
Type the number related to the sensor just added. In this case, 1 is the Modbus sensor just added. Many sensors may appear on this according to the configuration of the device.
It will now read the sensor and output the sensor data. Validate data If necessary by changing the sensor accordingly, for example, apply pressure to a pressure gauge.