Author Topic: problem reading more than 60 floats from an SLC over ethernet  (Read 1752 times)

bosko1978

  • Newbie
  • *
  • Posts: 13
    • View Profile
I have an ethernet SLC setup to read 239 floats starting from F67:0. 

code is as follows:
dim values as string
values = mySLC.Read("F67:0", "239")

I do the same thing from N61:0

the N file read works great and I get the expected values, however the F values are only correct up to the 59th element.  Everything after that is filled with zeros.  I went online with the processor and there are values in all the registers.

Any idea why the F file doesn't work when the N does?  Is there a limitation and I need to read the F file 59 elements at a time?

bosko1978

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: problem reading more than 60 floats from an SLC over ethernet
« Reply #1 on: June 23, 2015, 01:40:10 PM »
update:  I have 5 N file reads doing the same thing.  4 of them are fine all the way through to element 239 and one only reads to element 119.  This is strange...

thanks for your help

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: problem reading more than 60 floats from an SLC over ethernet
« Reply #2 on: June 23, 2015, 02:19:40 PM »
If you break it up into multiple reads, does it work:

dim values() as string
values = mySLC.Read("F67:120", 119)

bosko1978

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: problem reading more than 60 floats from an SLC over ethernet
« Reply #3 on: June 29, 2015, 02:02:42 PM »
Yes.  It works if split up.  I'm hoping not to have to do it like that though, since the length of the read and the starting register are user defined and read in from another file.  Any suggestions?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: problem reading more than 60 floats from an SLC over ethernet
« Reply #4 on: June 29, 2015, 02:18:00 PM »
With the current version, there really is no other way. That driver was recently rewritten almost completely and in that process, the code that was supposed to split large reads automatically and reassemble is not yet working again.

Each of the SLC/Micro PLC models have limitations on packet sizes and the largest allowed packet is 236 bytes. Hence at 60 floats, it is trying to read 240 bytes.

It is on the bug list to get fixed hopefully by the next release. If you were feeling adventurous, you can look at the code where the problem most likely is. In AllenBradleySLCMicro.vb at line 1569 is a Do While loop that is supposed to break up the reads.

bosko1978

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: problem reading more than 60 floats from an SLC over ethernet
« Reply #5 on: June 29, 2015, 02:21:01 PM »
Thanks Archie.  I will look at that.  I'll let you know how I do. 

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: problem reading more than 60 floats from an SLC over ethernet
« Reply #6 on: June 29, 2015, 09:07:14 PM »
I posted a patch to the AllenBradleySLCMicro.vb file for you to try out.

https://sourceforge.net/projects/advancedhmi/files/advancedhmi/3.5/Patches/

Download and extract AllenBradleySLCMicroPatchV398s.zip, then replace the one in AdvancedHMIDrivers\AllenBradley