Which serial channel to use for Modbus comms (typically the P parameter)
The slave address of the sensor (can't use A parameter, that's already used for the sensor name)
Which function code to use (normally 3 or 4)
Which register to read and how many registers to read. Can we assume it's always 1 register per output?
Which register provides the required value - maybe the first register for the primary sensor, then any additional registers read are for additional outputs?
What scaling factor and offset to use (need to provide these for each output, if supporting multiple outputs)
The minimum interval required between successive reads (some sensors need this, so we should support multiple outputs)
I already added the framework for supporting virtual ports in RRF (similar to the existing code in Duet3Expanson) so we can add virtual Modbus ports in future.
We should support temperature, humidity etc. sensors that communicate via Modbus. Examples:
We will need to specify at least the following: