Implemented new datasources (modbus,scpi)

This commit is contained in:
Martino Ferrari
2026-06-24 06:12:52 +02:00
parent 999a1510d4
commit cf9da3df0a
13 changed files with 1967 additions and 0 deletions
+51
View File
@@ -129,3 +129,54 @@ auto_sync_filter = "" # e.g. area=StorageRing or tags=production
[datasource.synthetic]
enabled = true
# Modbus TCP. Each device is polled over its own connection; registers become
# signals named "device:register". Disabled unless enabled = true and at least
# one device is declared.
[datasource.modbus]
enabled = false
poll_interval_ms = 1000 # default poll period for every register
# [[datasource.modbus.devices]]
# name = "plc1"
# address = "192.168.1.50:502" # ":502" appended if no port given
# unit_id = 1
# timeout_ms = 3000
#
# [[datasource.modbus.devices.registers]]
# name = "temperature"
# kind = "holding" # holding | input | coil | discrete
# address = 100
# encoding = "int16" # uint16|int16|uint32|int32|float32|float64
# word_order = "big" # big (default) | little, for multi-word encodings
# unit = "C"
# scale = 0.1 # value = raw*scale + offset (scale 0 → 1)
# offset = 0.0
# min = -50
# max = 200
# writable = false # input/discrete are always read-only
# description = "Process temperature"
# SCPI instruments over raw TCP sockets (line-based "SCPI raw", port 5025).
# Channels become signals named "instrument:channel". A vxi11 transport is
# reserved for a future release.
[datasource.scpi]
enabled = false
poll_interval_ms = 1000
# [[datasource.scpi.instruments]]
# name = "dmm1"
# transport = "raw" # raw (default); vxi11 reserved
# address = "192.168.1.60:5025" # ":5025" appended if no port given
# timeout_ms = 3000
# terminator = "\n"
#
# [[datasource.scpi.instruments.channels]]
# name = "voltage"
# query = "MEAS:VOLT?" # SCPI query whose response is the value
# write_cmd = "VOLT %v" # printf template; omit for read-only
# type = "float" # float (default) | int | string | bool
# unit = "V"
# min = 0
# max = 30
# description = "DC voltage"