11-05-2012 10:06 AM
Hello dear Labviewers..
I have a pressure transducer, which is connected to NI-9237.
How can i configure the offset in y-axis, so it starts at 0.00 y-value everytime i run the VI ?
Thanks in advance
Oesen
11-06-2012 06:32 AM
Hi Oesen.
As far as I understand your question, you just want to add an offset to the measured value? Have you tried to manipulate the output from the DAQmx read function?
You can also use a custom scale:
What Are Custom Scales and How Do I Use Them?
http://digital.ni.com/public.nsf/allkb/0464919A11C092E386256D800079C3BB
Programmatically Create a Custom Scale in DAQmx
http://digital.ni.com/public.nsf/allkb/022EF0C2D86CD7F28625704C007B1E5D
Let me know if this is helpful, or if I misunderstood your question?
11-06-2012 04:05 PM
I want the Amplitude axis (y-axis) to start at the zero value everytime i press "run the VI".
11-06-2012 05:18 PM
Turn off y-axis aoutscaling and set the minimum to zero.
Lynn
11-07-2012 06:39 AM
Hi johnsold
The y-axis can also become negative. So i dont want to set the minimum value to zero. I just want a zero starting point in y-axis everytime i run the VI.
11-07-2012 07:10 AM
You can use a property node on the chart to set the minimum value of the y-axis.
Right click the chart => Create => Property Node:
Y Scale -> Range -> Minimum.
However, if you have autoscale turned on, this value will change as soon as you write something to the chart.
Can you use this?
11-07-2012 07:27 AM
Thanks for the reply Alex
When i connect the daq device to my computer and run the VI, the y-value starts at something abou 1 psi as you can see on the picture below. Can i make a auto resetting function, which let the y-value starts at 0 psi everytime i run the VI ?
11-07-2012 07:44 AM
Hi Oesen.
As I understand you, you get the 1 PSI as output from DAQmx read (or the DAQ Assistant). That is the raw data, and if the raw data is 1 and you plot it, you will of course see that value on the chart...
However, you can make some logic saying, that if the data is less than 1.5 PSI, you simple discharge it and never plots it. Or you can say, that if the value is below 1.5 PSI, you want to plot 0 PSI instead.This is some logic decision, and has nothing to do with the chart... Would that be a solution for you?
11-07-2012 07:53 AM
Thanks for the answer Alex
I can definitely use that method, to plot 0 PSI, if the data is less than 1.5 PSI. So i must use Custom scale for that method ?
11-07-2012 09:37 AM
Hi Oesen.
No, if I understand you're application correct, you can't use a custom scale. In a previous post, you said that the data can drop down below 1.5 PSI later in measurement, which is valid data that you want to plot. If you use a custom scale, the valid data in that range would be affected as well...
I have made an example that discharge the data if it is below 1.5. If the data has been above 1.5 once I keep plotting the data. This means that if the measured data drops down to 0.5, it will still plot that data.
Let me know if the example is useful?