Author Topic: Tri-ExcelLink 1.02 ArrayIndexOutOfBounds  (Read 15989 times)

mjfergus

  • Newbie
  • Posts: 12
  • I'm a llama!
    • View Profile
Tri-ExcelLink 1.02 ArrayIndexOutOfBounds
« on: October 31, 2006, 08:07:29 PM »
Saving data to Excel with ExcelLink software.  Many successful data collections achieved.  On longer runs (45 minutes and up), the following error began to appear (no specific frequency or trigger event observed):

java.lang.ArrayIndexOutOfBoundsException:
Access to S2suspended for 1 minute

All data entry stops.
Using the STOP or Pause button does not result in the continuation of data logging.  The only solution has been to close Tri-ExcelLink and restart.

What is this error?
What triggers this error?
Is there any way to avoid this error?

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Tri-ExcelLink 1.02 ArrayIndexOutOfBounds
« Reply #1 on: November 01, 2006, 08:01:29 PM »
It is probably because the ExcelLink program receive a bad command somewhere which caused an exception that may not have been caught properly and therefore the program could not recover automatically. We will look into this and try to be more "fail safe" in terms of handling bad responses. You can email to support@tri-plc.com and we can update you when a updated version is available.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

mjfergus

  • Newbie
  • Posts: 12
  • I'm a llama!
    • View Profile
Re:Tri-ExcelLink 1.02 ArrayIndexOutOfBounds
« Reply #2 on: May 26, 2008, 05:37:11 AM »
The ArrayIndexOutOfBoundsException continues to be a problem.  The problem seems to be associated with the T100MD888+ PLC.  A new PLC unit was installed into an existing lab setup.  The previous PLC rarely experienced the ExcelLink exception.  The new PLC experiences the ExcelLink exception between 10 to 20 minutes into monitoring the process.

Is there any new information or version available to address this problem?  Is there any chip or item on the PLC that may be an issue that I could replace?

Thank You

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Tri-ExcelLink 1.02 ArrayIndexOutOfBounds
« Reply #3 on: May 26, 2008, 08:56:35 AM »
1) Is the PLC connected to TLServer on a PC or is it connected via XServer?

2) If you use the TRiLOGI online monitoring to the same PLC while Excellink is connected, does TRiLOGI experience comm drop out when the Excellink experience exception problem?

3) Could you try a simple test by loading a blank program into the PLC and have Excellink connected to it and see if the same exception problem is still occurring?

4) Have you upgraded to ExcelLink version 2 or are you still using version 1.02?
« Last Edit: May 26, 2008, 08:58:58 AM by support »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

mjfergus

  • Newbie
  • Posts: 12
  • I'm a llama!
    • View Profile
Re:Tri-ExcelLink 1.02 ArrayIndexOutOfBounds
« Reply #4 on: May 27, 2008, 05:09:12 AM »
Thank you for the quick response time

1)  We are using the XServer

2)  Online monitoring drops out at random times but ExcelLink remains active.  This was specifically monitored for a few hours and no relationship between the Online Monitoring losing communication and the stated ExcelLink error message could be found.

3)  I will perform the test and report back.

4)  Still have 1.02.  Is 2.0 available for upgrade for current users or must 2.0 be purchased?

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Tri-ExcelLink 1.02 ArrayIndexOutOfBounds
« Reply #5 on: May 27, 2008, 11:06:46 AM »
In your Excellink CD ROM you can find an "upgrade.htm" document that contains link and security info to login for a free upgrade to version 2.

However, version 2.0 does not automatically use the CFG file of version 1.0. You will need to create your configuration in version 2.0.

You can keep your version 1.02 and its CFG file when you upgrade to version 2.0. This allows you to refer back to the version 1.02 CFG file when you create the CFG for version 2.0.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

mjfergus

  • Newbie
  • Posts: 12
  • I'm a llama!
    • View Profile
Re:Tri-ExcelLink 1.02 ArrayIndexOutOfBounds
« Reply #6 on: June 12, 2008, 06:17:39 PM »
I have updated to ExcelLink 2.0
A new 2.4Ghz quad core computer has been purchased
Microsoft Excel 2007 installed
Windows XP SP2

"No response from node 1" error message continues to plague the system.  TriLOGI 5.3 is connected and on-line monitoring is in use when the error message is displayed.  On-line connection is lost.  This remains to be a common error, no correlation with any system device has been determined.  No correlation with the ArrayIndexOutOfBoundsException error.

ExcelLink error - ArrayIndexOutOfBoundsException continues to plague the system.  This error seems to be associated with specific PLC boards.  However, I can not keep buying new PLC boards hoping this is the problem.

Are there further items you can suggest?

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Tri-ExcelLink 1.02 ArrayIndexOutOfBounds
« Reply #7 on: June 13, 2008, 12:47:20 AM »
When you said online connection was lost, are you refering to only Excellink connection was lost or both TRiLOGI and ExcelLink were lost?

Let's do a simple experiment if you could - please transfer a blank program into your PLC and have ExcelLink connected to it.  Run ExcelLink and see if you still lose connection. If you don't lose connection when the program in the PLC is blank then we can look at what in the PLC program code could affect communication. We mentioned this in the earlier link but did not get your feedback regarding blank program.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

mjfergus

  • Newbie
  • Posts: 12
  • I'm a llama!
    • View Profile
Re:Tri-ExcelLink 1.02 ArrayIndexOutOfBounds
« Reply #8 on: June 29, 2008, 03:11:29 PM »
Updated Runtime Results - Blank Program Loaded
>Ethernet XServer in use
>2 Computers are on the network
>Computer 1 and the Ethernet XServer are connected to the same Switch
>Computer 2 is on the ethernet, but is connected along the following hardware:  switch 1 TO switch 2 TO ethernet to phoneline adapter TO phoneline to ethernet adapter TO wireless router TO notebook computer.

>A blank program was loaded into the PLC
>ExcelLink data is set to record every 5 seconds, Excel columns A through BX
>Computer 1 logged the 1st 24hrs with no issue - No program in the PLC (blank program loaded)
>Computer 2 logged the 1st 24hrs with no issue - No program in the PLC (blank program loaded) (Note:  Computer 2 has been logging information for 73 hours - continuous (longest delay between datapoins logged to Excel - 1:29 (min:sec))

>Lab program loaded into the PLC
>Computer 1 logged data to ExcelLink for 19hrs 45minutes.  The following error messages were listed in ExcelLink:
----------------------------------------------------------------------
Saving Excel file...Done!
Saving Excel file...Done!
CommException: A29:No response from PLC ID=1 in S3
Access to S3suspended for 1 minute
Saving Excel file...Done!
java.lang.ArrayIndexOutOfBoundsException: 16 in S3
Access to S3suspended for 1 minute
java.lang.ArrayIndexOutOfBoundsException: 16 in S3
Access to S3suspended for 1 minute
-----------------------------------------------------------------------
The above error messages occured 19:45 into the recording session at around 3:15am -  there was no active interaction with either computer for hours prior to this point in time.

>Computer 2 logged continuously through the entire 24hr period - ExcelLink as running on computer 2 displayed only one message:
-----------------------------------------------------------------------
Saving Excel file...Done!
-----------------------------------------------------------------------
Computers 1 and 2 are recording data in parallel - both connected via ethernet running independent copies of ExcelLink

Are there any suggestions on further testing or means of increasing the reliability of the data logging from ExcelLink into Excel?

Differences between the two computer setups:
Computer 1:  ExcelLink configured to AutoSave every 180 seconds
Computer 2:  ExcelLink configured with AutoSave entry blank

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Tri-ExcelLink 1.02 ArrayIndexOutOfBounds
« Reply #9 on: June 29, 2008, 10:02:34 PM »
Does your PLC program uses any of the following commands:

SAVE_EEP
LOAD_EEP
PRINT #1
OUTCOMM 1
NETCMD$(1,xx,xx)
READMODBUS (1,xx,xx) or READMODBUS (11,xx,xx)
WRITEMODBUS 1,xx,xx,xx or WRITEMODBUS 11,xx,xx,xx
READMB2 1,xx,xx,xx or READMB2 11,xx,xx,xx
WRITEMB2 1,xx,xx,xx,xx or WRITEMB2 11,xx,xx,xx,xx

These commands could potentially affect the serial communication with the XServer and resulted in loss communication. ExcelLink was designed to suspend the comm for 1 minute to give the network time to recover.

If you require continuous logging of data and cannot tolerate occasional loss of communication, you may want to consider using the File Service command provided by TLServer (or via the <RemoteFS> tag using XServer) and open data file on a PC, then write the data to be logged to the PC periodically.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

mjfergus

  • Newbie
  • Posts: 12
  • I'm a llama!
    • View Profile
Re:Tri-ExcelLink 1.02 ArrayIndexOutOfBounds
« Reply #10 on: June 30, 2008, 05:17:35 AM »
SAVE_EEP and LOAD_EEP exist in the program, but are never called under the current test conditions.

Can you further explain the error message: java.lang.ArrayIndexOutOfBoundsException: 16 in S3

Also, why would only one of two computers experience a communication error?  Both computers are running the same ExcelLink configuration file - recording about 75 DM values (set to record every 5 seconds).

Communication loss is not a problem as long as ExcelLink recovers and continues.  There have been recording sessions where the "CommException: A29:No response from PLC ID=1 in S3" message is displayed, but ExcelLink continues recording.  Sometimes the "java.lan.ArrayIndex..." error message appears without the "CommException..." error.
Whenever the "java.lan.ArrayIndex..."error message is displayed, ExcelLink stops recording (fails to recover).  


support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Tri-ExcelLink 1.02 ArrayIndexOutOfBounds
« Reply #11 on: June 30, 2008, 09:17:53 AM »
 java.lang.ArrayIndexOutOfBoundsException means that the Excellink program received a response string of wrong length that exceeded its array size. This is most likely caused by loss of some terminating characters that separate one command from another and resulted in an exception being thrown by JRE and ExcelLink could not recover because JRE wouldn't allow it to.

The two computers are connected to the same XServer and the same PLC? It appears that computer #2 is connected through many hoops whereas computer #1 is connected directly to the same switch as XServer? Could you switch the two computers connection and run the test and would the problem now go to the other computer?

You mentioned that with a blank programs both computers did not experience any loss comm. You may want to comment out the SAVE_EEP and LOAD_EEP statement temporarily and re-run the test to see if that makes a difference.
'
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

mjfergus

  • Newbie
  • Posts: 12
  • I'm a llama!
    • View Profile
Re:Tri-ExcelLink 1.02 ArrayIndexOutOfBounds
« Reply #12 on: July 09, 2008, 10:44:55 PM »
Further testing completed.

1)  The ArrayIndex error occurs more often when dCusF functions are called often.  The error rate is nearly eliminated when a minimum time between any dCusF function call is set to 5 seconds (timer value of 50).  Prior arrangement triggered various dCusF calls based upon the special bits 0.5 sec, 1sec and utilized timers and logic conditions.  There is a hard relationship between the ArrayIndex error and the time between dCusF calls.  When the minimum time between calls is reduced, the arrayindex error quickly returns.  When the time is increased, the arrayindex error is nearly eliminated (or takes more than a day to occur).

This test was conducted by allowing dCusF calls to only occur in a specific order and only after a minimum time interval completed since the last dCusF completed.  Only then would the next dCusF function be called.

2)  In response to the previous post:  The SAVE_EEP and LOAD_EEP statements have not be executed on the most recent tests (as related to the recent blog entries).  The dCusF functions containing these instructions are inactive and never triggered (never executed).

3)  SOLUTION IMPLEMENTED - ARRAYINDEXOUTOFBOUNDS ERROR:
ExcelLink data recording utilizing the ExcelLink Run/Pause/Stop buttons has been abandoned.  Excel macros have been developed to start/stop ExcelLink actions.  The macros also monitor data recordings using the TimeStamp features of ExcelLink compared to the NOW() Excel function.  If the time between NOW() and the most recent ExcelLink data entry exceeds a predefined setpoint, the following command sequence occurs:
1) DDE STOP command issued to ExcelLink
2) The current Excel sheet is copied to a new sheet
3) The original sheet is cleared of all recorded data
4) DDE RUN command is issued to ExcelLink
5) Data recording continues at the top of the cleared Excel sheet.
Special Conditions:
ExcelLink must not be started for at least 1 minute following the error, otherwise the RUN command may fail.  I am guessing this corresponds to the "Suspended for 1 minute" message from ExcelLink.  The Excel Macro command "OnTime" is utilized to send the DDE RUN command following a 1.5 minute delay.

Further details of the Macro design are available if desired.