AdvancedHMI Software

General Category => Support Questions => Topic started by: BLFTech on December 17, 2014, 04:40:46 PM

Title: Micro820 Driver testing
Post by: BLFTech 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.
Title: Re: Micro820 Driver testing
Post by: Archie 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?
Title: Re: Micro820 Driver testing
Post by: BLFTech on December 17, 2014, 05:29:07 PM
Transaction number is 3.
I do not have WireShark on my computer.
Title: Re: Micro820 Driver testing
Post by: Archie on December 17, 2014, 05:37:56 PM
Is your controller firmware 4 or later?
Title: Re: Micro820 Driver testing
Post by: BLFTech on December 17, 2014, 05:51:39 PM
FW 6.011
Title: Re: Micro820 Driver testing
Post by: Archie 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.
Title: Re: Micro820 Driver testing
Post by: Archie on December 17, 2014, 06:19:21 PM
Are you using version 3.94?
Title: Re: Micro820 Driver testing
Post by: BLFTech on December 17, 2014, 06:39:10 PM
Yes, I am using 3.94
TransactionNumber was 1 on line 375
Title: Re: Micro820 Driver testing
Post by: Archie 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?
Title: Re: Micro820 Driver testing
Post by: BLFTech on December 17, 2014, 06:50:44 PM
No, it was 3 after I pressed F5
Title: Re: Micro820 Driver testing
Post by: Archie 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.
Title: Re: Micro820 Driver testing
Post by: BLFTech on December 17, 2014, 07:04:40 PM
e.OwnerObjectID and MyObjectID are both 0 and do not change even after hitting the exception.
Title: Re: Micro820 Driver testing
Post by: Archie 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.
Title: Re: Micro820 Driver testing
Post by: BLFTech 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.
Title: Re: Micro820 Driver testing
Post by: BLFTech on December 17, 2014, 07:58:10 PM
Is it possible to read Local Variables in each program or Global Variables only?
Title: Re: Micro820 Driver testing
Post by: Archie on December 17, 2014, 08:12:03 PM
I'm not sure if it will also work on the Micro800 series, but in the ControlLogix, you use the format:

PROGRAM:programname.MyTag
Title: Re: Micro820 Driver testing
Post by: BLFTech on December 18, 2014, 01:08:13 PM
I tried the format used with the ControlLogix platform for program tags with no success.
Title: Re: Micro820 Driver testing
Post by: Archie on December 18, 2014, 01:19:37 PM
I did a quick look to see how other drivers do it and so far only found that they say it is not possible. One method says you must create a Global scope alias to point to the program tag.