Author Topic: IndexOutOfRange in Write function - CLX 398s  (Read 2600 times)

WellsCPak

  • Newbie
  • *
  • Posts: 28
    • View Profile
IndexOutOfRange in Write function - CLX 398s
« on: June 24, 2015, 11:18:06 AM »
I just picked up a Micro820 for a budget project based on the micro800 support in AHMI, thanks!
Using the EthernetIPforMicro800Com driver talking to a Micro820 controller, I'm getting a couple different exceptions thrown in the Write function. Any help would be greatly appreciated.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: IndexOutOfRange in Write function - CLX 398s
« Reply #1 on: June 24, 2015, 06:52:45 PM »
Are you writing via code or using PLCAddressKeypad on a control?

WellsCPak

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: IndexOutOfRange in Write function - CLX 398s
« Reply #2 on: June 25, 2015, 08:17:31 AM »
I have two BasicButtons, with the PLCAddressClick and PLCAddressHighlight on each set to a test tag. OutputType set to Toggle. When the form loads, they both update and highlight accordingly, then I can toggle the bits with the buttons, but the highlight doesn't update until I restart the app. Also sometimes it throws that OutOfRange exception from the Write function.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: IndexOutOfRange in Write function - CLX 398s
« Reply #3 on: June 25, 2015, 08:33:54 AM »
Try the patch given for this problem:

http://advancedhmi.com/forum/index.php?topic=838.0

It sounds very similar. If you lose connection for more than a few seconds, it will give an Index Out of range when it tries to restart comms.

WellsCPak

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: IndexOutOfRange in Write function - CLX 398s
« Reply #4 on: June 25, 2015, 09:08:19 AM »
It seems better with that patch, at least it isn't throwing the exception anymore.

Still having the issue where the button highlights don't update after form load. It seems like the first button press doesn't register either, whichever button I press first doesn't do anything, but any button presses after that toggle the bits properly.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: IndexOutOfRange in Write function - CLX 398s
« Reply #5 on: June 25, 2015, 09:21:04 AM »
If you have a lot of controls on the screen, you may be experiencing this bug, see the driver modification on the second to last post:

http://advancedhmi.com/forum/index.php?topic=836.0


WellsCPak

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: IndexOutOfRange in Write function - CLX 398s
« Reply #6 on: June 25, 2015, 09:34:46 AM »
It looks like I already made that change yesterday.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: IndexOutOfRange in Write function - CLX 398s
« Reply #7 on: June 25, 2015, 09:38:06 AM »
Would you be able to send me your project and the PLC program with the tags? I don't need the ladder logic, so it can be deleted. I only need tags to install in my PLC to test run the HMI.

WellsCPak

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: IndexOutOfRange in Write function - CLX 398s
« Reply #8 on: June 25, 2015, 10:24:46 AM »
It's just a dummy program while I play with the 820 and get used to how it works.

http://s000.tinyupload.com/index.php?file_id=70124892009854730575

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: IndexOutOfRange in Write function - CLX 398s
« Reply #9 on: June 25, 2015, 10:59:19 AM »
I have to download and install the latest version of software for the Micro820, so it may take me a few hours to get setup for testing, but I will let you know what I find out.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: IndexOutOfRange in Write function - CLX 398s
« Reply #10 on: June 25, 2015, 11:57:55 AM »
I found the problem and now I have to come up with a fix. Back in version 3.98j a new CIP function was implemented called the Multiple Service Request. This allows requests of multiple tag values with a single packet. Apparently the Micro800 series does not support this service. I will need to work on a driver modification that disables this.

In the mean time, you can try to use version 3.98f

https://sourceforge.net/projects/advancedhmi/files/advancedhmi/3.5/

WellsCPak

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: IndexOutOfRange in Write function - CLX 398s
« Reply #11 on: June 25, 2015, 01:43:14 PM »
3.98f works awesome, thanks Archie! :)

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: IndexOutOfRange in Write function - CLX 398s
« Reply #12 on: June 25, 2015, 03:01:28 PM »
Within a week version 3.98t should be available that will have the fix for this.