@@ -97,6 +97,7 @@ needs to be covered. Differences are primarily byte-ordering.
9797
9898The byte-ordering is specified with one of the following suffixes:
9999
100+ * `_A`, `_B`
100101* `_AB`, `_BA`
101102* `_ABCD`, `_BADC`, `_CDAB`, `_DCBA`
102103* `_ABCDEFGH`, `_BADCFEHG`, `_CDABGHEF`, `_DCBAHGFE`,
@@ -107,6 +108,18 @@ Modbus standard byte-ordering is big-endian, which is the first in each list
107108may use any of the byte-orderings necessary and required because some device
108109vendors have not paid attention to the proper on-wire ordering.
109110
111+ The orderings `_A` and `_B` are single byte values from a modbus register. A
112+ single byte will be taken from the register value. You cannot access successive
113+ bytes from the same register using these types. (You require a second component
114+ that de-multiplexes the HAL value(s) into individual bytes from the data stream
115+ using the hm2_modbus presented pin values.) +
116+ The ordering `_A` will use the the least significant byte (LSB), with respect
117+ to the default big endian order for Modbus. Ordering `_B` will use the most
118+ significant byte (MSB). Note that there is no floating point type when only
119+ using sizes of one single byte. +
120+ Single byte values have the additional restriction that they cannot be used as
121+ data values in '<initlist>/<command>/<data>'.
122+
110123The byte-ordering suffix is prefixed with S (signed), U (unsigned) or F (float)
111124to complete the 'modbustype' attribute value. For example, a 32-bit float in
112125big-endian is named `F_ABCD`. A 64-bit signed integer value in little-endian is
@@ -115,6 +128,9 @@ S_HGFEDCBA.
115128The types have following ranges and will be clamped to the min/max values if
116129the 'clamp' attribute is set in the '<command>':
117130
131+ * 8-bit:
132+ ** signed integer [-128..+127] (`S_A`, `S_B`)
133+ ** unsigned integer [0..255] (`U_A`, `U_B`)
118134* 16-bit:
119135 ** float16 [-65504.0..+65504.0] (`F_AB`, `F_BA`)
120136 ** signed integer [-32768..+32767] (`S_AB`, `S_BA`)
@@ -177,9 +193,11 @@ other setup values as attributes:
177193 and reply sizes. The 'timeout' value can be overridden in the '<command>'
178194 definitions. Default auto.
179195*writeflush* [Boolean]::
180- Set to true when the _very first_ round of write commands must be flushed to
181- synchronize the internal state to the pin state. This flush happens either
182- once when the module starts or each time the module comes out of 'suspend'. +
196+ Set to true when the first round of write commands must synchronize the
197+ internal state to the pin state. The writes are calculated but not sent to
198+ the Modbus device (i.e. flushed). This flush happens either once when the
199+ module starts, each time when the module comes out of 'suspend', or
200+ specifically for a command when it gets re-enabled. +
183201 The write flush is necessary when you need to ensure proper and correct pin
184202 data is present _before_ the Modbus commands start sending potentially
185203 harmful or invalid data because the pins have not yet been initialized to
@@ -503,6 +521,15 @@ Recognized '<commands>/<command>' attributes:
503521 The Modbus device to communicate with. The 'device' attribute
504522 references '<device>[name]'. +
505523 The device name '`broadcast`' will send the command to all devices on the bus.
524+ *disabled* [Boolean]::
525+ Start the command in disabled state when set, preventing it from being
526+ executed. Using the 'disabled' flag is a fine grain per command control.
527+ In contrast, 'suspend' works on the entire state machine and controls
528+ operation of all commands in an all-or-nothing way. A command in the disabled
529+ state can be enabled by toggling the reset pin of the command. Using 'disable'
530+ can be particularly useful when you need to delay one particular command
531+ while others may already be run. The 'writeflush' setting is honored when
532+ coming out of the disabled state. Default false.
506533*function* [see link:#_modbus_functions[*MODBUS FUNCTIONS*]]::
507534 The attribute value is one of the supported Modbus functions.
508535*haltype* [see link:#_hal_types[*HAL TYPES*]]::
@@ -571,6 +598,14 @@ Recognized '<commands>/<command>' attributes:
571598 should be emitted when it does. This differs from 'noanswer' in that a reply
572599 may be expected within the timeout period but not after the timeout expires.
573600 This may be required for flaky devices. Default false.
601+ *unaligned* [Boolean]::
602+ Set to true to suppress the alignment warning in multi-register reads or
603+ writes where 32-bit or 64-bit values are not aligned to their natural Modbus
604+ address boundaries. This is useful for devices that do not care about
605+ alignment or do not use Modbus addresses in conventional ways. +
606+ Setting 'unaligned' is purely a cosmetic attribute to suppress console
607+ clutter when compiling the mbccs file. It has no functional effect on the
608+ communication with the device. Default false.
574609*writeflush* [Boolean]::
575610 The override the 'writeflush' value. See '<mesamodbus>[writeflush]' for
576611 details. Default '<mesamodbus>[writeflush]'.
0 commit comments