LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

about reading measurement

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?

 

111.png

0 Kudos
Message 1 of 4
(2,702 Views)

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.

0 Kudos
Message 2 of 4
(2,700 Views)

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?

0 Kudos
Message 3 of 4
(2,691 Views)

@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.Smiley Wink  You'ld be surprised how often that expectation shows up on these forumsSmiley Very Happy

 


"Should be" isn't "Is" -Jay
Message 4 of 4
(2,660 Views)