Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - Quadrature encoder - maximum input pulse frequency

(you are viewing a thread; or go back to list of threads)

Quadrature encoder - maximum input pulse frequency (by Ziggy)
Would it be fair to say that the maximum input pulse frequency should be one quarter of the PLC loop frequency?

Given the PLC loop time of say 10ms this would then translate into a maximum pulse rate of 25Hz.

Is 25Hz ( 1500RPM at best) good enough?

Is 10ms too conservative?

Let us say micro controller is running at 16MHz. Then a 10ms slice of time implies 160000clock cycles.
On a RISC machine that is a lot of instructions.
How many instructions does a fully utilised program memory of a ATmega328 hold?
Assuming the program is a simple sequential series of instructions ( no conditional loops) what is minimum PLC loop time?

Just trying to unravel the story and find a good starting point.
Mon Aug 20 2018, 18:24:09
(no subject) (by David R)
Hi I just test the time after the code is finished and then set the cycle time a bit longer to make it stable and known,
Please see attached sample of the line I add to my code.
Kind Regards
David
Thu Aug 23 2018, 19:59:34, download attachment _test_frq.ld
(no subject) (by Ziggy)
Hello David,

Yes testing is great and works a treat provided the processor has the legs to do it.

How ever I am hoping to establish a "rule of thumb" kind of a feel before committing to a program and a loop time setting.

I am faced with a fairly pedestrian problem at the moment.
A permanent magnet DC motor needs to be driven bidirectionally with a specific velocity/acceleration profile over a fixed ( constant ) distance.
It has a quadrature encoder consisting of a ring magnet with 8 pole pairs and a couple of hall sensors.

It needs to traverse this profile in a limited time with a minimum jerk.
jerk is defined as first time derivative of acceleration.

Obviously this will involve a trajectory planner of sorts , however i was just hoping to figure out the loop time issue which will get into the trajectory planner.
Fri Aug 24 2018, 04:26:05
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):