11-07-2014 12:36 AM
I want to synchronize the laser and power meter. The laser does frequency scanning. I hope every time when laser has an output, the power meter can read the value.
But the problem is, the power value displayed on front panel is the value in last execution loop. For example,
power meter Labview display
8 7
5 8
6 5
9 6
2 9
The upper part is laser, the lower one is power meter. Does anyone know how to fix this problem?
11-07-2014 12:42 AM
First, you have wires going right to left. Stop that. Right now. This is starting down a path that will make your code rather difficult to read.
Second, if you want to run the two readings simultaneously, why are you programming them linearly? When you wire the error input, this function will not take place until it receives the input. You're forcing the bottom portion of your code to execute after the top portion of your code.
11-07-2014 12:59 AM
I wire the Error In to the input of power meter because the laser is multichannel. If I want to scan frequency/channel, I have to turn off the previous channel before opening a new one.
It is like, select channel 1, turn on, measure power, turn off. select channel 2, turn on, measure power, turn off.......
the output is usually stable after turned on for 5 secs. So I wire the input to power meter after the laser is turned on......
Can I just break that wire and run them simultaneously?
11-07-2014 10:17 AM
@cantata2014 wrote:
Can I just break that wire and run them simultaneously?
Yes, LabVIEW is a dataflow language so any function can run as soon as it has all of its inputs available. LabVIEW is inheantly multi-theading; with caveat: Hardware is not multi-threaded- (for instance, you cannot have two or more processes that use the same GPIB Bus at the exact same time) So, don't expect software to redesign your system. You'ld be surprised how often that expectation shows up on these forums