Page 1 of 1

SWITCH WOES

Posted: Wed Aug 05, 2026 9:58 pm
by siliconchip
Hi all
im trying to switch between 4 branches on a switch icon, i want to be able to select at random then by storing the position either 1,2,3 or 4 then to use the stored number in this case the variable "store" to proceed to the corresponding data on the following four branches SWITCH ARRAY "SELECT" disabled so if branch 1 selected once chosen by switch "GO" its isolated until the rest of the program is executed so in other words if any other selection pressed the selected led stays on regardless if another switch is pressed any help would be greatly appreciated

cheers bob

Re: SWITCH WOES

Posted: Wed Aug 05, 2026 10:26 pm
by chipfryer27
Hi

Not too sure I understand what you want. Perhaps some punctuation would help <s>

Your chart simply loops and depending on button pressed illuminates the corresponding LED, keeping it illuminated until another button is pressed. What should it do?

Regards

Re: SWITCH WOES

Posted: Thu Aug 06, 2026 7:45 am
by siliconchip
Hi the leds are just purely to show what channel you select once selected the single switch then allows to come out the loop to do the rest of the program thats fine but when it comes out of this loop if you pressed any buttons to do with the leds they still change id like them to stay on the channel picked instead of still being able to be changed

Cheers bob

Re: SWITCH WOES

Posted: Thu Aug 06, 2026 8:13 am
by chipfryer27
Hi

So if I understand correctly:-

1) It loops until a button is pressed.
2) It illuminates an LED to illustrate which button / channel.
3) Keeps looping until "Go" is pressed.
4) Whilst waiting for "Go" to be pressed it should ignore all other button presses.
5) Once "Go" has been pressed it "does something".
6) It then presumably starts all over again?

Is the above along the right lines?

Regards

Re: SWITCH WOES

Posted: Thu Aug 06, 2026 11:59 am
by siliconchip
Hi
Its after go is pressed it should ignore all other button presses and stay on the chanel selected

Cheers bob

Re: SWITCH WOES

Posted: Thu Aug 06, 2026 12:36 pm
by chipfryer27
Hi

One way is to :-

In your switch calculations include setting a Flag (e.g. Flag = 1 or such like) if a button is pressed
Before your switch component have a decision, if Flag = 0, then put your Switch component in the Yes branch

The chart will loop until you press a button, then as you will set your Flag it will no longer branch to your switch component at all.

Later, perhaps at the end of your Go branches you could reset Flag to 0 re-enabling the switch

There are other ways but this should help.

Regards