LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to start a device and then collect the device data at the same time?

Solved!
Go to solution

Hello,

 

I am looking to start a device through LabVIEW (in this case, fire a laser). I then want to capture information about that laser fire as it is happening, but through a USB oscilloscope. 

 

So for this application I would be connected to one device and have it fire the laser and the second device to read that data (and do this 3 total times). Is it possible be able to do both at once? I am running into timing issues, with setup being two while loops with no data dependencies, the laser firing loop finishes before the collection loop and then the collection loop has nothing to look for.

 

Thanks.

 

 

0 Kudos
Message 1 of 5
(564 Views)
Solution
Accepted by LearningLabVIEW

You can use notifiers for loops synchronization.

Notifier Operations

Using Local Variables, Queues, and Notifiers to Synchronize Data with Parallel Loops

You will need two of them — one for notification about end of fire to start collecting the data, and another one as feedback that the data collected and you're ready for next shot.

But please take a note, that the Windows is not Real Time OS, therefore it will not work deterministically (if this critical or not . depends on your design and desired timings).

 

0 Kudos
Message 2 of 5
(542 Views)

Thanks for the information.

 

Is this still applicable for wanting to capture the moment in time of the laser firing? I cant imagine the delay between the notifiers is substantial.

0 Kudos
Message 3 of 5
(510 Views)

@LearningLabVIEW wrote:

Thanks for the information.

 

Is this still applicable for wanting to capture the moment in time of the laser firing? I cant imagine the delay between the notifiers is substantial.


Well, if you have just two while loops with notifier, then delay will be not much, may be around µs on average PC. But if you will have multiple loops, some other software running in the background, etc, then it could be significantly larger. From your description if your "firing" and "collecting" always running sequentially, then may be you don't need two while loops at all, and simple state machine design pattern will be sufficient.

 

In case of strictly requred "hard real time" you may need oscilloscope with memory, which  is hardware triggered by fire event, then unload data after that to the PC or using cRio with LabVIEW Real-Time/FPGA.

0 Kudos
Message 4 of 5
(494 Views)

What kind of hardware do you have? Does the oscilloscope support a SRQ?

 

If possible do the following:

  1. Trigger the oscilloscope with an output trigger from the laser if available. If not, use a photodiode if available as a scope trigger.
  2. Setup the scope for a single triggered acquisition.
  3. Setup the SRQ in the scope to generate a Service Request when the acqusition is finished.
  4. Initialize all of your hardware, setup trigger, SRQ, etc.
  5. Have your loop fire the laser and wait for the SRQ, then download the data.
  6. Rinse and repeat.
0 Kudos
Message 5 of 5
(481 Views)