LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

understanding scale limit noob questions.

Solved!
Go to solution

i wanted to convert a integer range from -1000 and +1000  to 0 and 255 how to do it im a complete noob.

thanks. 

0 Kudos
Message 1 of 5
(2,628 Views)
Solution
Accepted by topic author cyril117

You add and multiply.  Add 1000 to get your offset in the right place.  You will now have a range of 0 to 2000.  Now multiply by 255/2000 (I'll let you do the reduction).



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 5
(2,626 Views)

Hi noob,

 

please define "convert"! Do you want to coerce or to scale?

 

Look at the comparison palette, there's a "In Range and coerce" function. You may use it to apply limits for your input integer:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 5
(2,625 Views)

another noobie question : how can you insert selected items from an unbundled cluster to a array of numeric indicators ? thanks. 

0 Kudos
Message 4 of 5
(2,615 Views)

Hi cyril,

 

you could use InsertIntoArray (if you really want to insert) or BuildArray (pre-/appending values)...

 

It seems a recommendation for this and that is needed...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 5
(2,610 Views)