From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-02-2007 03:14 PM
The first time the user loads a file, the graph does not display the high
08-02-2007 03:36 PM
08-02-2007 03:38 PM
08-02-2007 11:06 PM - edited 08-02-2007 11:06 PM
One possibility is a lack of data flow because a lot of local variables are being used. Look in the Display files VI, top loop.
A local variable of Display is used. The cluster is unbundled and sent to numerous indicators. This whole chunk of code has no dependence as to what is going on inside the event structure. So it may execute before or after the code in the event structure that updates the "Display" by way of the sub-VI and a local variable. You may want to eliminate some local variables (especially for the "Display" cluster) and wire them through. Use shift registers in that top loop so that changes to the Display cluster can be maintained from one loop iteration to the next.
One local variable you should definitely get rid of is on the far left where you wire the cluster into the indicator and a local variable of the indicator at the same time right out of the first draw graph VI.
Also "paths" in the bottom For loop. Get rid of the indicator/local combination. Wire it into a shift register in the For loop so that you don't need to use local variable reads and writes to keep adding to the array.
Definitely try to straigthen out and clean up wires as you code. Doing this as you work will prevent a lot of trouble doing it later, and will certainly make the code easier to read.
Message Edited by Ravens Fan on 08-03-2007 12:09 AM
08-02-2007 11:07 PM
08-03-2007 01:31 AM
Here's a quick attempt to clean up some of the most glaring problems. I cannot test (missing subVI), so there are probably some bugs left. You should also check if the file dialog has been canceled and skip the rest of the code in this case. Mnay things can be optimized further, but this should get you started.
(I edited under 8.0 and saved for 7.1, so there could be some downconversion issues that need to be addressed. Take my code as a collection of ideas)
08-03-2007 01:57 AM
08-03-2007 08:58 AM