Author Topic: Write array bool with EthernetIPforCLXCom  (Read 2205 times)

inoya

  • Newbie
  • *
  • Posts: 2
    • View Profile
Write array bool with EthernetIPforCLXCom
« on: July 03, 2015, 05:45:48 AM »
Hello,

i can read array bools perfectly with
 Dim Abool = conector.Read("ABool[0]", 96)

But, i can't write the new values:

I tried:
conector.Write("ABool[0]", 0) ' write the Array in position 0.
conector.Write("ABool[1]", 0) ' write the Array in position 32

Dim t() = {1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1}
conector.Write("ABool[0]", t) ' not write but not error.
conector.Write("ABool[0]", 32, t) ' not write but not error.

How write at complete array?, Thanks.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5283
    • View Profile
    • AdvancedHMI
Re: Write array bool with EthernetIPforCLXCom
« Reply #1 on: July 03, 2015, 07:16:21 PM »
Writing multiple BOOL array bits in a single write is not yet implemented. You would have to use a loop and write each bit individually.

inoya

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Write array bool with EthernetIPforCLXCom
« Reply #2 on: July 06, 2015, 04:02:46 AM »
Ok,

But, how write individual?
conector.Write("ABool[0]", 0) ' write the Array in position 0.
conector.Write("ABool[1]", 0) ' write the Array in position 32

How write in position 1?, 2?


Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5283
    • View Profile
    • AdvancedHMI
Re: Write array bool with EthernetIPforCLXCom
« Reply #3 on: July 06, 2015, 06:40:31 AM »
I just tested this with version 3.98t and it works as expected:

        EthernetIPforCLXCom1.Write("BoolArray[1]", 1)

Phrog30

  • Guest
Re: Write array bool with EthernetIPforCLXCom
« Reply #4 on: August 06, 2016, 06:12:38 PM »
I just tried writing to a BOOL[128] and it's not working.  The code is exactly as in this thread, expect the driver name and tagname are different (obviously).  I can read from BOOL, just not write.  I change to DINT and it works.  Using V3.99k.

I don't know if it's an issue with the later versions of CpLX/CLX, but things that are stated that should work, just don't.

James

bachphi

  • Hero Member
  • *****
  • Posts: 644
    • View Profile
Re: Write array bool with EthernetIPforCLXCom
« Reply #5 on: August 09, 2016, 12:20:50 PM »
Tested with 3.99n  no good.

tested with 3.99a  works.

===================================================
This is NOT alt.read.my.mind.
No such thing is sh^t-for-brains unless you are posting to alt.read.my.mind.
===================================================

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5283
    • View Profile
    • AdvancedHMI
Re: Write array bool with EthernetIPforCLXCom
« Reply #6 on: August 10, 2016, 03:56:54 PM »
This will be fixed in version 3.99p

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5283
    • View Profile
    • AdvancedHMI
Re: Write array bool with EthernetIPforCLXCom
« Reply #7 on: August 28, 2016, 10:44:15 PM »
Version 3.99p is now available with the fix to BOOL arrays

KyleS

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Write array bool with EthernetIPforCLXCom
« Reply #8 on: November 17, 2016, 09:17:32 AM »
I have a large project on version 3.99f - what is the easiest way to update just to fix the bool array write issue? Can I just download the latest version and copy and paste the basicbutton control code?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5283
    • View Profile
    • AdvancedHMI
Re: Write array bool with EthernetIPforCLXCom
« Reply #9 on: November 17, 2016, 09:43:20 AM »
I have a large project on version 3.99f - what is the easiest way to update just to fix the bool array write issue? Can I just download the latest version and copy and paste the basicbutton control code?
The best upgrade method is to download and extract the latest version, then open it in Visual Studio. Right click the AdvancedHMI project in Solution Explorer and select Add->Existing, then browse to the .vb file for each form of your existing project. You will need to do this individually for each form because VS sometimes does not import all the associated files correctly.

If that method is too tedious, you can take the AdvancedHMI directory from your current project and replace the one in the new project with it. This will miss some updates such as to the form change buttons and will also leave you with mixed version numbers.

After the updates, you may get some errors which you will need to go through one at a time and correct. They are typically spelling corrections. if you are confident with VS, a search and replace makes this process quick.

If all else fails, there is an upgrade service on the web site for only $5.