01-07-2020 12:01 AM - edited 01-07-2020 12:02 AM
If I want to using a more wide range of the value, How can i customize the range?
For example, I wanna using a range from 0 to 90
when the values coming out : output voltage value (analog) 0V to 5V, finding min & max value.
and I want to reset the range by setting the minimum value to 0 and the maximum value to 90.
like range mapping, MAP function of Arduino !
Solved! Go to Solution.
01-07-2020 01:00 AM
If you just need to change the max value to 90, multiply the input by 18 (90 / 5). If you think you will need something that needs to work more like Arduino map, calculate a scale factor and offset.
Scale factor is equal to (scaled max - scaled min)/(raw max - raw min)
Offset is equal to raw min - scaled min
Then the scaled output is equal to raw input * scale factor - offset
Raw input being your voltage input
01-07-2020 01:02 AM - edited 01-07-2020 01:04 AM
Hi jdb,
@jdb8673 wrote:
when the values coming out : output voltage value (analog) 0V to 5V, finding min & max value.
and I want to reset the range by setting the minimum value to 0 and the maximum value to 90.
like range mapping, MAP function of Arduino !
So you want to apply a simple scaling, like range(0-5V) multiplied by 18 gives range(0-90)?
I guess "MAP" applies a simple linear scaling? There are palette full of functions dedicated to (not just linear) regression and about polynomial functions…
01-07-2020 02:11 AM
when coming out the analog signal from some sensor
I wanna using customized range of value, reset the range by setting the minimum value to 0 and the maximum value to 90.
I think, it is not just simple scaling like multiplied some number. I want to make more wide range of sensor
01-07-2020 02:29 AM
IIRC, there's a VI in DAQmx that does this. I don't have it installed right now.
This is very easy to make yourself. Then you can make it do exactly what you want. Inputs\outputs can be arrays at will, classes, etc..
You can also handle limits your own way.
In short: Scale input between 0-1 by subtracting the min, dividing by range. Then scale to output by multiplying by scale, add min.
01-07-2020 03:48 AM
01-07-2020 01:48 PM
Apparently message threads must go stale after only 2 hours!
01-08-2020 03:55 AM
If I want to using a more wide range of the value so I'll using customized range of signal
For example, I wanna using a range from 0 to 90
when the values coming out : output voltage value (analog) 0V to 5V, finding min & max value.
and I want to reset the range by setting the minimum value to 0 and the maximum value to 90.
I asked same problem before and I got answer that using DAQmx
But I'm not good at using labVIEW that i can using DAQmx and I don't know how it using with Arduino output signal
scaling and mapping in ratio 0~5V >> 1~90 (analog signal)
I found it min and max value from the my sensor
but I don't know how is it input for scaling factor
plz, tell me please explain easily as possible!
01-08-2020 04:16 AM
Hi jdb,
why do you again want to start a new task for the very same problem?
Please stay with your thread until the problem is solved!
@jdb8673 wrote:
I asked same problem before and I got answer that using DAQmx
But I'm not good at using labVIEW that i can using DAQmx and I don't know how it using with Arduino output signalI found it min and max value from the my sensor
but I don't know how is it input for scaling factor
You didn't mention Arduino usage before so you got DAQmx recommendations.
You also got recommendations to apply simple math: can't you apply simple linear scaling?
01-08-2020 09:04 PM
Thank you for your comment
you mean that linear scaling is multiplied some number? or another thing?
Is it ok that using min & max value of senor (mearsuring value)
ex) In 0~5V range, If I mearsured min 3V value and max 4V value, I want to make 3V to 0, 4V to 90
I don't know what function needs and apply
please help