Forum

Notifications
Clear all

S7-1200 HSC misses pulses from a 2 kHz encoder, counts about half

1 Posts
1 Users
0 Reactions
0 Views
(@annaz)
New Member
Joined: 8 months ago
Posts: 0
Topic starter   [#167]

Bench rig, CPU 1214C DC/DC/DC, TIA V17. Incremental encoder, 100 pulses per rev, A on I0.0 and B on I0.1, HSC1 as an A/B counter, 4x. A small DC motor spins it at about 20 rev per second, so 2 kHz a channel.

Turn the shaft by hand and the count is right, 400 per turn. Run the motor and it counts about half what it should over ten seconds. Not noise, pulses are simply missing. I tried 1x instead of 4x and swapped A and B, same ratio missing, and the scope on I0.0 shows a clean 24V square, 250 us high, 250 us low.

Why does it count right slowly and wrong fast? The datasheet says HSC1 goes to 100 kHz and I'm nowhere near that. So is something eating the pulses before the counter ever sees them, I guess something I've not set on the input?


Advertisement

   
Quote
Share: