Author Topic: Unable to read arrays (ClxDriver 1.2.1.0)  (Read 749 times)

mpfs

  • Newbie
  • *
  • Posts: 11
    • View Profile
Unable to read arrays (ClxDriver 1.2.1.0)
« on: February 15, 2018, 02:29:27 AM »
Hello,

in ClxDriver 1.1.5.0 I had success reading arrays by accessing their individual elements. As an example, I have a UDT containing a 3 element REAL array (MyUserDataTag1.RealArray). I was able to read the array as follows:

Code: [Select]
for (int index = 0; index < 3; index++)
{
string arrayElementTagName= string.Format("MyUserDataTag1.RealArray[{0}]", index);
Console.WriteLine("{0} read returned = {1}", arrayElementTagName, clxClient.Read(arrayElementTagName));
}

The code returned the contents of the array as expected.

Now, if I run this code using ClxDriver 1.2.1.0, I get a "KeyNotFoundException":
Code: [Select]
Unhandled Exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at ClxDriver.EthernetIPforCLX.BeginRead(String startAddress, Int32 numberOfElements)
   at ClxDriver.EthernetIPforCLX.Read(String startAddress, Int32 numberOfElements)
   at ClxDriver.EthernetIPforCLX.Read(String startAddress)
   at RockwellTest.Program.Main(String[] args) in [redacted]:line 88

This critical issue required us to rollback to version 1.1.5.0 - consequently removing the ReadRaw functionality which version 1.2.1.0 has provided.

When can an update be expected? Thank you!

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5260
    • View Profile
    • AdvancedHMI
Re: Unable to read arrays (ClxDriver 1.2.1.0)
« Reply #1 on: February 15, 2018, 07:52:02 AM »
This is going to be checked into and an update may be available on Monday.

mpfs

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Unable to read arrays (ClxDriver 1.2.1.0)
« Reply #2 on: February 15, 2018, 08:05:27 AM »
Hello Archie,

thank you for your prompt reply. I will be looking forward to the update.

mpfs

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Unable to read arrays (ClxDriver 1.2.1.0)
« Reply #3 on: February 19, 2018, 04:21:43 AM »
Hello Archie,

I can confirm that this functionality has been restored in ClxDriver 1.2.3.0.
Thank you for your rapid response!