AdvancedHMI Software
General Category => Support Questions => Topic started by: bosko1978 on June 23, 2015, 01:22:34 PM
-
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?
-
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
-
If you break it up into multiple reads, does it work:
dim values() as string
values = mySLC.Read("F67:120", 119)
-
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?
-
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.
-
Thanks Archie. I will look at that. I'll let you know how I do.
-
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