NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Array index out of bounds error using LabVIEW Microsoft Office Toolkit in TestStand

Hi,

I dont think the problem is in that sequence. I think its in the MainSequence that calls that step Excel-Set Cell Color - green.

If you can post that MainSequence. Dont need all the subsequence so if you want to remove them and just leave the MainSequence in the Sequence File.

Ray

Regards
Ray Farmer
0 Kudos
Message 11 of 43
(2,528 Views)

Hi Ray,

I am attaching the program with the subsequences removed.

Let me know if you have any questions.

Thanks

0 Kudos
Message 12 of 43
(2,524 Views)

Hi,

I guessing here, you have some local arrays of size 50 in the MainSequence.

Your error seems to be on row 51 of the excel sheet, therefore you may have exceeded this size.

Try increasing these arrays

In the mean time I will keep looking.

Regards

Regards
Ray Farmer
0 Kudos
Message 13 of 43
(2,513 Views)
Hi,
forget last comment, arrays start from zero therefore there are 51 elements
 
Regards
Ray
Regards
Ray Farmer
0 Kudos
Message 14 of 43
(2,504 Views)

Hi Ray,

Those arrays store fault codes.  I have never had 50 active, but can bump the arrays up to 100 just to be safe.  I think the location of the Run-Time error is a coincidence.

Thanks,

B.W.

0 Kudos
Message 15 of 43
(2,499 Views)

Hi,

I think it maybe the flow control step. No need to change your array sizes.

How often does this occur?

How long has the sequence been running when the error occurs?

 

In the Station Options | Preferences select Debug Options and switch on some or all of the check boxes to see if any other information maybe generated the next time it happens.

Regards

Ray

Regards
Ray Farmer
0 Kudos
Message 16 of 43
(2,495 Views)

Hi Ray,

We run this program on 2 test benches. 

On my bench, this error is sort of random.  Sometimes the program completes all of the cycles, other times it dies when it gets close to the end.  The end is 1440 cycles.  I have seen it stop mostly when it gets above 1000 cycles, sometimes less, sometimes when less than 100 cycles.

On the other bench, it seems to stop near the same place every time (490 - 500 cycles), and has never completed the 1440 cycles.  It is shown back in Message 6.

I will select those options and run the test again tonight on my bench.  The guy that runs the other bench is in a different facility and he is out of town this week.

Thanks,

B.W.

0 Kudos
Message 17 of 43
(2,491 Views)

Hi Ray,

I ran the test again last night.  It made it to cycle 1320 and stopped with the Run-Time Error.  I did not see anything generated by the boxes you told me to check.   

You have led me to believe that the error may be caused by something that happens before the Excel - Set Cell Color step.  I am going to look at how the Active_Faults_Before, Active_Faults_Now, and New_Active_Faults arrays interact with each other.  It looks to me like the No new Active Fault Codes test fails and the program locks up trying to display the new fault codes in the Excel cell.  It prints the word FAIL, but I am not seeing the new Active Fault Codes in the Excel cell when the error occurs (see Message 6).

Thanks again for your help.

B.W.

0 Kudos
Message 18 of 43
(2,480 Views)
Hi Ray,
 
Check this out!  It looks to me like the Active_Faults_Before and Active_Faults_Now arrays have collapsed down to [0].
 
The New_Active_Faults array that stores the difference between the other two arrays still says Array of Strings [0..50], but the other two arrays say Array of Strings [0..0].
 
Do you have any idea why this may happen?  See the attached picture.
 
 
0 Kudos
Message 19 of 43
(2,474 Views)

Hi,

I've not seen that before.

Ray

Regards
Ray Farmer
0 Kudos
Message 20 of 43
(2,471 Views)