Quad encoder help

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
pollob00
Posts: 3
Joined: Wed Jun 02, 2021 5:15 pm
Contact:

Quad encoder help

Post by pollob00 »

I have viewed a example to quad encoder counting number.so i modified it to show decimal number with encoder.but problem is its show int number insted of decimal number
i have attached the project.where was the problem in code?
Quad_Encoder_Timer.fcfx
(12.67 KiB) Downloaded 109 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Quad encoder help

Post by medelec35 »

Hi, pollob00.
Instead of

Code: Select all

dis = ToString$ (rty)
Try

Code: Select all

dis = FloatToString$ (rty) 
instead
Without the preceding Float, then the float changed to an interger before being displayed on LCD.
If you are still having an issue, then precede Count:

Code: Select all

rty = Count
with the FLOAT key word:

Code: Select all

rty = FLOAT Count
If you want to display the float to 2 decimal places for example you can use

Code: Select all

dis = FloatToString$ (rty,2)
Martin

pollob00
Posts: 3
Joined: Wed Jun 02, 2021 5:15 pm
Contact:

Re: Quad encoder help

Post by pollob00 »

I have done that's all.But din't worked for me.still same isssu

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Quad encoder help

Post by medelec35 »

Can you attached your modified flowchart and I will take a look at it, and see if I can spot the issue?
Martin

Post Reply