Max Scan Time - CNET - Encoder

Maxkling

Member
Join Date
Mar 2011
Location
Atlanta
Posts
511
Trying to calculate what our threshold is before we start to miss pulses.

Encoder is on a remote rack with ControlNet, 1756-IB16 module, and Photocraft incremental shaft encoder.

RPI - 20ms
Encoder Revolutions Per Second - 3.183
Encoder Pulses Per Revolution - 3
This comes out to a calculated Hz of 9.55, real world measured is around 9.4 Hz. So this leads me to having a pulse width of around 52.36 ms, correct or am I way off?

So what other factors except for the pulse width of the encoder come into play, I have heard RPI (which is why I included it) but am not sure about that?

Thanks.
 
I always have to talk out encoder scaling out loud, so here we go.

A 3 pulse per revolution encoder is unusual, but obviously not impossible. Is it a quadrature style encoder with two channels, or a single-channel pulse generator ?

Three pulses with equal On/Off times means six states that you have to read per revolution, and to do so accurately you need to sample twice as fast as the duration of each state.

So you need 12 samples per revolution, which means 12 samples / (1/3.183) seconds = 38.196 samples/sec.

An RPI of 20 milliseconds gets you 50 samples/second, so the network and module you describe should work with this encoder.
 
A couple of important things:

1. There are, of course, High Speed Counter modules for the ControlLogix platform. There is also a less-well-known Low Speed Counter module, the 1756-LSC8XIB8I. It can handle input frequencies up to about 40 kHz on eight otherwise ordinary 24V discrete input counter channels.

2. The 1756-IB16 has onboard debounce features, but the default is only 1 ms so they should not affect your application.

3. To get an accurate rate calculation, use a fast Periodic Task in the ControlLogix to count pulses. I'm not sure if a change of state condition on a remote 1756-IB16 over ControlNet can trigger an "Event" task, but it's worth looking at.
 
I always have to talk out encoder scaling out loud, so here we go.

A 3 pulse per revolution encoder is unusual, but obviously not impossible. Is it a quadrature style encoder with two channels, or a single-channel pulse generator ?

It's a Photocraft RS-P single output with dip switch 5 down which should be 3 PPR.

Also every thing is wrapped up in a single periodic task which I believe is set to 32ms.
 
Oh, good, you've got a proper encoder product. I just worked on a machine where a colleague (against my advice !) had a metal trefoil disc and a prox switch mounted to the end of a screw actuator. We had to do the "anti-jitter" function in PLC software.

I would recommend creating a new 10 ms periodic task just to handle this encoder feature. It won't load down the controller much.
 
Thanks Ken.

So with everything physically remaining the same what can the maximum periodic rate be before we start missing counts? Am I under the correct impression that the task rate must be less than the pulse width duration?
 
You really have two layers of the "Nyquist sampling criteria" to deal with; the network update and the PLC program execution.

I think that with a 20 ms update of the network connection, you should use a 10 ms update of the PLC scan (i.e. a 10 ms Periodic Task).
 
Thanks for the help Ken.

So I did a little bench testing and here is what I have found...

Here is my signal that I am testing.

encoder_freq.jpg


So what I have found that with a 20ms RPI, 5ms NUT, and task rate of 41ms. The input card will read the exact amount of pulses that I give it. If I change the task rate to 42ms, then it will start to miss pulses. So I guess in a real world test, if scan time is pushed to the point where the periodic task rate has to be changed to 42 to avoid task overlapping, it will start to miss pulses. I also messed with the NUT and saw no change.

So there seems to be an underlying factor of about 10ms, is it from maybe the ControlBus from CNet card to the processor? How is backplane communication handled and delayed?
 
Also this is an exercise to find out the absolute maximum scan time / periodic task rate we can run with the current set up we have without making changes to existing code and configuration. The OEM set the task rate at 30ms and we haven’t had an issue (scan time hangs out around 28ms), but it’s been hard to get an answer of “X” is the limit.
 

Similar Topics

I have some Versmax controllers that start in this mode after a power outage. Any ideas on how to make them start in Run mode after power has been...
Replies
2
Views
1,123
Hello, I've setup a GSV to capture the PLC max scan time (Task\Rate), but what it gives me is actually much lower than that of the current scan...
Replies
15
Views
8,029
In the help under MSG_Modbus and MSG_Modbus2 for TCP in Connected Components Workbench there is the following. A maximum of four message...
Replies
0
Views
1,590
I have one GE Fanuc IC200PNS002-AC Versamax Network Interface Module and the fault red light is blinking and i have checked in manual it is...
Replies
9
Views
170
Square-D Symax SFI-324 I have used the SFI-510 card for many projects, but I came across a SFI-324. Does anyone have ant tech info on it?
Replies
0
Views
69
Back
Top Bottom