What is the correct failure mode for Modbus (0x10) Write Multiple Registers (if any)? -


how should modbus device fail if error encountered after write multiple register (0x10) request has been validated before writes have been completed? specification (6.12) seems vague on point , web searches have not proven fruitful. see 3 possibilities:

  1. attempt write each register in turn. if error occurs give up/send exception.
  2. treat request atomic transaction either data should written or none of it.
  3. attempt write data sending exception @ end if failure observed.

is there conventional or proper way fail here or way device fails implementation specific requiring documented in manual?

according figure 22: write multiple registers state diagram on page 31 of specification exception code 4 should returned protocol not specify how application layer should work.

the way device fails must consider constraints , possible side effects. example if accept control commands (set point value or setting multiple outputs assigned different registers) practice never assign such values directly registers validation first before re-writing value internal program variables used drive ios or influence control actions. such approach complies option 2 list.

you can implement whatever behavior works best provided it’s documented. if slave under control of master capable of implementing part of application layer may consider support diagnostic or error information requests slave in case of failure such functionality not specified exception 0x4 function code 0x10.


Comments

Popular posts from this blog

java - JavaFX 2 slider labelFormatter not being used -

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -