Author Topic: Can you write to modbus words at the bit level?  (Read 349 times)

boardmaker

  • Newbie
  • *
  • Posts: 13
    • View Profile
Can you write to modbus words at the bit level?
« on: March 18, 2022, 12:59:46 PM »
Archie,

Wondering if you can write to Modbus words at the bit level?  I know you can read them.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: Can you write to modbus words at the bit level?
« Reply #1 on: March 18, 2022, 01:08:16 PM »
Only if the device supports function code mask write

http://www.mesulog.fr/help/modbus/index.html?page=mask-write-registers-f22.html

Otherwise you need to read the word, modify the value, then write it back and hope it didn't change in the process