AB Compactlogix Hi Speed Counter

dave k

Member
Join Date
Jan 2011
Location
ny
Posts
26
i have a 1769L24 with a high speed counter built in. i need to track distance. what is the best method to keep track of pulses to calculate distance?🍻
 
Tell us more about your application and the encoder and what you've learned so far about the CompactLogix embedded high-speed counter.

Are you measuring a workpiece, or the travel of a mechanism ?

Does your control system have to take an action at a precise distance (which the HSC is very good at) or totalize the distance traveled for another purpose ?

Do you plan to count encoder pulses, or convert them into engineering units like inches or meters ?

Do you need to coordinate any motion devices with the position measured by the HSC ?
 
So the application is a encoder on a shaft on a rolling mill. I used the 1769L24 allen bradley HSC to get RPM'S, works good. RPM is for display only.

Now I need to keep track of distance traveled. I'm not sure of the best approach to get this.

After I get the distance calculated I need to trigger another device after a certain amount of material traveled. Does not have to be very accurate +/- 1".

Units are displayed in RPM and Distance in decimal inches.🤞🏻
 
do you know how far the assembly moves per count (pulse), or per revolution and the number of counts (pulses) per revolution?
_
 
So the application is a encoder on a shaft on a rolling mill. I used the 1769L24 allen bradley HSC to get RPM'S, works good. RPM is for display only.

Now I need to keep track of distance traveled. I'm not sure of the best approach to get this.

After I get the distance calculated I need to trigger another device after a certain amount of material traveled. Does not have to be very accurate +/- 1".

Units are displayed in RPM and Distance in decimal inches.🤞🏻


For positioning purposes, work with pulses only if at all possible and form your description speed has no relevance.


There must be sensor to indicate when product entered.
On rising edge of product entry grab the current counter value.
Start_Value = Current_Value
Target_Value (where something is to happen)= Distance_In_Pulses (between entry sensor and target position) + Start_Value
Distance_Travelled(can be calculated anytime) = Current_Value - Start_Value


All in encoder pulses, convert only for display or to enter new target value.


If available, configure interrupt to trigger output (indirectly) when Current_Value = Target Value.


And don't reset the counter, just let it rollover.
 
Last edited:
I assume you're using a 1769-L24ER-QBFC1B controller, part of the "5370" generation of CompactLogix. Those consider the discrete input and output (Q and B) to be one embedded I/O module, and the universal analog (F) and the high-speed counter (C) are each another embedded i/O module.

There was a 1769-L23E-QBFC1B controller in the previous CompactLogix generation as well; you will sometimes find references to the "embedded HSC" differences in the 1769-HSC documentation and technotes. To the best of my knowledge the 1769-L24ER-QBFC1B embedded HSC has identical functionality to the 1769-HSC, at least from what I can see in the configuration tabs.

A rolling mill suggests that you're measuring distance in one direction always, correct ? Do you have an encoder with "quadrature" input channels, or just a pulse generator ?

The Current Count and Stored Count for these HSCs is a DINT, so the Count value will roll over at 2,147,483,647. You said the encoder gives one pulse every 0.005 inches, so you can measure a distance of about 10,737,418 inches, which is roughly 170 miles.

You can reset an HSC with an external input (the "Z" pulse, often) or by setting the .CtrXSoftPreset bit to load a specific preset value (often zero) into the counter.

You could use the threshold and limit ranges that are built into the HSC to fire one of the HSC's outputs directly. Or, you could manually do "COUNT > PRESET" sort of logic in your CompactLogix itself.

Since you've already got the CtrXCurrentRate working, it might be instructive to spend some time online watching the CurrentCount increase and experimenting with resets and limits and output control. When you send a reconfiguration message to the HSC the most disruptive thing that's likely to happen is a brief blip in your RPM display.
 
Cool,
I got the distance working great.
Now i need to fire a valve every 1 ft (this is a operator setpoint that can change).
Any solid ways keep track of the distance traveled so i can fire this valve?🔨
 
Disclaimer: I am not an authority on this and haven't used one of these for a while. For the examples below I'm addressing HSC channel "Ctr0", but you can select 0,1,2, or 3.

The manual you should have in front of you is 1769-UM006. The current version of that describes the standalone 1769-HSC as well as the 1769-L23E embedded HSC and the 1769-L24ER embedded HSC.

How is the duration of the valve's ON-time determined: by time, or by distance ?

When you turn on the valve, do you want to start measuring the next 12 inches right away, or wait until the output turns off ?

Do you want to wire the valve directly to one of the four discrete outputs on the HSC module (or through a relay if it's a large load) ?

One way to fire an output every 12 inches would be to configure one of the HSC's as a Ring Counter.

Let's say that because 1 count = 0.005 inches, then 12 inches = 2400 counts.

To make the HSC work as a "ring counter", set the Minimum Count to zero and the Maximum Count to 2400.

To begin counting 12 inch distances, you will enable the selected HSC (0,1,2, or 3) by settting the Output tag Local:3:O.Ctr0En to true.

Every 2400 counts = 12 inches, the HSC will roll back over from 2400 counts to zero.

You could also add X counts to the Maximum Count if you wanted to use one of the Output Range (Low Limit to High Limit) configurations on the Output Configuration tab to select the HSC onboard output to turn on in that range of pulses.

Or, you could use the Local:3:I.Ctr0Overflow bit to turn on another output in your system, and control the valve based on time instead of counts. That bit goes true when the counter rolls over from 2400 to 0 in the positive count direction, and stays true until you reset it with Local:3:O.Ctr0ResetCountOverflow.
 
Last edited:

Similar Topics

Team, I have a 1769-L24ER-QBFC1B and I am using the High Speed Counter. The application is fairly simple. I have a 1024 PPR encoder on a material...
Replies
2
Views
1,313
Does anyone know what the data transfer rate for this series of CompactLogix PLC's? 1769-L24ER-QB1B to be exact. Cheers.
Replies
1
Views
125
Everyone, I have an application where I need to pump a varying weight(depending on recipe) into a tank. I can't use the load cells on the tank...
Replies
3
Views
1,526
Hello Everyone, Just starting on a Allen Bradley 1769l27ER and components.want to control panasonic servo drive,so output speed should be 20khz,so...
Replies
1
Views
2,678
Can someone please tell me the CPU processing speed of ControlLogix L61 and CpmpactLogix L27ER??
Replies
14
Views
12,198
Back
Top Bottom