Best Way? Line Speed (Encoder)

JohnnyQuanex

Lifetime Supporting Member
Join Date
Nov 2015
Location
Cambridge, Ohio
Posts
120
Hello Board,

I've been developing a footage counter system for a continuous strip product...
The product is extruded and pulled for cooling over a long cooling table using vacuum belts; from there is runs through a loop dancer, into a coiling guide, and is coiled using a traverser coiler onto a spool... The average product length per spool is about 2,500 Linear Feet... The coiler receives a signal from the counter system and indexes to a new reel when the set point is reached... The coiler has a cutting feature that allows for continuous processing...

I have some programming problems that I could use some help with...

I'm using the following in my control system:

1. Contact encoder (842E Ethernet/IP Encoder 262/144 Steps PR)
2. CompactLogix 5370 L2 Controller
3. PanelView Plus 7 (5.7")
4. Firmware version 28.1 (Studio 5000)

I have attached a snip from my program for the logic in question...

My question involves how my program is currently setup...

I'm using the encoder signal and counting rotations... The feet count features of my program are working great! However, my problem is setting up logic that works for measuring/calculating LINE SPEED... I need to know how fast my product is running (FEET PER MINUTE)...

I have some logic setup that seems really crude, and I'm hoping somebody will have some insight to help me think through this...

My logic starts with a retentive timer and runs constantly when my coiler spindle is enabled (as an input to that timer)... A spool of our product takes about 15 minutes to run and then a new one starts... I have the retentive time set to 2,000,000 milliseconds, which is about 33.3 minutes...

I use the ACC values (milliseconds) from the retentive timer in the next rung and multiply it by 0.001 to get a new value in seconds... In the next rung
(10) I take my counter value (feet) and divide it by my seconds to get feet per second... Then, I take that value and multiply it by 60 to get feet per minute...

This works, but it is constantly variable; for example:
I have a function in program that subtract footage (set to 50 feet per button push) from the ACC counter value... (This is for when we have to stop and cut out a splice from a running spool and then we start again and continue running the spool up to the set point... When I press the button it subtracts from the counter value and throws my FPM calculation off...

Another problem is that this calculation is not very fast and it had very long stabilization times...

I need to use this LINE SPEED as a control input in the program to output alarms and control my coiler in the event that my encoder loses contact with the product that is running on it... This is very important because of the nature our of production process and product... I would rather use a non-contact encoder, but the price is too high and it's just simply not justifiable for this project...

I know I said a lot here, so please let me know if you have any questions...

Thanks as usual!

John

Snip of FPM logic from Cut Length Program.JPG
 
This logic will work well for calculating the average line speed of the entire run. But if you need a more real-time line speed, I would suggest setting setting up a 1 second timer, and a couple tags named "current encoder position" and "previous encoder position". Each time the timer completes move the "current encoder position" into the "previous encoder position", and store the real encoder position into the "current encoder position". You can then compare the "current encoder position" to the "previous encoder position" to calculate the difference per second. You could then average that calculated difference over X number of seconds to smooth out the reading.
 
This is just a simple example of feet per second calculation. I threw in an averaging CPT since you mentioned that things were jumping around. You can change the multipliers in the CPT statement to whatever you want as long as they all add up to 100.

I don't have a CLX box handy to try this out on, but it should work fine.

FPS.jpg
 
This is just a simple example of feet per second calculation. I threw in an averaging CPT since you mentioned that things were jumping around. You can change the multipliers in the CPT statement to whatever you want as long as they all add up to 100.

I don't have a CLX box handy to try this out on, but it should work fine.
You don't happen to have a better picture do you? I can't read the text very well on that one...
 
You don't happen to have a better picture do you? I can't read the text very well on that one...

After looking through what I wrote, I'm glad that you couldn't. I had my SUB instruction backwards! :oops:

I also added a minimum speed check to keep from averaging a bunch of zeros into your speed.

FPM.jpg
 

Attachments

  • FPM.zip
    13 KB · Views: 23
After looking through what I wrote, I'm glad that you couldn't. I had my SUB instruction backwards! :oops:

I also added a minimum speed check to keep from averaging a bunch of zeros into your speed.


Yeah, I figured that part out...

I'm struggling with the CPT instruction...

thanks,
 
If you go to the module properties in logix5000 and on the general tab under module definition, hit change and then select position velocity.

This will give you a velocity input.

Select your units on the configuration tab.
 
There are two varieties of 842 series EtherNet/IP encoders.

The ordinary 842E-S and 842E-M are single-turn and multi-turn absolute encoders that are treated like I/O modules with a cyclic connection.

The 842E-CM-S and 842E-CM-M are CIP Motion versions, which are actually an axis in the CIP Motion subsystem of ControlLogix and CompactLogix controllers.

On the non-motion modules, look at the Module Definition on the General Properties tab in Studio 5000 for that encoder. You'll have to click the [Change] button (in offline mode) to modify the Input Data type.

The default is Position, but you also have the option of Position + Status or Position + Velocity.

The speed will then be calculated onboard, with the units you specify in the configuration.

Edit: Ian beat me to it by 20 minutes !
 

Similar Topics

Compactlogix controller, program has 28 conveyors that use TON's to start the conveyors. The TT sounds a warning horn during start and the DN...
Replies
10
Views
486
I have S7 1512C controler for controlling 48 PID temperature loop, the output is PWM. Please I need the best, most efficient way to write the...
Replies
13
Views
604
I am going to need to use HART multi-drop in order to handle a series of Vega Radar units. There are a lot of options and I'm wondering what...
Replies
3
Views
254
Out of interest, I'd like some thoughts on what would be considered best practice with regards to a 2-position turntable control scheme (see...
Replies
17
Views
1,139
Hello colleagues Anybody knows, what could be the best or a better option to bring with you when you are in service at factory to connect via...
Replies
1
Views
261
Back
Top Bottom