LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronize USB3 camera with other measurement parameters (Temperature, mass)

 have an acA1300-200um Basler Ace USB Camera that I want to synchronize with 
temperature readings from a piclogger TC-08 as well as mass readings from A 
sartorius balance.

The aim is to start recording these three parameters at the same time with a single 
click,

I am not sure if this possible or how to get started so any help will be highly 
appreciated!

Thanks,

0 Kudos
Message 1 of 6
(2,197 Views)

depending on lags of the different measurement devices (that includes the camera)

and your criteria for 'at-the-same-time'

you might need to include some waittime into your code for each measuring device.

 

i would suggest you first try to build separate solutions for each device to get the data,

then find out how laggy the system is (including the trigger for measurement, and the time it takes, that labview can access the data).

 

if you find that you get camera images fast enough, that temp/mass changes cannot really keep up, you won't have to do anything.

 

regards


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 2 of 6
(2,192 Views)

I agree with jwscs.  We were doing so something similar, recording from a Serial Balance that output weights at a "nominal" 10 readings/second (over a serial line) and a video camera (GigE) running at 30 fps.  So here's the question -- how do you test synchrony, let alone define it?  Here's one thing we did -- we arranged the Camera to view the surface of the Balance.  We started things running ("simultaneously", we hoped), then dropped something on the Balance.  We kept track of the Millisecond Clock, noting it at each Balance reading and after each frame.  We then looked at the Video, saw which frame had the weight landing on the Balance, and saw which Balance reading went up.  They were "close enough" to not worry about it (i.e. within a Reading or Frame).  But it is important to test!

 

Bob Schor

0 Kudos
Message 3 of 6
(2,172 Views)

You may want to read the manual of the Sartorious scale. Some that I have connected to PC's won't output a value until the balance determines there is a steady-state reading (settling).

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 4 of 6
(2,163 Views)

@AnalogKid2DigitalMan wrote:

You may want to read the manual of the Sartorious scale. Some that I have connected to PC's won't output a value until the balance determines there is a steady-state reading (settling).

 


This means that the spacing of the readings is an interesting "Random Process", and every point must be timed.

 

Bob Schor

0 Kudos
Message 5 of 6
(2,147 Views)

Thank you all for your very helpful advice and apologies for the delay in the reply. I should first state that I am new user of labview and this a side task for me to get this working so I can get on with my experimental work and it is very unlikely that I will use the software in the future.

 

To clarify, the three devices will have different sampling rates as the sartorius balance can't keep up with the USB3 camera and the TC-08 Thermocouple data logger. However, that is not a problem as the main thing for me is that the three devices start recording at approximately the same time ( half a second lag wouldn't be a big problem for my application).

 

Following on from the advice given, I have now managed to write three separate VIs to log the data from camera, thermocouple and balance and they are working fine. The issue with me now is how to merge these three VIs into one VI. What I am after is 

 

1- An excel file output with two columns (Time (ms) and mass).

 

2- An excel file with with two columns (Time (ms) and temperature)

 

3- Camera frames or IV video with frames numbered and potentially a time corresponding to each frame

 

It would even better if the time, mass and temperature are logged into the same excel file even with different time columns for each one of them (Temperature and mass). Please not that righte now, I am getting the time in a format of HH:MM:SS and would like to get it in absolute time

 

It seems like I need to force a user interface button press to trigger the logging from the three devices and have the output files named in advance so that naming and sorting out the directory doesn't delay the triggering of the logging. I have no idea how to do this which is why I have attached my VI so any help is very appreciated.So the main answers I am after are:

 

1- Combine the three loops (Codes) so that they are trigger with just one click

2- Convert relative time to absolute time

3- Log the temperature and the mass into one File (even with different resolution of time depending on the sampling rate of the mass and temperature)

 

Any advice or tips would be highly appreciated many thanks

 

Many thanks

 

 

0 Kudos
Message 6 of 6
(2,107 Views)