Author Topic: Micro820 Driver testing  (Read 3869 times)

BLFTech

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • BLF-Tech LLC Website
Micro820 Driver testing
« on: December 17, 2014, 04:40:46 PM »
I am testing the Micro800 driver and I am getting the error that is in the attached picture. I am using the latest version and have 1 basic label with a global tag on the main form for testing. Let me know if you can offer any insight.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5311
    • View Profile
    • AdvancedHMI
Re: Micro820 Driver testing
« Reply #1 on: December 17, 2014, 05:12:12 PM »
Can you hover over and see what the value is for e.TransactionNumber?

Can you do a WireShark capture?

BLFTech

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • BLF-Tech LLC Website
Re: Micro820 Driver testing
« Reply #2 on: December 17, 2014, 05:29:07 PM »
Transaction number is 3.
I do not have WireShark on my computer.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5311
    • View Profile
    • AdvancedHMI
Re: Micro820 Driver testing
« Reply #3 on: December 17, 2014, 05:37:56 PM »
Is your controller firmware 4 or later?

BLFTech

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • BLF-Tech LLC Website
Re: Micro820 Driver testing
« Reply #4 on: December 17, 2014, 05:51:39 PM »
FW 6.011

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5311
    • View Profile
    • AdvancedHMI
Re: Micro820 Driver testing
« Reply #5 on: December 17, 2014, 06:13:52 PM »
Ok, my controller is 6.012, so they should be the same.

The driver stores the details of the read in PLCAddressByTNS(3), then requests a read. The 3 is the TransactionNumber that sends with the read so it can pair it up with the original request. For some reason your transaction 3 does not have a corresponding PLCAddressByTNS

Go to line 377 and put a breakpoint at this line:

DLL(MyDLLInstance).ReadTagValue(address, numberOfElements, CUShort(address.TransactionNumber), MyObjectID)

Run the app and see what the TransactionNumber is on the line of code above, then press F5 to get it to error and see if that transaction number matches up.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5311
    • View Profile
    • AdvancedHMI
Re: Micro820 Driver testing
« Reply #6 on: December 17, 2014, 06:19:21 PM »
Are you using version 3.94?

BLFTech

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • BLF-Tech LLC Website
Re: Micro820 Driver testing
« Reply #7 on: December 17, 2014, 06:39:10 PM »
Yes, I am using 3.94
TransactionNumber was 1 on line 375

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5311
    • View Profile
    • AdvancedHMI
Re: Micro820 Driver testing
« Reply #8 on: December 17, 2014, 06:41:18 PM »
Yes, I am using 3.94
TransactionNumber was 1 on line 375
Was it also 1 after you pressed F5 to continue down to where it throws the exception?

BLFTech

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • BLF-Tech LLC Website
Re: Micro820 Driver testing
« Reply #9 on: December 17, 2014, 06:50:44 PM »
No, it was 3 after I pressed F5

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5311
    • View Profile
    • AdvancedHMI
Re: Micro820 Driver testing
« Reply #10 on: December 17, 2014, 06:58:57 PM »
About 30 lines up from where the exception occurs, there is a line of code:

If e.OwnerObjectID <> MyObjectID Then

Put a breakpoint there and see what the values. Then keep hitting F5 and checking the values until it hits the exception.

BLFTech

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • BLF-Tech LLC Website
Re: Micro820 Driver testing
« Reply #11 on: December 17, 2014, 07:04:40 PM »
e.OwnerObjectID and MyObjectID are both 0 and do not change even after hitting the exception.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5311
    • View Profile
    • AdvancedHMI
Re: Micro820 Driver testing
« Reply #12 on: December 17, 2014, 07:12:12 PM »
In the EthernetIPForCLXCom.vb, go to line 69 and modify the code like this:

#Region "Constructor"
    Public Sub New(ByVal container As System.ComponentModel.IContainer)
        MyClass.New()


        'Required for Windows.Forms Class Composition Designer support
        container.Add(Me)
    End Sub

    Public Sub New()
        MyBase.New()

        ObjectIDs += 1
        MyObjectID = ObjectIDs

        'CreateDLLInstance()
    End Sub


Essentially the 2 line of code are moved down to the next constructor

The MyObjectID should never be 0 and somehow in your project it is 0.

BLFTech

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • BLF-Tech LLC Website
Re: Micro820 Driver testing
« Reply #13 on: December 17, 2014, 07:28:31 PM »
I made the change and now I can read and write to the tag. I will continue testing and offer feedback as I progress. Thanks for all your help.

BLFTech

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • BLF-Tech LLC Website
Re: Micro820 Driver testing
« Reply #14 on: December 17, 2014, 07:58:10 PM »
Is it possible to read Local Variables in each program or Global Variables only?