取消
显示结果 
搜索替代 
您的意思是: 

Replace Array elements using menu ring

已解决!
转到解答

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 项奖励
1 条消息(共 4 条)
2,540 次查看

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 项奖励
2 条消息(共 4 条)
2,533 次查看
解答
已被主题作者 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.

3 条消息(共 4 条)
2,525 次查看

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

 

0 项奖励
4 条消息(共 4 条)
2,494 次查看