Switch function don't work in Flowcode

For general Flowcode discussion that does not belong in the other sections.
Post Reply
walbeek
Posts: 16
http://meble-kuchenne.info.pl
Joined: Thu Dec 17, 2020 3:25 pm
Been thanked: 2 times

Switch function don't work in Flowcode

Post 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.
Attachments
CT200 teller OLED en DK in 16F18857 V001.fcfx
(67.09 KiB) Downloaded 135 times

Steve-Matrix
Matrix Staff
Posts: 1253
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 167 times
Been thanked: 277 times

Re: Switch function don't work in Flowcode

Post 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.

medelec35
Matrix Staff
Posts: 1451
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 512 times
Been thanked: 472 times

Re: Switch function don't work in Flowcode

Post 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
Attachments
Switch_Push_Button_2dgi.fcpx
(8.39 KiB) Downloaded 120 times
Martin

walbeek
Posts: 16
Joined: Thu Dec 17, 2020 3:25 pm
Been thanked: 2 times

Re: Switch function don't work in Flowcode

Post by walbeek »

Seems to work well now, thanks for your help on this!

RInie

walbeek
Posts: 16
Joined: Thu Dec 17, 2020 3:25 pm
Been thanked: 2 times

Re: Switch function don't work in Flowcode

Post 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

Steve-Matrix
Matrix Staff
Posts: 1253
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 167 times
Been thanked: 277 times

Re: Switch function don't work in Flowcode

Post 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.

Post Reply