Page 1 of 1

Switch function don't work in Flowcode

Posted: Tue Dec 05, 2023 9:50 am
by walbeek
Hi there,

I have made a counter program with a Graphical LCD on I2C.
The start works Oke and it's counting.
I have made a menu to make some settings.
When I press the button (switch_push_button2) the menu shows.
From this point on, all 3 buttons don't work anymore.

I first made a version with a 7-segment display instead.
Here, all buttons worked oke, but the display doesn't work very well.
It has 3 digits and the last digit works oke but the first two have a very low intensity.
I can't get it better, so the newer version has graphical display instead.

The problem is with the flowcode "Menu instellen" (menu settings)
The display is cleared and written with "Leeg:" (empty) and a number.
Than I use the ReadState function of Switch_Push_Button1
This doesn't work, the flowchart stops here.

I have also tried it with the INPUT function instead, same result.

I have also tried it without the Interupt Disable function in the top of the listing.
Also no result.

I assume that it is a setting or type-mismatch or anything like that.
However, I can't find it.

Does anybody has a tip or suggestion?
Please let me know.

Re: Switch function don't work in Flowcode

Posted: Tue Dec 05, 2023 12:13 pm
by Steve-Matrix
It looks like there may be a problem with the simulation of the switch component when debounce is enabled. We will investigate further.

Re: Switch function don't work in Flowcode

Posted: Tue Dec 05, 2023 12:54 pm
by medelec35
Hello
Many thanks for reporting the switch issue.
I have made a change to the Switch component

If you would like to try the component before the updates are pushed.
Browse to this location using file explorer, it's hidden by default so just paste the link into your address bar.

Code: Select all

C:\ProgramData\MatrixTSL\FlowcodeV10\Components
Replace the existing file with the attached file.
If Flowcode is already open, then you will need to reload your project for the new components to work
If you run any component updates, then the components you added will be overwritten

Re: Switch function don't work in Flowcode

Posted: Tue Dec 05, 2023 1:13 pm
by walbeek
Seems to work well now, thanks for your help on this!

RInie

Re: Switch function don't work in Flowcode

Posted: Tue Dec 05, 2023 4:02 pm
by walbeek
Hi there,

I have just installed a net FC10 update.
In this update the push-button switch simulation doen's work again.
With debounce at 0 (zero) it works well.
I will replace the file again as shown before.
The new file is not included in the update.

RInie

Re: Switch function don't work in Flowcode

Posted: Tue Dec 05, 2023 4:14 pm
by Steve-Matrix
Yes, the component change was made before we released the new core update. You just need to check for Library Updates from within Flowcode and download that new component.