From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bit shifting in array and bit range selection between 2 numeric values

Solved!
Go to solution

Dear all,

 

I am a student Electromechanics in Belgium and I am making a simulation of an explosion with 48 leds for my final project.

In the attachment you can see the program I already wrote. I think it can be done easier but I don't know how.

I splitted the 48 leds into 2 arrays, with in each array 24 leds.

If you see the program u will understand 🙂 Actually the best way to make this is to shift bits, but I don't think it can be done in LabVIEW?

But, the program works, so that's not the real problem.

 

Now I have to add a new function to the program, that makes it possible to add a range of leds.

So If you want to test led 10 to led 18, you can choose the "from .. to .." menu and fill in the range of leds.

Also, if you want to send a linear explosion with a range, it has to be possible to let the explosion start at led 10 and end in led 18.

I thought to make a function like this:

1111 1111 1111 1110 0000 0000 (10)

0000 0011 1111 1111 1111 1111 (18 inverted)

0000 0011 1111 1110 0000 0000 (the range of leds I want)

but I don't know how...

 

Can anyone please help me with this, it's keeping me busy for days 🙂

I don't ask you to make the program for me, because I know its complicated, but just some advise to help me further with this.

 

Thank you!

0 Kudos
Message 1 of 3
(2,529 Views)
Solution
Accepted by topic author Stef_vl

Forgot the attachment 🙂

0 Kudos
Message 2 of 3
(2,528 Views)