Re: Visualbasic memory crash
- From: William Strijks <x@xxxxxxxx>
- Date: Fri, 9 Sep 2005 08:43:15 -0500 (CDT)
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:
- 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.
- 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.
- 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.
- 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? <img src="../../i/smilies/16x16_robot-wink.gif" border="0" height="16" width="16">.
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
.
- References:
- Visualbasic memory crash
- From: William Strijks
- Re: Visualbasic memory crash
- From: altenbach
- Visualbasic memory crash
- Prev by Date: Re: Problems with building executable
- Next by Date: Re: How can I make and wire reffercence signals(ramp,sine,square) to excite and evaluate the behaviour of the system wih PID control?
- Previous by thread: Re: Visualbasic memory crash
- Next by thread: Re: Making a user friendly front panel to control a device serially
- Index(es):
Relevant Pages
|