Author Topic: Error with remote opc  (Read 1701 times)

DPEnova

  • Newbie
  • *
  • Posts: 3
    • View Profile
Error with remote opc
« on: May 13, 2015, 04:57:34 PM »
I am trying to build a display screen with tag  communicating over RSlinx Remote opc.  I have a DigitalPanelMeter and Basic Label, both will retrieve the correct value but will alternate the value with an error.  The errors are listed below:
A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll
A first chance exception of type 'MfgControl.AdvancedHMI.Drivers.Common.PLCDriverException' occurred in AdvancedHMIDrivers.dll
The reason I am using remote opc is because I am communicating with a SLC500 on DH+.  Any help would be appreciated.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Error with remote opc
« Reply #1 on: May 13, 2015, 05:04:09 PM »
Go to Debug->Exceptions and check the box for Common Language Runtime

Run the app and it will stop at the line of code with the error. Post that code and line number

DPEnova

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Error with remote opc
« Reply #2 on: May 14, 2015, 08:21:27 PM »
It says that line 470 in OPCDACOM would be the next to run for the error [System.ArgumentOutOfRangeException' occurred in mscorlib.dll]  Line 469 and 470 shown below.                   

 If m_OPCTopic IsNot Nothing AndAlso Not String.IsNullOrEmpty(m_OPCTopic) Then
                            PLCAddressR = PLCAddress.Substring(m_OPCTopic.Length + 2)

It says that line 480 in OPCDACOM would be the next to run for the error [MfgControl.AdvancedHMI.Drivers.Common.PLCDriverException' occurred in AdvancedHMIDrivers.dll]  Line 478, 479, and 480 shown below.

               Catch ex As Exception
                    Throw New MfgControl.AdvancedHMI.Drivers.Common.PLCDriverException(ex.Message)
                End Try

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Error with remote opc
« Reply #3 on: May 14, 2015, 08:27:24 PM »
What is the address you are trying to read and what is the name of  the topic defined in RSLinx?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Error with remote opc
« Reply #4 on: May 14, 2015, 08:52:19 PM »
I know where the problem is. I forgot this was fixed in the next version. Modify the code to this:

        '* If there is a Topic, strip it back off before sending back to subscriber
         If m_OPCTopic IsNot Nothing AndAlso Not String.IsNullOrEmpty(m_OPCTopic) Then
             PLCAddressR = PLCAddressR.Substring(m_OPCTopic.Length + 2)
         End If
[/blue

DPEnova

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Error with remote opc
« Reply #5 on: May 14, 2015, 10:19:13 PM »
Thanks that took care of the problem

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Error with remote opc
« Reply #6 on: May 17, 2015, 08:18:40 PM »
This fix is part of version 3.98j