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

LDmicro Forum - 30kh frequency count

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

30kh frequency count (by Ahmad sakr )
I tried to count frequency by 2 way
1st by counting how many count in 1 sec
2nd by measuring The time between two count
The max frequency obtained 200hz
I need to measure 30khz
What is the max available Hz can be counted?
Could you help me improve my program to reach 30khz
Mon May 15 2023, 00:33:05, download attachment freq count_073202.zip
(no subject) (by MGP)
30kHz is not possible without using the built-in opamps and registers where you can easily count >30Mhz and for that you have to work in assembler.

With 1mS cycle time you can count up to 1000:2 = 500hz, but because the counting pulses do not coincide with the duty cycle, that is a factor of 3 or 4 less.
200Hz is a realistic value in LDmicro.

That is also the reason why reading incremental encoders does not work.

Real PLCs use special counter cards for the same reason.
Mon May 15 2023, 02:49:37
Post a reply to this comment:
Your Name:
Your Email:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):