LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Mr.Fah

simple x2 and divide by 2

Status: Declined

Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.

Hello,

 

I just suggest simple function.

LabVIEW already have +1 and -1 function in numeracal palette.

In my experience, I commonly use multiple by 2 and divide by 2.

whenever I code labVIEW, I desire simple x2 and ÷2 function. (just like +1 or -1)

 

Thanks.

7 Comments
X.
Trusted Enthusiast
Trusted Enthusiast

That probably would do the trick:

 

ScreenHunter_002.jpg

Edit: Except that of course it would not... really. Sorry!

altenbach
Knight of NI

Yes, scale by power of two is exactly what I use. n=1 is time 2 and n=-1 is divide by  2. (same as left shift, right shift). If you don't like the second connector, you can always wrap the functionalities into two inlined subVI.

 

tst
Knight of NI Knight of NI
Knight of NI
When I need to multiply by 2 (which is not that often) I usually just use an Add and wire the number into both inputs.

___________________
Try to take over the world!
Mr.Fah
Member

I want that for just simplicity in block diagram.

The scale by power of two is just same as multiply or divide, already in palette.

Using Add instead of multiply by 2 seems good.

 

How about divide by 2 ? 🙂

PhillipBrooks
Active Participant

Maybe Expression Node would be an option?

 

Expression Node x div 2.PNG

 

 

AristosQueue (NI)
NI Employee (retired)

Use Left Shift and Right Shift for integers to do multiply by 2 and divide by 2, respecitvely.

Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.