CompactLogix HSC Pulse Interval Method to In/Min

dave k

Member
Join Date
Jan 2011
Location
ny
Posts
26
Team,
I have an encoder (Encoder Products TR1)that has a wheel attached to it and rides on material in my machine. I need to calculate In/Min as the material is taken up on a spool.

Encoder wheel diameter= 1.9" @2048PPR circumference=6"
Max material Speed = 25"/min

I am setting up the Pulse Interval Method in my compactlogix. The compactlogix Ctr0PulseInterval provides a microsecond signal

What are the steps to convert Micro seconds to In/Min?:eek:
 
Each encoder pulse corresponds to a specific displacement. In your case it is 6"/2048PPR, or 0.0029297".

Divide the inches/pulse value by the Ctr0PulseInterval, multiply by 1000000 to get inches/sec and multiply by 60 to get inches/min.

Keith
 
thanks for the direction, it works great!

1 Any idea how to clear Ctr0PulseInterval register?
2 Any idea how to slow the update calculation?

thanks
 
1. Have you tried copying 0 into it?

2. I'm guessing you mean increase the time interval between calculations? You could use a timer, and place a .DN XIC in front of the blocks doing the calculations
 
Originally posted by Dhitzfelder:

1. Have you tried copying 0 into it?

The data tag he is referring to is a member of a scheduled I/O input group. Any value you write into it won't stay there for long.


Originally posted by Dhitzfelder:

2. I'm guessing you mean increase the time interval between calculations? You could use a timer, and place a .DN XIC in front of the blocks doing the calculations.

I think what he is really trying to do is decrease the rate at which the module comes up with a new value of pulse interval. There really is no way to decrease that rate since it is effectively driven by the incoming pulse rate. However, as you indicate, just because a new value is there doesn't mean you have to read it. However, I think the OP would be better off averaging multiple values and using that average than to pick single occurrences of the value at a set interval.

Keith
 
Guys,
Thanks for the feedback, I think if I disable the counter the count interval goes to 0. I am using this is a speed calculation and each time I start up my take up motor I need to zero it out for my PID Instruction to start from a zero state.
To slow the refresh rate I thing the average probably better than the timer, I may try both.

thanks again for the replies.
 
store the recorded values in an array, then add up the array and divide by the number of elements in the array.

ArrayX[10]
Copy ArrayX[0] to ArrayX[1] length 9
Move new value to ArrayX[0]
ArrayLength <= 10 ArrayLength = ArrayLength + 1

use cmp to add all elements of ArrayX then divide by ArrayLength

Reset ArrayLength whenever you stop

I believe this will all work, I thought AB had a function to take the average of an array but I couldn't find it.

*EDIT: look up AVE function
 
Last edited:

Similar Topics

Hi everyone, this is my first time trying to setup encoder counts and track the traveled distance and speed i am using L27ERM QBFC1B processor...
Replies
12
Views
378
Hello all. I am trying to get an encoder connected to an embedded HSC on a 1769-l24er-qbfc1b. This is how I wired it in but it isn't working at all.
Replies
11
Views
944
I have a problem with a 1769-HSC module... Occasionally the internal counter counts the wrong way !! I have a rung which asserts the correct...
Replies
8
Views
15,189
Do you have to use a Allen Bradley encoder with the Embedded HSC on a CompactLogix L23E
Replies
1
Views
1,758
cutting my teeth on rs5000 and need help programing a 845t encoder.
Replies
14
Views
4,733
Back
Top Bottom