From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

Replace Array elements using menu ring

Solved!
Go to solution

Hello,


i need to change values of an array with 16 elements. Using an array control looks really bad. So i thought i can make it with an menu ring. I tried to use the menu ring value as index to change the corrosponing value. That works. But when i change the the ring element, the changed value isn't stored in the array an the initial value is restored.

I attached a minimal setup.

Maybe some of you guys can tell me whats wrong with my program.

Thank you.

0 Kudos
Message 1 of 4
(1,830 Views)

You always start with an empty array with each iteration. If you want to operate on the updated array, you need to keep it in a shift register. Very basic stuff.

 

Your loop also needs a small wait. No need to spin millions of times per second.

0 Kudos
Message 2 of 4
(1,823 Views)
Solution
Accepted by FaDen93

Here's how it could look like.

 

altenbach_0-1593356116550.png

 

 

Note that your index array was pointless. If you want two modes (replace current, read current), you should use a case structure and two states.

Message 3 of 4
(1,815 Views)

Thanks for your help. I implemented the case structure too.

 

0 Kudos
Message 4 of 4
(1,784 Views)