[Nut-upsdev] generic modbus driver
Dimitris Economou
dimitris.s.economou at gmail.com
Fri Jun 25 11:30:15 BST 2021
Hello,
I have completed and tested a new generic modbus driver for UPS devices
with contact signaling. I have also posted the corresponding pull request:
(https://github.com/networkupstools/nut/pull/1052)
kind regards,
Dimitris Economou
---
This is a generic modbus driver expected to work with contact (direct)
signal UPS devices, connected via modbus RIO (remote I/O) either serial or
TCP/IP. The driver has been tested against PULS UPS (model UB40.241) via
MOXA ioLogikR1212 (RS485) and ioLogikE1212 (TCP/IP).
The PULS UPS UB40.241 supports the following signals:
Ready contact (DO) <--> HB
Buffering contact (DO) <--> OL | OB
Battery-low (DO) <--> LB
Replace Battery (DO) <--> RB
Inhibit (DI) <--> FSD
DO and DI assumes device perspective
The driver's concept is to map the UPS states (as defined in nut) onto UPS
contacts' states
The driver has an extended configuration interface implemented using
variables defined in ups.conf.
[generic_modbus]
# info parameters
driver = generic_modbus
port = /dev/ttyUSB0
# port = 192.168.2.104
# port = 192.168.2.104:1502
desc = "generic ups driver"
# device info
device_mfr = "PULS"
device_model = "UB40.241"
# serial settings
ser_baud_rate = 9600
ser_parity = N
ser_data_bit = 8
ser_stop_bit = 1
modbus slave id
rio_slave_id = 5
# UPS signal state attributes
OB_addr = 0x0
OB_regtype = 1
OB_noro = 0
LB_addr = 0x1
LB_regtype = 1
HB_addr = 0x2
HB_regtype = 1
RB_addr = 0x3
RB_regtype = 1
# CHRG_addr = 0x0
# CHRG_regtype = 1
# CHRG_noro = 1
DISCHRG_addr = 0x0
DISCHRG_regtype = 1
DISCHRG_noro = 0
FSD_addr = 0x140
FSD_regtype = 0
FSD_pulse_duration = 180
*XXX_addr* denotes the modbus address of RIO where the XXX UPS signal is
connected
*XXX_regtype* is the type of modbus register (0:COIL, 1:INPUT_B, 2:INPUT_R,
3:HOLDING)
*XXX_noro* is the configuration for NO/NC (normally open, normally closed
contact)
*FSD_pulse_duration* defines the duration in ms of the inhibit pulse. if
it's not defined, the signal has only one transition depending on noro
configuration.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/nut-upsdev/attachments/20210625/5a072e43/attachment.htm>
More information about the Nut-upsdev
mailing list