LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Visualbasic memory crash

Hello there,

I have a problem with my app. which is build with labview 6.1 after placing a memory bank of 256mb into the pc we had some problems with saving data into excel, we removed the xtra memory bank but the problem is still there.

We re-wrote parts of the application that the data (Elapsed Times) Will be stored into excel. Yesterday evening at 10.50 p.m. the system crashed and we get a visual basic memory error.

The application was crashed and all the machines where running without any control.

What i saw this morning was a excel sheet from yesterday was open this was for Prototype testing and the sheet for storing the Elapsed endurance time were disappeard.
I opend that sheet and found out that the last stored time was on 10:50 p.m


Config PC P4 2,4 MHZ 256mb
           Win XPpro SP2 with all  updates
           Labview 6,1 with max
         

See att. how the app is build, maybe there is a problem in.

Tia William
 

Running with Labview 6.1
Fieldpoint hardware
0 Kudos
Message 1 of 3
(2,497 Views)
The main program is almost impossible to troubleshoot, but here are a few things I noticed:
 
  1. The loop in the upper right has no delay. How fast will it run? (Sorry, I don't have ieldPoint).
  2. You have quite a few controls that have the same name and thus their local variables look the same (e.g. "mail function", "HPC Actief", "stop", etc.) This makes troubleshooting virtually impossible!
  3. You open an excel reference (at i=0 OR button press) but you never close it! Whenever (i=0 OR button press) is FALSE, you get an empty reference (use default if unwired) for the rest of the code! You need to keep the open reference in a shift register so it is available in subsequent iterations of the loop. At the end of the program, you should close the reference.
  4. There are many painfully complex constructs. To turn a scalar into a 1x1 2D array, you probably don't need an autoindexing FOR loop with one iteration, followed by built array and transpose array. You could just use two "built array" in sequence, or "initialize array". Transposing a 1x1 array does nothing, right? ;). Then you feed this 1x1 array into two autoindexing FOR loops to write the cell value. To supress writing, you force the outer iteration count to zero(!) using an extra case structure. The right way would be to .place it all into a case strucure and, if true, write the formatted scalar to the desired cell while the false case is empty. Look Ma, no loops! (or arrays).

I think your main problem is #3.

0 Kudos
Message 2 of 3
(2,489 Views)
Thanks for the fast reply mr. Altenbach.


I have allready changed some things in the program like naming the controls,indicators etc etc.


The main program is almost impossible to troubleshoot, but here are a few things I noticed:
 
  1. The loop in the upper right has no delay. How fast will it run? (Sorry, I don't have ieldPoint)
    I made some delay´s in the other loops.

  2. You have quite a few controls that have the same name and thus their local variables look the same (e.g. "mail function", "HPC Actief", "stop", etc.) This makes troubleshooting virtually impossible!
    I renamed the controls, indicators etc etc the proper way.

  3. You open an excel reference (at i=0 OR button press) but you never close it! Whenever (i=0 OR button press) is FALSE, you get an empty reference (use default if unwired) for the rest of the code! You need to keep the open reference in a shift register so it is available in subsequent iterations of the loop. At the end of the program, you should close the reference.
    Removed is from the program.

  4. There are many painfully complex constructs. To turn a scalar into a 1x1 2D array, you probably don't need an autoindexing FOR loop with one iteration, followed by built array and transpose array. You could just use two "built array" in sequence, or "initialize array". Transposing a 1x1 array does nothing, right? . Then you feed this 1x1 array into two autoindexing FOR loops to write the cell value. To supress writing, you force the outer iteration count to zero(!) using an extra case structure. The right way would be to .place it all into a case strucure and, if true, write the formatted scalar to the desired cell while the false case is empty. Look Ma, no loops! (or arrays).
    I try to get it clean now that it is simple to look over and easy to handle for the system


Thank you

William Strijks
Kinzo B.V.
Holland
Running with Labview 6.1
Fieldpoint hardware
0 Kudos
Message 3 of 3
(2,474 Views)