Author Topic: bug writing a bit in DINT tag v3.61  (Read 1707 times)

andreaboschetti71

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
bug writing a bit in DINT tag v3.61
« on: December 10, 2013, 11:44:35 AM »
If I use 2 square illuminated button with output type "Toggle" and address in click and value different bit os same DINT is only possible to set one bit at time. for example:
SQ1 addressing ZZ_Test.0
SQ2 addressing ZZ_Test.1 where ZZ_Test is a DINT
starting with ZZ_Test.0=0 and ZZ_Test.1=0 if I click on SQ1 ZZ_Test.0 become 1. now if I click on SQ2 ZZ_Test.1 is always 0. for toggling this bit I must reclick on SQ1 resetting bit 0. The same in every order of clicking button. So seem that is not possible to set more than one bit in the same DINT but is possible to reset all the bit that I want if I start with a DINT with more bit setted

andreaboschetti71

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Re: bug writing a bit in DINT tag v3.61
« Reply #1 on: February 13, 2014, 07:51:03 AM »
The problem is in reading value (problem present only for toggle mode) that always return true then always write 0. I solved reading VALUE property and not using Reading method but isn't the best solution

jclay06

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: bug writing a bit in DINT tag v3.61
« Reply #2 on: February 27, 2014, 02:02:33 PM »
I just came across the issue today as well.

I'm not quite sure I understand why we cannot change multiple bits of a DINT value simultaneously?

How did you get around this?

andreaboschetti71

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Re: bug writing a bit in DINT tag v3.61
« Reply #3 on: April 15, 2014, 09:51:56 AM »
If you set toggle mode it's necessary to read value before to change it because if current value is 0 toggling mean that you want write 1 and viceversa. So, the reading function doesn't work returning always true so the toggling always write 0. Instead of using reading function (for reading directly from PLC) you can use the value in VALUE property of the object (you must modify the code of the object you are using, i.e. a pilot light)