03-04-2024 11:22 AM
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.
Solved! Go to Solution.
03-04-2024 11:46 AM
You can use notifiers for loops synchronization.
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).
03-04-2024 01:16 PM
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.
03-04-2024 03:17 PM
@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.
03-04-2024 04:55 PM
What kind of hardware do you have? Does the oscilloscope support a SRQ?
If possible do the following: