LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

BWTEK Spectrometers

To get it to run just when you push a button, enclose the whole thing in a while loop. Inside the loop put your button and a case statement. The button wires to the selector of the case. The False case contains a delay (typically 200 ms) and the True case contains the code of the existing VI. When the button is pressed the code executes. When the button is false, the delay executes while waiting for the button. Change the Mechanical Action of the button to Latch when Pressed. Then it will automatically reset to false after teh program reads it.

There are lots of things that would probably make the program easier to understand and to modify, but you should probably just try to get it runnung first.

Lynn
0 Kudos
Message 11 of 15
(1,337 Views)
Thanks for you help, that seems to do the trick, at least for right now. I don't think I would have thought about that, like I mentioned I'm not that experienced with Labview or other programming languages.

Do you have any idea on some of the other things I'm trying to do? I'm trying to work through them and changing the given code, but not having much luck.

Any other help or suggestions would be appreciated.

Thanks again...
Using Labview 7.0 and 2010 SP1 with Windows XP and 7.
0 Kudos
Message 12 of 15
(1,332 Views)
Look at the State Machine architecture. A basic state machine uses a while loop containing a case structure. There are examples that ship with LabVIEW and many more available at several on-line sites. The state machine is much more versatile and easier to maintain and modify than the sequence structure used in the program you now have.

Try to avoid local variables. They make it difficult to see the dataflow of the program and can result in race conditions (where different parts of the program may be reading to writing from/to that variable at uncontrolled times). If you cannot wire the data directly, shift registers and queues are usually bettter choices.

If you have version 6.1 or later, look at the Event structure for handling the user interface.

The tutorial, the help files, and the manuals are all very useful for learning about LV.

Lynn
0 Kudos
Message 13 of 15
(1,330 Views)
Hi, maybe i could help. I have experience automating spectrometers/monochromators from Jobin-Yvon. Could you send me a detailed email on what you want to do and maybe I can help you with your problem.
0 Kudos
Message 14 of 15
(1,314 Views)
I've had some success so far in trying to get done what I need to do. Although I don't exactly have what is listed below done how I would like. In the VI attached, I have it working to the point it will do the job, however, I'd like it to be how it is described below. Any help or suggestion would be apprciated.


Single acquisition of a raw spectrum, its storage in a raw memory array and its display on pushing "acquire raw" button. The raw spectrum is displayed with or without reference subtraction, depending on the "On/Off" state of the "Raw-Ref" button. The "Raw" or "Raw-Ref" spectrum is saved or not saved, depending on the "On/Off" state of the "Save" button.

Continuous acquisition of the raw spectra and displaying them with or without subtracting the reference spectrum, depending on the "On/Off" state of the "Save" button.
Using Labview 7.0 and 2010 SP1 with Windows XP and 7.
0 Kudos
Message 15 of 15
(1,309 Views)