06-28-2020 09:27 AM
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.
Solved! Go to Solution.
06-28-2020 09:46 AM - edited 06-28-2020 09:50 AM
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.
06-28-2020 09:56 AM
Here's how it could look like.
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.
06-28-2020 12:41 PM
Thanks for your help. I implemented the case structure too.