Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

10-12-2010 11:59 PM

Options

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hello everybody,

I'm currently using LabVIEW 2010 and experiencing the following problem with DAQmx custom scale: I firstly created a custom linear scale (y-intercept=0, slope=50) and then a global channel which uses that scale. The real signal acquired from a NI-9205 (AI module) is in the range -8/+8 Volts; when I try to read the measure from the channel it seems saturated.

I discovered that changing AI.Max and AI.Min through a DAQmx Channel Property Node I can improve the situation but the point is: I was not able to set a range of -1000/+1000 for instance because it exceeds the maximum allowed and I get an error!!!

So, what are custom scale for???

Does anyone know how to fix it?

There seems not to be any possibility of having a big scaling factor! If I want to convert 1V into 1000V I will never achieve it!

Many thanks for the help.

B.

Solved! Go to Solution.

Solution

Accepted by Blueyes

10-13-2010 12:34 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

HI,

The custom scale will be the function that converts the input voltage to whatever units you may want. If you use a linear scale it is in the form:

Data in user units = m * Vin + b

where m is the slope, b is the intercept and Vin is what comes in from the analog input channel.

The MIN and MAX you set are the min and min AFTER scaling. So if you want 1 volt in from channel Ain to show up as 1000 in the code, you want:

m = 1000, b = 0

Then your MAX and MIN is limited to -10000 and 10000 when the AI channel range is +-10V. Selecting a MAX or MIN outside this range will cause an error and numbers read in outside this will so saturation.

The 9205 has selectable ranges: ±200 mV, ±1, ±5, and ±10 V programmable input ranges. I have not used the 9205 so I am not sure if this range is automatically selected or user set in the module preferences. Either way, this will effect what the possible MAX and MIN are.

For example.

If you did what you said and used slope = 50, and intercept = 0, AND you had the system set to ±10 volts, then the MAX and MIN that you can set are limited to ±50*10 = ±500. Thus if you try to put a maximum value of 1000 in there, you will get an error since it has to be within +500 to -500. Your saturation will occur at ±10 volts (which is the scaled ±500)

If the range is set to +-1 volt, then your MAX and MIN must be within -50 to +50. Any values outside this will produce errors. and if you try to read in voltages above +-1volt (+-50 scaled), it will saturation.

I hope this is clear and helpful.

--Alex--

Highlighted
Options
Thank you. This is not intuitive. You would think a scale is a scale and that min/max is pure voltage to protect the system. Seems like there is space for human error to configure the device to an improper input range.

08-30-2017 05:54 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

11-28-2017 04:08 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Good solution. I agree min/max value is not intuitive.

11-29-2017 01:05 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hi,

reading the LabVIEW help for DAQmxCreateChannel may help here:

**minimum value**specifies in**units**the minimum value you expect to measure.**custom scale name**specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, wire the name of the custom scale to this input and set**units**to**From Custom Scale**

When you apply a scale then you apply different units. Min/Max follow those different units!

Best regards,

GerdW

CLAD expired, using LV2011SP1 + LV2017 (+LV2019 sometimes) on Win7+cRIO

Kudos are welcome

GerdW

CLAD expired, using LV2011SP1 + LV2017 (+LV2019 sometimes) on Win7+cRIO

Kudos are welcome

11-29-2017 05:57 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

@jprevost wrote:

Seems like there is space for human error to configure the device to an improper input range.

I disagree. To somebody who just cares about that measurement, it is much more intuitive to put in the range they expect their measurement to be (inches, lbs, etc). It would introduce more error if you forced them to do the math to get back to the voltage.

There are only two ways to tell somebody thanks: Kudos and Marked Solutions

Unofficial Forum Rules and Guidelines

12-11-2019 11:37 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hello AlexNCSU,

I have a similar question. I am using NI 9203 for my temperature sensor and getting values between 4-20 mA current, whereas my temperature range is 0-150 deg C. Any idea what should be my value for y = mx+b equation. (Assuming it is linear.)

I have also tried creating Map range scaling for this but when I click start option, nothing comes up to the graph. Surprisingly, there is no error as well!!

Analog current: 4-20 mA

Temperature range: 0-150 deg C

Thanks in advance,

Maitrey

12-11-2019 11:58 AM - edited 12-11-2019 12:39 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Math. Input range 16mA, output range 150 deg C. So m would be 150/16 or 9.375

Since the min is 4 mA, that means you need to subtract 4 mA times 9.353 degC/mA, or 37.5. So b would be -37.5

12-11-2019 12:34 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hi RavensFan,

Please have a look at the attached snippets. I am getting an error w/ these values,

**Error -200077 occurred at DAQ Assistant****Possible Reason(s):**

Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.**Property: **AI.Min**Requested Value: **4.0e-3**Value Must Be Greater Than: **-37.687500**Value Must Be Less Than: **-37.312500**Device: **cDAQ1Mod1

12-11-2019 12:40 PM - edited 12-11-2019 12:41 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

You said milliamps.

Your actual range input is in Amps.

So the new math is 150 degC/.016A or m=9375

and b would be 9375degC/A *.004 A. or b = -37.5 (stays same)

And like the earlier messages said, the Min and Max range would now be your SCALED units or 0 min 150 max.