Author Topic: CLX Driver in version 3.98j  (Read 5321 times)

BLFTech

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • BLF-Tech LLC Website
CLX Driver in version 3.98j
« on: May 22, 2015, 07:36:54 PM »
I get the error code in the attached picture when I attempt to read 1 tag in a ControlLogix controller into one Basic Label. It works in version 3.98g

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: CLX Driver in version 3.98j
« Reply #1 on: May 23, 2015, 09:36:44 AM »
This problem is down in the lower layers of the protocol. It will be fixed in the next version. In the mean time, you can put this condition around everything in the routine:

If Requests(e.TransactionNumber And 255) IsNot Nothing AndAlso Requests(e.TransactionNumber And 255).Count>0 then
.
.
.
End If
« Last Edit: May 23, 2015, 10:39:54 AM by Archie »

BLFTech

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • BLF-Tech LLC Website
Re: CLX Driver in version 3.98j
« Reply #2 on: May 23, 2015, 04:05:55 PM »
That does prevent the error, but also prevents any reads and writes with the processor.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: CLX Driver in version 3.98j
« Reply #3 on: May 23, 2015, 05:24:35 PM »
That routine is only called when a connection can be established or the connection drops. Can you do a WireShark capture?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: CLX Driver in version 3.98j
« Reply #4 on: May 23, 2015, 05:41:53 PM »
You can also put a breakpoint in that routine and when it goes to the break point, examine the e object. There should be an e.ErrorCode and e.ErrorMessage

BLFTech

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • BLF-Tech LLC Website
Re: CLX Driver in version 3.98j
« Reply #5 on: May 23, 2015, 05:48:18 PM »
I just did that and the error ID is -1 and the message is "check processor slot"
The processor is in slot 0 so I am unsure why I am getting the error.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: CLX Driver in version 3.98j
« Reply #6 on: May 23, 2015, 07:40:26 PM »
Can you start WireShark then start the app and post the result. From that I can see exactly what is happening.

BLFTech

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • BLF-Tech LLC Website
Re: CLX Driver in version 3.98j
« Reply #7 on: May 29, 2015, 09:49:31 PM »
Here is the Wireshark capture. The PC is 192.168.1.2 and the PLC is 192.168.1.20

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: CLX Driver in version 3.98j
« Reply #8 on: May 30, 2015, 07:01:07 AM »
It is failing for an invalid connection size. Version 3.98j increased the packet size from about 220 to 511 in order to read  more data with less requests. I'm finding that not all hardware supports this. What processor are you connecting to?

BLFTech

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • BLF-Tech LLC Website
Re: CLX Driver in version 3.98j
« Reply #9 on: May 30, 2015, 12:10:09 PM »
I am using an Older 1756-L55 processor for testing. What are going to be the part numbers no longer supported in the ControlLogix and CompactLogix platforms?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: CLX Driver in version 3.98j
« Reply #10 on: May 30, 2015, 12:18:49 PM »
What are going to be the part numbers no longer supported in the ControlLogix and CompactLogix platforms?
It will be a trial and error process to figure out which processors support what connection size. I will then either have to document them all and allow that to be changed by the driver properties or have the driver detect the processor and adjust it accordingly. The default size is now 511 bytes in order to allow maximum speed.

BLFTech

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • BLF-Tech LLC Website
Re: CLX Driver in version 3.98j
« Reply #11 on: May 30, 2015, 12:35:49 PM »
Can I decrease that setting and test it? Where is that setting at?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: CLX Driver in version 3.98j
« Reply #12 on: May 30, 2015, 01:58:54 PM »
I thought I posted the code above, but I must not have clicked the post.

In EthernetIPforCLXCom.vb at line 125, add this one line of code:

            DLL(MyDLLInstance).ConnectionPathPort = 1
            DLL(MyDLLInstance).ProcessorSlot = m_ProcessorSlot
            DLL(MyDLLInstance).ConnectionByteSize = 510


Try different values for ConnectionByteSize. The maximum is 511, but 200 seems to work for everything.

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: CLX Driver in version 3.98j
« Reply #13 on: May 30, 2015, 03:59:05 PM »
Quote
It will be a trial and error process to figure out which processors support what connection size. I will then either have to document them all and allow that to be changed by the driver properties or have the driver detect the processor and adjust it accordingly.

Creating a driver property sounds like acceptable solution for any driver (if possible of course). With working DefaultValue to resort to, and possibly a warning popup when users try to change this value, would let users test limits of their own hardware.

BLFTech

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • BLF-Tech LLC Website
Re: CLX Driver in version 3.98j
« Reply #14 on: May 30, 2015, 05:23:25 PM »
When I add that line of code I get the error message "ConnectionByteSize is not a member of 'MfgControl.AdvancedHMIDrivers.CIPforCLX'