NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
wetback
Posts: 6
0 Kudos

scaling analog inputs

This is generic , so I won’t go into the hardware unless necessary, range is simplified 0-20Ma in, 0-20 scale out.

I am having problems with scaling in Lookout, my input is 0-20Ma, input conversion is done in BCD for a unipolar FS output of 16533.

My scaling in Lookout is; raw 0-16533 /  eng units 0-20

The readings are like this;

Input   -  output

0Ma.  - 0

4Ma. – 2.52

12Ma. – 11.27

20Ma. – 20

So I tried converting to BIN  unipolar FS output of 4095

My scaling in Lookout is raw 0-4095 /  eng units 0-20

The readings are like this;

Input   -  output

0Ma.  - 0

4Ma. – 1.65

12Ma. – 12

20Ma. – 20

What am I missing?

Member
Jim_Besselman
Posts: 39
0 Kudos

Re: scaling analog inputs

Create a display to show the raw or unscaled units at each of the mA steps. This will probably give a clue. What is your source transmitter? Is it linear or is it some other function. 

Active Participant
Mike@Forshock
Posts: 201
0 Kudos

Re: scaling analog inputs

Like Jim posted, what is the RAW unscaled reading at each analog step.

 

What is generating your test measurements (0,4,12,20mA)?

-----------------------------------------------------------------------
Forshock - Consult.Develop.Solve.
Member
wetback
Posts: 6
0 Kudos

Re: scaling analog inputs

The source is an Altek calibrator that I checked against another meter. The raw values are;

 

ma.      read    calculated

0           0            0

5        4135      4133.25

10      8273      8266.5

15     12405    12399.75

20     16533    16533

 

Looks like a nonlinear a/d converter, but I didn't expect the scaled values to be that far off.

Member
Jim_Besselman
Posts: 39

Re: scaling analog inputs

Your numbers look quite linear to me, only a few counts off what is expected. The values given scale just fine with my testing. The puzzle is fun but I think it's time for you to share more about your hardware and what driver object you are using. The only hardware I have handy that uses BCD datatypes are automation direct PLCs. Every thing scales just as it should. i.e 2084 BCD =2.52 scaled, 3306 BCD scales to 3.99, likewise 3306 Dec scales to 3.99  and 2084 Dec scales to 2.52.

 

When you did your test what where the scaled values at each step?

 

%maReadScaled

000??

2554135??

751512405??

1002016533??

Member
Jim_Besselman
Posts: 39
0 Kudos

Re: scaling analog inputs

Sorry my formating was messed up in the previous response.

 

%    ma  read    scaled

0      0     0         ??

25    5     4135    ??

75    15   12405   ??

100  20   16533   ??

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page