Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

How to scale a 4-20mA signal

Solved!
Go to solution

Hello,

 

First of all, I have no idea where to look so I might be in the wrong place. If anyone could help me find a way or a manual, that would be awesome.

 

I have a cRIO with a 9203 module to recieve a 4-20ma signal from a flowmeter. I have added the cRIO in Labview and, by dragging the input from the project explorer to the code, created a box (indicator) to show the input value.

The problem is, the value needs to be scaled to a usable value. How do I do this?

I have tried to experiment with the scaling tab's raw and engineering values, but this will not help. Am I missing something? Should I be getting the values using other means?

 

Again, a push in the right direction is more than enough seeing this is a beginners question.

 

Thanks for any help!

0 Kudos
Message 1 of 12
(8,925 Views)

Hello Warrian,

 

Can you give me some more information about your application?

Are you using scan engine or are you accessing the 9203 module from on the FPGA?

 

Can you give some more information about how the scaling should look like (linear, non-linear,...)?

 

What went wrong with scaling tab?

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 2 of 12
(8,901 Views)

What does the manual / spec sheet of the meter say?

Usually simple math, as more current as more flow 😉

However depending on the flow meter, it could be 12mA -> no flow and every mA (+ and -) scale to some volume ....

More tricky with flowmeters are some correction tables or formulars for nonlinearities at low flow rates ...

Spoiler
In other words RTFM

 

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 3 of 12
(8,895 Views)

Well the flowmeter is 4mA - 20mA as far as I know and it's 0-133l/min so easely scaled.

I am using Scan Engine and as far as I know it's linear... I just need to work out where to fill in these scaling values (right clicking the NI9203 input and going to the scaling tab?).

I've tried making the raw scales 0 and 133 (l/min), 4-20 (mA) and doing the same to the engineering scales yet nothing seems to work properly.

0 Kudos
Message 4 of 12
(8,892 Views)

Hallo Warrian,

 

Can you give an example (project + code) of what you have tried?

Do you have any specifications or name of the flowmeter?

 

Did you notify any changes when setting scaling?

Or in other words: 

How do you determine that nothing seems to work properly?

What happens?

 

Did you explicitely redeploy the module after changing the scaling?

 

I don't really understand what you mean with this sentence:

"I've tried making the raw scales 0 and 133 (l/min), 4-20 (mA) and doing the same to the engineering scales yet nothing seems to work properly."

 

Did you follow the explanation on the help page?

http://zone.ni.com/reference/en-XX/help/371361H-01/lvdialog/sm_scale_page/

Another handy resource can be this Knowledge Base: 

http://digital.ni.com/public.nsf/allkb/470AECCD055366FB8625763500548878

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 5 of 12
(8,889 Views)

maybe this.....

0 Kudos
Message 6 of 12
(8,872 Views)

and if it is not linear...use polynomial fit to get a better accuracy for your data points on that curve (or line). i use this function for calibration.

0 Kudos
Message 7 of 12
(8,865 Views)

Hello apok,

 

Please keep in mind that Warrian is using a cRIO and not a cDAQ;

So in this case using DAQmx functions would not be a good solution.

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 8 of 12
(8,838 Views)

I have yet to find a solution, I indeed have a cRIO so the cDAQ solution is out of the question. Does this not have a standard way of being programmed?

 

Again, I find the hardware via scan engine and just drag the input from the hardware @ the project explorer straight to my code (which turns it into a sort-of control, as in I can put a indicator directly on it) but the value of the indicator is not what it should be... (0 to 133L/min)

 

Thanks again.

0 Kudos
Message 9 of 12
(8,822 Views)

Hello Warrian,

 

Sorry for the delay in reply (I was sick last week).

 

Can you share how you're currently doing it?

 

This way I can adapt your code so that it should work.

 

 

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 10 of 12
(8,787 Views)