LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting data from two equipment at the same time

I'm doing an experiment in which a streak camera and scope are used. Actually, I have a data-acquisition code for each equipment separately. My issue is related to get the both data at the same time. If you look at the attached screenshots, you can see that each Labview code is copied and pasted parallely into a new VI. Also, you can see that the data acquisition of each code starts by clicking TF button (boolean, red circles in the attached files). I would like to get the both data by clicking one button, so I tried to remove either boolean and then make the left boolean connected to both equipment. However, it didn't work. Since I'm not familiar with Labview, I will appreciate any advice in advance.

Download All
0 Kudos
Message 1 of 5
(1,015 Views)

In order to make this work you probably would need to be a lot more familiar with LabVIEW, but before getting into that, a general question:

 

How closely do you need the data to line up in time?  Would seconds OK be apart, or do you need accuracy to the millisecond or microsecond?

 

If you're looking for second-level accuracy you could probably set something up with minimal LabVIEW knowledge.

 

If you need millisecond-level accuracy you would need a fair amount of coding skills.

 

If you need microsecond-level accuracy then you probably need hardware synchronization plus a fair amount of coding skills, which might not even be possible (it depends on the hardware you have and if it supports syncing in some way).

Message 2 of 5
(999 Views)

Thanks for your answer. As for the accuracy, millisecond-level would be definitely better. However, I think second-level accuracy is also worth trying at this moment. FYI, my experiment is going on with 15 Hz. Even if one data set is a few second later than the other set, there is a way to match them in the post-processing. As for hardware synchronization, it is already achieved by using a delay generator. It is triggering both camera and scope. Let me know if you can give me some help for this issue with second-level accuracy. 

0 Kudos
Message 3 of 5
(980 Views)

If you look at the scope code, it appears to start off with some setup code (configuration of channels).  I can't see the rest of it but presumably there's a few VIs in a row that do the setup, followed by the start of the data capture, followed by saving the data.  You'll need to be able to find that point where the data capture starts, because presumably that's when you want the camera capture to start.

 

For the camera capture, it looks like there's a loop running that checks every 50 ms to see if one of a few buttons have been pressed (Take snapshot, continuous grab, set camera, check cam status).  That 50 ms is higher than it needs to be (it does need to be there but it could be 1 ms and still be fine... it just can't be zero or it will run at 100% CPU load).  

 

What you probably need to do is before clicking "start" you need to make sure all of the values that are inside of the "Continuous grab" loop are what they need to be already.  Stuff like "Selective grab" as an option, # of frames to grab, save files on grab, the file name to save to, all of that stuff.

 

Then you'll want to add code in right before the scope data starts capturing to turn on the camera capture, and you need to add it in-line to the code to be sure that it only turns on then.  The easiest way to do this might be to create a property node for the "Continuous grab" terminal, set the Value property to True, and run the error wire through it that comes out of the scope setting section before it goes to the scope capture command VI.  Then at the end when the scope capture is done, put that in again but setting it to False.

 

This is all a lot of guessing because you just posted a screenshot rather than the full program.  It's also my best attempt at a simple explanation that might get you what you want... no guarantees.  There are better solutions for this sort of thing, but those aren't the sort of solutions you can add in easily without learning a lot more about LabVIEW, or hiring someone who does.

0 Kudos
Message 4 of 5
(933 Views)

Pictures of code fragments are not really helpful in this or really any other situation where you are asking for help with your code.

 

Please attach all of your LabVIEW code, compress the entire project into a Zip file if you have lots of subvi to include.

 

BTW: From the looks of the pictures you posted you are going to need a lot of architectural changes to make this work the way you want it to work.  

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 5
(917 Views)