LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programming suggestion-Pressure transducer

Solved!
Go to solution

Hello,

I am trying to read 19 Pressure transmitter values.

2 PT are 0-350bar

other 17 are 0-200bar.

as per the equation y-mx+c

I want to generalize and set the values to each PT.

using some code, farmula node......also if I consider each PT it takes lot of space in the main VI.

Please see the attached and give some suggestions.

0 Kudos
Message 1 of 17
(3,210 Views)

1. To use the formula node you need to assign names to the input and output variables.

2. You do not define c.

3. This can probably be done as easily with LV primitives rather than a formula node.

4. Create an array of the scaling factors.

 

Lynn

 

Scaling array.png

0 Kudos
Message 2 of 17
(3,193 Views)

Thank you!

I have some questions:

1. the output array of the subVI is 1Dimensional and just give the value of index 0,1,2.But I have two types of pressure transducer 0-350(PT1 toPT3) and 0-200 bar(PT4 To PT19). How can I get the scaling values?

2. What about using the Linear fit? How can I use it? for two types of array based data?

 

Extension of the VI:

1. I want the value which is acheived from the PT1, PT2, PT 3 (all 0-350bar) should checked for upper limit=85bar and lower limit=20bar? A graph should be plot?

2. The mean and standard deviation of all PT values should be calculated and a histogram should be formed?

I have tried to develop the code. Please suggest.

 

Download All
0 Kudos
Message 3 of 17
(3,173 Views)

Instead of using the MathScript node you can use the Polynomial Evaluation point by Point by giving the Gain and Bias value as an array for to the transducer output for the transducers depending on its range.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 4 of 17
(3,168 Views)

Hello,

 I have some questions:

1. the output array of the subVI is 1Dimensional and just give the value of index 0,1,2.But I have two types of pressure transducer 0-350(PT1 toPT3) and 0-200 bar(PT4 To PT19). How can I get the scaling values?

2. What about using the Linear fit? How can I use it? for two types of array based data?

3. I tried with polynomial function, but I am not sure how to sue it?

 

Extension of the VI:

1. I want the value which is acheived from the PT1, PT2, PT 3 (all 0-350bar) should checked for upper limit=85bar and lower limit=20bar? A graph should be plot?

2. The mean and standard deviation of all PT values should be calculated and a histogram should be formed?

3. The mean and standard deviation is always giving infinite value?

I have tried to develop the code. Please suggest.

Download All
0 Kudos
Message 5 of 17
(3,142 Views)

The main aim of the VI is:

1. Acquisition of 19 PT

2. Scaling the PT using some subVi or Linear-fit or Polynominal function

3. Checking the status of PT1, PT2, PT3 they should be 20 to 80 bar and give the status Overlimit or underlimit.

4. All the PT values should be shown in a graph, histogram, individually with the labels, PT1 to PT19 different bar.

5. Then all PT values mean should be calcuated and standard deviation and another histogram should be shown.

Please see the VI attached and sub VI's are attached.

 

0 Kudos
Message 6 of 17
(3,138 Views)

I have looked at your latest VI.  Without any data I cannot tell how well it is working.

 

For the labels read the detailed help files for the graphs.  You may need to try some things to get it to look the way you want.

 

The Standard Deviation and Variance.vi also calculates the Mean so you do not need two VIs.

 

It looks like it has most of the features you want.  Do you still have questions?

 

Lynn

0 Kudos
Message 7 of 17
(3,119 Views)

1.The scaling is not proper as I used the logic it just gave the same constant values...but it should multiply with current PT value and give the output. I think there is some problem in the SubVI.It should give scaled values of 200bar and 350bar PTs.

2. All the graphs are not showing up.

3. Status graph of PT1, PT2, PT3 give strange sine waves.

4. None of the histogram can be seen.

Please suggest!

 

Download All
0 Kudos
Message 8 of 17
(3,107 Views)

Another subVI for the program.

0 Kudos
Message 9 of 17
(3,106 Views)

One issue is that your Scaling (SubVI) is pulling the data out of the rows of the scalling array constant rather than the columns as I suggested in my posting of 2-20.  The image is difficult to see but the 1,0,2 constants are wired to the lower (column) inputs and you have those values wired to the upper (row) inputs.

 

Please post a version of PT3-2--2.vi with some data saved as default in the array called "data" -- the one coming out of the DAQ Read.

 

Lynn

0 Kudos
Message 10 of 17
(3,091 Views)