11-19-2008 02:53 PM
Solved! Go to Solution.
11-19-2008 02:55 PM
11-19-2008 03:06 PM
When a VI works with highlight execution on and not otherwise, it usually indicates a race condition. If the global variables are being written in more than one place, they may be the problem.
Please post the VI so we can see what is going on.
Lynn
11-19-2008 03:13 PM
11-19-2008 03:15 PM
The attachment did not show up. Any subVIs which are not in vi.lib should also be included. If there are more than one or two, putting everything in a zip file is best.
Lynn
11-19-2008 03:29 PM
11-19-2008 04:21 PM
It attached that time.
The stacked sequence is unnecessary. The dataflow of the error clusters and the VISA resources are sufficient. The dark coloration in the case structure makes it hard to read. And wires looped all over are hard to follow. Look for the Style guide. It is not just to make things pretty. Programs are much easier to debug and maintain when well put together.
I suspect that your problem is the time it takes the instrument to respond to the commands you are sending. The writes in SET_OPMWAVELENGTH.vi and OPM.vi will occur as fast as the program can get from one to the other. How long does it take the instrument to change wavelengths? 50 ms, 1 second, longer? You probably should have at least that much time between the VIs to allow the instrument to get to the next wavelength before taking a reading. You may also need a delay between writing the Read command and reading the result. Check the instrument manual for information on how fast it can respond to commands.
Lynn
11-19-2008 05:03 PM
11-20-2008 09:06 AM
11-20-2008 09:06 AM