Author Topic: EthernetIPforMicro800Com1.Read() fails after 13 consecutive calls  (Read 617 times)

DarrellK

  • Newbie
  • *
  • Posts: 4
    • View Profile
EthernetIPforMicro800Com1.Read() fails after 13 consecutive calls
« on: September 26, 2018, 05:04:33 PM »
I am trying to read about 30 addresses from a Micro 820 to build a string to write out to a .csv file.

This works perfectly...

ops = EthernetIPforMicro800Com1.Read("Addrerss01") & "," & _
                EthernetIPforMicro800Com1.Read("Address02") & ", " & _
                EthernetIPforMicro800Com1.Read("Address03") & ", " & _
                EthernetIPforMicro800Com1.Read("Address04") & ", " & _
                EthernetIPforMicro800Com1.Read("Address05") & ", " & _
                EthernetIPforMicro800Com1.Read("Address06") & ", " & _
                EthernetIPforMicro800Com1.Read("Address07") & ", " & _
                EthernetIPforMicro800Com1.Read("Address08") & ", " & _
                EthernetIPforMicro800Com1.Read("Address09") & ", " & _
                EthernetIPforMicro800Com1.Read("Address10") & ", " & _
                EthernetIPforMicro800Com1.Read("Address11") & ", " & _
                EthernetIPforMicro800Com1.Read("Address12") & " ," & _
                EthernetIPforMicro800Com1.Read("Address13")

This does not work at all...

ops = EthernetIPforMicro800Com1.Read("Addrerss01") & "," & _
                EthernetIPforMicro800Com1.Read("Address02") & ", " & _
                EthernetIPforMicro800Com1.Read("Address03") & ", " & _
                EthernetIPforMicro800Com1.Read("Address04") & ", " & _
                EthernetIPforMicro800Com1.Read("Address05") & ", " & _
                EthernetIPforMicro800Com1.Read("Address06") & ", " & _
                EthernetIPforMicro800Com1.Read("Address07") & ", " & _
                EthernetIPforMicro800Com1.Read("Address08") & ", " & _
                EthernetIPforMicro800Com1.Read("Address09") & ", " & _
                EthernetIPforMicro800Com1.Read("Address10") & ", " & _
                EthernetIPforMicro800Com1.Read("Address11") & ", " & _
                EthernetIPforMicro800Com1.Read("Address12") & " ," & _
                EthernetIPforMicro800Com1.Read("Address13") & ", " & _
                EthernetIPforMicro800Com1.Read("Address14")

As soon as I add in the 14th call, the entire line of code faults with an unhandled exception.
MfgControl.AdvancedHMI.Drivers.Common.PLCDriverException: 'Read Failed. Path Destination Unknown,  Status Code=5'

Is there a better way to do this?


DarrellK

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: EthernetIPforMicro800Com1.Read() fails after 13 consecutive calls
« Reply #1 on: September 27, 2018, 10:36:16 AM »
Never mind.   :-[
I figured this out.  It was a simple typo of the address in the PLC.  This is the error you will get if the address in the VB code does not match the address in the PLC.  I found it by changing my code to this...

ops = EthernetIPforMicro800Com1.Read("Addrerss01") & ", "
ops = ops & EthernetIPforMicro800Com1.Read("Addrerss01") & ", "
ops = ops & EthernetIPforMicro800Com1.Read("Address02") & ", "
ops = ops & EthernetIPforMicro800Com1.Read("Address03") & ", "
ops = ops & EthernetIPforMicro800Com1.Read("Address04") & ", "
ops = ops & EthernetIPforMicro800Com1.Read("Address05") & ", "
ops = ops & EthernetIPforMicro800Com1.Read("Address06") & ", "
ops = ops & EthernetIPforMicro800Com1.Read("Address07") & ", "
ops = ops & EthernetIPforMicro800Com1.Read("Address08") & ", "
ops = ops & EthernetIPforMicro800Com1.Read("Address09") & ", "
ops = ops & EthernetIPforMicro800Com1.Read("Address10") & ", "
ops = ops & EthernetIPforMicro800Com1.Read("Address11") & ", "
ops = ops & EthernetIPforMicro800Com1.Read("Address12") & " ,"
ops = ops & EthernetIPforMicro800Com1.Read("Address13") & ", "
ops = ops & EthernetIPforMicro800Com1.Read("Address14") & ", "
ops = ops & EthernetIPforMicro800Com1.Read("Address15")

It threw the error on just the wrong address instead of the entire command.
Thought I found some weird limitation.

larryhts

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Re: EthernetIPforMicro800Com1.Read() fails after 13 consecutive calls
« Reply #2 on: September 27, 2018, 11:34:50 AM »
Good to know. Thanks