Author Topic: Basic Button Modbus TCP  (Read 1581 times)

stuartscott171

  • Newbie
  • *
  • Posts: 5
    • View Profile
Basic Button Modbus TCP
« on: May 05, 2015, 08:17:47 AM »
Seem to be have a issue the basic button. In PLCAddressClick field my value is 40002.2, the button will only work to set a false bit have tried toggle and also write value 1 with no success. Version V398g have the same issue in other versions also.

Any suggestions?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Basic Button Modbus TCP
« Reply #1 on: May 05, 2015, 07:50:37 PM »
In order to set a bit within a word, the driver uses a bit mask write which is function 22. Unless your device supports function 22, you will need to manually attempt to set bits within code by reading the register, then setting the bit and writing the register. This of course comes with the risk that if the value in the device changes between your read and write, then the value being written will be incorrect.