Quad encoder

Any bugs you encounter with Flowcode should be discussed here.
WingNut
Posts: 254
http://meble-kuchenne.info.pl
Joined: Tue Jul 13, 2021 1:53 pm
Has thanked: 33 times
Been thanked: 23 times

Flowcode v10 Quad encoder

Post by WingNut »

Good morning. I've been playing with the quad encoder component. Trying each example. I'd like to use the polling method so I'e been fiddling with a circuit for that on breadboard with odd results. Ive been going back and forward to the example but I can't seem to get it to simulate the way I would expect. The dial turns when I click the arrow to the right but gets to a point where it wont come back and also the count displayed is not incrementing by 1 each time - 2 or 3. Also when it gets above 20 it will come back down and stick at 20. Simulation set to max. I have to reload the example to get the count back to zero.
Because of this randomness I cant tell what the issue is with my own version.
Any ideas?

N

*** Update - Seems to be the same in FC9

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

Re: Quad encoder

Post by medelec35 »

Hello.
Can you attach your fcfx project file, please?
Martin

WingNut
Posts: 254
Joined: Tue Jul 13, 2021 1:53 pm
Has thanked: 33 times
Been thanked: 23 times

Re: Quad encoder

Post by WingNut »

Its just the example from the wiki page

chipfryer27
Valued Contributor
Posts: 1149
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 286 times
Been thanked: 412 times

Re: Quad encoder

Post by chipfryer27 »

Hi

It's been a while since I last used a rotary encoder and the WiKi examples worked fine most of the time (if I remember correctly) with one example a little troublesome. I put that down to me / my setup.

I used a KY040 and the bounce on them could take you into orbit...... so it's easy to understand you not reading just a single click. Not had one refuse to count though.

I might be able to have a play with one later tomorrow, if so I'll grab the WiKi files and see.

Regards

WingNut
Posts: 254
Joined: Tue Jul 13, 2021 1:53 pm
Has thanked: 33 times
Been thanked: 23 times

Re: Quad encoder

Post by WingNut »

The simulation doesn't work for me straight off the bat. I'd made up a circuit on breadboard to test - couldn't get satisfactory outcome so downloaded the polling example form wiki and it wont simulate properly either

chipfryer27
Valued Contributor
Posts: 1149
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 286 times
Been thanked: 412 times

Re: Quad encoder

Post by chipfryer27 »

Hi

I downloaded the three examples and found they simulate OK for me. However I notice that you can't change "pointer" style and although you can "rotate" the pointer to any position, the count doesn't follow (you need to use the buttons).

Regards

WingNut
Posts: 254
Joined: Tue Jul 13, 2021 1:53 pm
Has thanked: 33 times
Been thanked: 23 times

Re: Quad encoder

Post by WingNut »

the result using the buttons for me doesnt produce a single increment each time (or decrement) and can jump by 3 or 4 but thats not reliable either - today it incremented to 4 and wouldn't go any higher. No rotation of the knob works

chipfryer27
Valued Contributor
Posts: 1149
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 286 times
Been thanked: 412 times

Re: Quad encoder

Post by chipfryer27 »

Hi

Stupid question, but are you up to date with version and full database?

Jumping by such suggests it is reading multiple key presses (or missing) Have you tried slowing the simulation down and looking at the variables as the chart progresses?

Regards

WingNut
Posts: 254
Joined: Tue Jul 13, 2021 1:53 pm
Has thanked: 33 times
Been thanked: 23 times

Re: Quad encoder

Post by WingNut »

all up to date FC 10.0.4.33. Just switched to a desktop machine and its doing the same. Both windows 11 in case that has any bearing

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

Re: Quad encoder

Post by medelec35 »

Hello.
Can you try changing Repeat Rate to fast and the Edges Per Revolution within properties to the Detents per revolution of your encoder e.g. 18
Martin

Post Reply