Best Way? Line Speed (Encoder)

I have it working, but it does only a peak and it holds it... The value never goes down, but only up... and it stays up at a peak and never falls...

Thanks,

John

Can you take a screen shot with some live data in it for me? That would help.

I have my original average program back home, and I wrote (or mis-wrote, apparently) this from memory.


Thanks!
 
Can you take a screen shot with some live data in it for me? That would help.

I have my original average program back home, and I wrote (or mis-wrote, apparently) this from memory.


Thanks!

Here's the logic... I added a truncate instruction to clean it up... Like I said, the value just increases and holds; it never falls... (It also takes a long time to stabilize; not much better than the my other time/average setup that I started with...)

I've also included another rung of logic (second picture); this is where I'm trying to use the line speed value as a control feature to error-proof my encoder (in case the wheel loses traction with the product...). I'll probably develop some alarm features with that too, but for now I just need a fast, real-time value for this logic...

I read a couple of posts that said I could change my encoder to velocity, but I'm not sure what that would do to my current counter logic... I'm open to learning more though...

Thanks,

John

Snip of running logic for line speed....jpg Snip of rate monitor logic for line speed....JPG
 
Last edited:
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 !

Ken, Ian,

I setup my program with the velocity setting as a trial...

What now?

How do I use that to program a counter and how does this help me with line speed? (Special instructions?)

Thanks,

John
 
Here's the logic... I added a truncate instruction to clean it up... Like I said, the value just increases and holds; it never falls... (It also takes a long time to stabilize; not much better than the my other time/average setup that I started with...)

I've also included another rung of logic (second picture); this is where I'm trying to use the line speed value as a control feature to error-proof my encoder (in case the wheel loses traction with the product...). I'll probably develop some alarm features with that too, but for now I just need a fast, real-time value for this logic...

I read a couple of posts that said I could change my encoder to velocity, but I'm not sure what that would do to my current counter logic... I'm open to learning more though...

Thanks,

John

Okay, I think I improved the stabilization time problem by reconfiguring the multipliers in the CPT instruction... I changed the around so that the feet per sec would be the leading object...

Looking at it again, I think it also solved the peak and hold problem...

I'll verify, but it sure appears like it has...

Thanks,

John
 
Okay, I think I improved the stabilization time problem by reconfiguring the multipliers in the CPT instruction... I changed the around so that the feet per sec would be the leading object...

Looking at it again, I think it also solved the peak and hold problem...

I'll verify, but it sure appears like it has...

Thanks,

John

Okay, so it is working pretty well now. I do have a problem though; the feet per minute value is spiking from 120 to 178 fpm every few seconds... I think it's occurring when my feet per second value goes from 2 fps to 3 fps and back...

What can I do to stabilize that further without slowing thing down?

BTW: The minimum speed value, I changed it from 10 to 1 because our products only run 2 - 5 fps depending on the product...

Thanks,

John
 
Last edited:
Okay, so it is working pretty well now. I do have a problem though; the feet per minute value is spiking from 120 to 178 fpm every few seconds... I think it's occurring when my feet per second value goes from 2 fps to 3 fps and back...

What can I do to stabilize that further without slowing thing down?

BTW: The minimum speed value, I changed it from 10 to 1 because our products only run 2 - 5 fps depending on the product...

Thanks,

John

Okay, I was wrong. The values stays up when the encoder stops...

Here's a new snip of our line stopped...

It needs someway of resetting the running average maybe? A reset would be too discrete though. I need real-time data so I can detect subtle speed changes and use that data to for control features...
Thanks,

John

Snip of running logic for line speed... New.jpg
 
Last edited:
Why are you experimenting with ladder logic to calculate the velocity when you have a tag that literally gives you the velocity of the encoder, calculated automatically inside the encoder ?
 
Why are you experimenting with ladder logic to calculate the velocity when you have a tag that literally gives you the velocity of the encoder, calculated automatically inside the encoder ?

Ken,

I wrote this earlier today...

_______________

Ken, Ian,

I setup my program with the velocity setting as a trial...

What now?

How do I use that to program a counter and how does this help me with line speed? (Special instructions?)

Thanks,

John
 
Ken,

I wrote this earlier today...

_______________

Ken, Ian,

I setup my program with the velocity setting as a trial...

What now?

How do I use that to program a counter and how does this help me with line speed? (Special instructions?)

Thanks,

John


Ken,

How do I count with the velocity tag?
 
Ken,

I downloaded the program with the encoder setup as a status-velocity... Is there a way to have velocity and position status so I can use the encoder for both..? I don't see any obvious way...

I can't see how to count feet with the velocity settings unless I would simply multiply the rpm by the circumference of my encoder wheel... That doesn't seem like the best way to count...

Any advice would be appreciated...

Thanks,

John
 

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
494
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
611
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
259
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,149
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
266
Back
Top Bottom