Line speed to PPM

rkukl

Lifetime Supporting Member
Join Date
May 2002
Location
USA MA
Posts
194
I’m working on a problem where I need to calculate the pulses required per revolution of an 8.275” roll as if there were a Proximity sensor mounted on the roll. I felt I could do this by converting roll diameter into roll circumference then, convert FPM (feet per minute) to Inches Per minute. To then arrive at Pulses per minute. I feel my math is correct but I am unable to get correct counts.

In the example shown I set line speed for a slow rate 100FPM or 46 PPM. I am running this test on my laptop with RA RsEmulate my processor is showing a scan time of 120ms so I think the speed is fast enough to work properly. But I only pick up 42PPM. I put all code into one rung hoping for any speed advantage althouth I didn’t expect or see any change. My plan was to prove out my theory then use a Compute instruction to clean up the multiple calculations shown.

Any suggestions will be appreciated.
tried attaching PDF to show code hope it makes it.
Rich
 
When I calculate out the actual time between timer pulses I come up with 41.67 pulses per minute.

You state your scan time is 120 milliseconds. A timer will indicate done when equal to or greater than the preset. In you case the preset is 1.3 seconds. This equates to 10.83 scans. Since you can't get a partial scan, this means 11 scans, or 1.32 seconds. You also lose an additional scan as the timer done bit needs to interrupt the timer for at least one scan to reset it. This makes for a total cycle time of 1.44 second. Divide 60 minutes by the 1.44 seconds to get 41.67 pulses per minute.

Now, Peter, THIS is a case where timers are a bad idea.

Keith
 
I'm picking up what is being said about the timers and reset and overflow. And seeing some of the same issues at the post dealing with Parts per Min. That said any suggestions how to proceed?

#1 Was to use the scan time of the processor in my calculations to offset for timer reset etc (band aid not effective I think)

#2 ???????? Suggestions welcome.

 
I don't know for sure if this will work with AB timers, but it's worth a try.

Instead of resetting timer T4:0 when its DN bit is true, subtract 130 from the ACC. That way you don't lose an entire scan's time each time you reset. In addition, you don't lose whatever time in excess of 1300 milliseconds might happen to be in the ACC.
 

Similar Topics

I've got the perfect project to serve as my first servo programming project. I'm in the process of gathering information and talking through my...
Replies
3
Views
1,537
Hello Board, I've been developing a footage counter system for a continuous strip product... The product is extruded and pulled for cooling over...
Replies
37
Views
14,802
I need to display the line speed of a filler on the HMI. I guess at one point the PC based HMI was able to display line speed in Bottles Per...
Replies
3
Views
1,684
I'm working on a design for a cutting machine. This system gets synchronized with the production line speed, Do the cutting and come back to the...
Replies
4
Views
2,547
Hello and thank you for taking the time to read my question. I'm a fairly new engineer so I'm sorry if my logic isn't as advanced as some of you...
Replies
3
Views
1,818
Back
Top Bottom