LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-6009 USB - Stop Data Acquisition on one sensor but retain the last value it measured for calculations

Hi everyone, I'm a beginner so I guess my question might be basic. So I'm working on a very simple project that should automatically record the mass of an object with a microload cell and also record the water displaced  with a liquid level sensor if the mass is placed into a circular container and is submerged.

 

Both the load cell and the liquid level sensor are working and give a change in voltage when the load cell is pressed or when the liquid level is touching water. And then I just need to calibrate the load cell so I scale the voltage into an actual weight or level measurement.

 

However, I want to calculate the density of the object as well which right now I have labview taking the current mass and level measurement and calculating the volume and then dividing mass over volume. But the object's weight and water displacement cannot be measured at the same time which is requried in order to calculate density.

 

The data acquistion is basically set at continuous measurements. I have one DAQ assistant that takes in the signal from the level sensor and the load cell and then I split the signal so that calculations can be done on them. Basically what I would like to do is to allow labview to stop data acquisition of the load cell upon pressing some sort of stop button in labview but it would retain the last value it stopped  at. This is necessary so it would still be able to calculate the density after I take the object and put it into the water container to measure the liquid level. Is there some sort of labview block that allows this to happen? 

 

Ignore the nested while loop in the top left, it doesn't do anything. 

 

Thank you in advance for any help.

 

Labview.PNG

0 Kudos
Message 1 of 3
(2,679 Views)

You have a USB-6009, and are using it to do what?  Measure a voltage?  Two voltages?  You have two "devices", a Load Cell and a Water Level (sensor).  

 

How do you envision your "experiment"?  Do you envision taking samples at, say, one/sec from the Load Cell and the Water Level Sensor?  At the same time?  For how long?  Suppose you could take them at the same time, and could "push a button" and get the current load and water level.  Are those two number sufficient to compute Density?

 

What do you want to do with the data?

 

Asking (and, more important, answering) questions such as these will help drive your code development.  For example, if you only need one pair of numbers, that's one type of code, while if you want repetetive measures and "Push to stop", that's another.

 

Bob Schor

0 Kudos
Message 2 of 3
(2,658 Views)

Thanks for the response.

 

Sorry for not clarifying but yes I am measuring two voltages. 

 

Also I envision my experiment to simply first take an object and weigh it to get the mass. Then I take the dry mass and place it into the water container to obtain the amount of water displaced (i.e. the volume of the object).

 

Right now I am not planning take the two measurements at the same time. For how long? I would think 10 seconds would be enough - simply to let the water level stabilize after putting the object in. For the load cell, even less since we are just resting a mass on top of it. 

 

I have a 0-0.78 kg load cell and a 5kg load cell. I prefer to use the 0.78kg load cell since it would be more accurate. If I decide to do both at the same time i.e. place a container of water ontop of the load cell and essentially zero it like a weighing scale, the size of the container I use is limited due to the weight capacity of the load cell. However, this is the route that I will go if I can't figure how to do the experiments separately.

 

I want to be able to stop the load cell but have it retain its last value so that when the object is submerged and the volume is found, it can calculate the density immediately.

 

For the data, I would just like to get quick density and volume measurements of various porous objects. 

0 Kudos
Message 3 of 3
(2,643 Views)