LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HELP NEEDED CREATING VI WITH POTENTIOMETER

Hi Everyone,

 

I have a DAQ 6009, linear potentiometer and a spring.

 

I want to measure the displacement of a spring using the linear pot and correspond this displacement into a force by multiplying by spring constant k. (F=-k.x)

F=force, k = spring constant, x = displacment

 

I need to create a VI that will,

 

  • Take voltage readout of potentimeter and correspond it to  0-110mm displacement of spring. ie 0V=0mm, 5V =110mm.
  • Multiply the displacement mm by k (which is 25).
  • Record values into excel file and display when stop button is pressed.
  • Record peak force (amplitude).
  • When the pot is fully extented it would correspond to 0mm/0V.

Please find attached current Labview VI and linear pot.

 

As you can see it is multiplying the voltage reading by 25, I want to correspond this voltage to a displacment and then multiply by 25 so I will have output in Newtons.

VI.jpg2012-04-10 20.31.44.jpg2012-04-10 20.31.30.jpg

 

 

Thank you for your help,

 

John

 

 

0 Kudos
Message 1 of 8
(5,827 Views)

Pretty pictures but no one has any idea what you did in the DAQ Assistant to set your scale. You did use a custome scale in there, didn't you?

0 Kudos
Message 2 of 8
(5,806 Views)

I am fairly new to Labview, so excuse my lack of knowledge at the moment.

 

I didn't use a custom scale. Can you inform me of what to do?

 

I multiplied voltage by 20 to correspond it to mm then by k (25) to convert it to a force,  is this correct?

 

I reversed the ground and 5V supply on the 6009 so it will be reading 0 when pot is fully extended?

 

Below is DAQ Assistant and Block diagram/front panel.

 

Also my read from measurement file graph is only generating a somewhat straight line instead of an actual waveform??

 

DAQ Assitant.jpgVI.jpg

0 Kudos
Message 3 of 8
(5,795 Views)

Click on the Custom Scale option in the DAQ Assistant. It would be a scale factor of 22 (110/5).

 

I or no one else can debug a fuzzy picture.

Message 4 of 8
(5,790 Views)

Hint:  if you attach you vi to post you will get better support.

Herrlin

Just trying to spread the LabVIEW love.
Message 5 of 8
(5,779 Views)

VI is attached.

0 Kudos
Message 6 of 8
(5,775 Views)

The VI you posted does not match the last image.

 

I noticed that each time you call the Write to Measurement File, you rename the previous. Are you sure that is what you want? Each file will have 1 second worth of data.

0 Kudos
Message 7 of 8
(5,740 Views)

Hi,

 

I would like to have each file record the full duration between the moment when VI is run and stopped, 

 

Should 'next available filename' be used instead?

 

Apologies my updated VI using 4 potentiometers is located here, http://forums.ni.com/t5/LabVIEW/Quick-Question-Peak-Amplitude-Measurements/td-p/1947573

 

Thanks,

 

John

0 Kudos
Message 8 of 8
(5,726 Views)