LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do i create a calibration curve for a pressure sensor

I am trying to use MAX to create a calibration curve for a pressure sensor.  How is this done.  I wanted the x-axis to represent the voltage and the y-axis to represent the pressure signal.
0 Kudos
Message 1 of 15
(10,943 Views)
It sounds like you are trying to create a custom scale for your sensor.  Review this document and let me know if you have any questions- hopefully this helps! 
Regards,


h_baker
National Instruments
Applications Engineer
Message 2 of 15
(10,921 Views)

That's a handy tool to create the calibration curve, but, does it work for non-linear curves?  Mine is slightly non-linear. 

 

Secondly, I have my calibration curve, of voltage vs. position.  In my application am measuring voltage and want to convert it back to position for a calculation. How do I extract the position values for a given measurement from the calibration data of voltage vs. position?

 

E.g., suppose that I measure voltage of 25mV, and by inspecting my calibration curve, I can see that corresponds to 361 position units.  How do I put that calibration curve data into the vi so the vi can do the conversion for me, e.g. measure 25mV, and output 361?

 

Thanks,

Dave

0 Kudos
Message 3 of 15
(10,349 Views)

Dave,

 

Thanks for posting.  The custom scale creation dialog provides four different methods for creating scales.  The one that may work for your example would be the Table option.  This will allow you to choose specific points for conversion and points in between will be scaled proportionally.  Additionally, the Polynomial option may also be useful if there is an equation that describes the relationship between the points.  Let me know if this helps!

 

Regards,

Joe S.

0 Kudos
Message 4 of 15
(10,323 Views)

Hi Joe,

Thanks for the advice.  MY guess is that the Table would probably work for me, if it scales between existing points. That should be good enough for our application. ARe both of those options available in the Labview 2010 basic edition?  I do not have the mathscripts add-on. ARe they in Labview or MAX?

Dave

0 Kudos
Message 5 of 15
(10,307 Views)

Dave,

 

The function to create a custom scale is part of the DAQmx API and should be available in LabVIEW or Measurement & Automation Explorer.  You would just need to have the NI-DAQmx driver installed.

 

Regards,

Joe S.

0 Kudos
Message 6 of 15
(10,302 Views)

Thanks, Joe.  I definitely have DAQmx, so, I'll start digging into it, and figure it out.

 

Dave

0 Kudos
Message 7 of 15
(10,277 Views)

HI Joe,

I made the custom scale using MAX, and I used the TABLE function.  Now, how do I make the vi read the values.  Is the table embedded into the vi?  What function do I need to actually use the custom table data.  For example, I wanted a very simple vi that took an input, and then outputted the interpolated value from the curve, how do I do that?

Thanks,

Dave

0 Kudos
Message 8 of 15
(10,260 Views)

Dave,

 

To start using the custom data that you set up in the table, you can just use the name of the scale that you created as an input to the DAQmx Create Virtual Channel.vi and create the rest of your data acquisition application normally.  The data that you acquire will be scaled according to the values in the table you created.  An example of a DAQmx program that uses a custom scale can be found here.  I hope this helps!

 

Regards,

Joe S. 

0 Kudos
Message 9 of 15
(10,229 Views)

Hi Joe,

Thanks for the suggestion. I opened the file you offered and tried to duplicate it in my application, but, I am getting this wiring error:

 

"Type of sink is cluster of 3 elements,  but, type of source is DAQmx scale."

 

I tried right clicking to change the source or sink but, can't figure out how to make them compatible.  See the screen shot, please.

DAve

0 Kudos
Message 10 of 15
(10,175 Views)