LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I plot the output of a sensor with respect to the output of a different sensor?

Hi,

 

I am plotting force vs distance. The sensors I am using are a load cell sensor and a proximity sensor. The proximity sensor (aimed at the floor) will be moving up and down approximately 2 inches so I plan on having the x axis (distance) go from 0 to 2 inches. I would like to plot in .1 inch increments the force from the load cell at the corresponding distance from the proximity sensor.

 

For example;

Every time the proximity sensor reads a value of lets say 1.5 inches, I would like a data point to be plotted for the load cell output at the exact moment that the proximity sensor reads 1.5 inches. I would like to do this in .1 inch increments from 0 to 2 inches.

 

Thank you.

0 Kudos
Message 1 of 22
(4,484 Views)

Can you tell us more about your hardware setup?  IE by what manner is the information transmitted from the sensors to your PC?

 

Typically you'll do this one of two ways:

1. Move .1 inches, stop, take pressure measurement, repeat

2. Move continually from 0 to 2 inches.  Set up a trigger to fire every .1 inches to signal the need to read the pressure.

 

#1 is easier but takes longer to execute.  #2 is harder to set up and may require hardware you don't have.

0 Kudos
Message 2 of 22
(4,465 Views)

Hi Kyle,

 

Thanks for the response. I am using USB-6002 Data Acquisition Device. Unfortunately #1 wont work because the proximity sensor will continuously be moving up and down as the movement is controlled by a motor that will be in motion.  Let me know what you think.

 

Thank you.

 

-Kevin

0 Kudos
Message 3 of 22
(4,436 Views)

Kevin,

How fast your motor moving the proximity sensor (for example  10 mm/sec). Using this data you can configure your sampling rate of your DAQ.  Use XY graph to plot the acquired data(X scale Distance, Y Scale Pressure)

Happy to Wire
0 Kudos
Message 4 of 22
(4,421 Views)

Grap the two sensor values with your DAQ and plot them on a XY graph.... done 🙂

 

Too short answer? Well, maybe too short informations 😉

 

How long does one periode of your movement take? 

How fast can you read your sensors?

 

Since it is usually no problem to read and store a lot of values ... do it!

After that you can decide how to process your data.

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 5 of 22
(4,413 Views)

Hi Sankar,

 

The maximum frequency that the motor will run at is 5.2 Hz so the time it takes for one revolution to take place is 0.192 seconds. If I divide this by two (half revolution moves the sensor down linearly and the other half revolution moves the sensor up linearly) I get 96ms.The stroke length is a total of 3 inches (not 2 like I had stated) so the motor is moving the proximity sensor at 3inch/96ms. I converted this to get 793mm/sec. How can I tell how fast my DAQ can process this data? I would assume it's not ADC sample rate as the inputs are digital for the proximity sensor.. I am using a USB-6002 DAQ.

 

Thanks.

 

-Kevin

0 Kudos
Message 6 of 22
(4,393 Views)

Hi Henrik, 

 

One period of movement takes 0.192 seconds. I'm not sure how fast I can read my sensors, where can I find this in the DAQ manual? I would assume its not ADC sample rate right? the proximity sensor Inputs are digital if I'm not mistaken. I am using a HC-SR04 as a proximity sensor.

 

Thank you.

 

-Kevin

0 Kudos
Message 7 of 22
(4,390 Views)

That HC-SR04 need 20ms to measure one sample.

Assuming a Sine with 5Hz and 76mm peak to peak you have a max speed of ~1.2m/s!

So during 20ms your object is moving more than 2cm! 

 

So the question is how big are your needed uncertaincies?

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 8 of 22
(4,376 Views)

Hi Henrik,

 

Thank you for the guidance. How did you get the value of 20ms for the HC-SR04? 

 

I am looking to buy a proximity sensor that can measure a one sample in less time in order to take more samples for a more accurate plot.

 

If I am looking at potential proximity sensors to buy, where should I look on the data sheet to find sample time?

 

Thank you.

 

-Kevin

0 Kudos
Message 9 of 22
(4,370 Views)

How do want to collect your data?

How do you read the force sensor?

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 10 of 22
(4,359 Views)