Plant Engineer

troylibby

Member
Join Date
Mar 2010
Location
maine
Posts
39
Hello everyone. I am trying to progam RLL to take encoder data and compare a change in the count to allow for another action in my program. What i have is a working encoder that im reading the count into a register the count starts off with a trigger from a prox then i zero the count at the trailing edge of the prox signal. I am looking for a change in lenght of the pruduct passing by. I have tried to use the PLC scan time to detect this change from one size to the other. I cannot seem to make it work. All i want is to detect a change in lenght of the product passing threw the process to track the count of products at defferent lenghts. Any sugestion would be great.

Thanks
 
Before you zero the encoder move you count into a storage register.

If prox true count then when prox false one shot register value to Storage Register then zero Register Value. This way you should always have last Count in Storage Register.
 
If I understand correctly you have a single prox that is held true while the product is passing? If so:

On Rising edge of prox store current encoder count into Count_Start_Value

On Falling edge of prox store current encoder count into Count_End_Value

Length of Part = (Count_Start_Value - Count_End_Value)

Multiply by UnitsofMeasure per Count to get in Engineering Units

That's it in simplistic terms. Things you should also account for:

Debounce the prox signal with a timer if there's a chance it can flicker on/off during part traverse

Account for rollover of your encoder...At some point it's going to rollover 0
 
Plant engineer

The PLC model is a direct logic DL06. Im using direct logic software ver. 5.3.194. The encoder is a generic automation direct type at 1200 CPR. View attachment Ladder View.pdf
Attached is the section i am working on the encoder inputs to the UDC and v7000 7001 are the registers im using.

Thanks
 
OR on PLC side,

Sequence,

1.) object detect.(through beam sensor)
2.) Postive edge Triggering.
3.) reset counter(1 pulse)
4.) count start.
5.) object end.
6.) count stop.(display length measurement)
7.) loop back.

e.g in plc program-> 250 count*scale unit(real value/floating)=length.

LENGTH_1.jpg LENGTH_2.jpg
 
OR on PLC side,

Sequence,

1.) object detect.(through beam sensor)
2.) Postive edge Triggering.
3.) reset counter(1 pulse)
4.) count start.
5.) object end.
6.) count stop.(display length measurement)
7.) loop back.

e.g in plc program-> 250 count*scale unit(real value/floating)=length.

Other than I'm not sure the OP has a pulse generator so no need for a counter. Just record the beginning and end values of the encoder and subtract.

OP...You say you have a 1200 PPR encoder. Are you connecting the Encoder to read a PULSE or the value from the ENCODER? Makes a difference on how you plan to operate. In other words how is the encoder connected? If you are connected to just a digital input, at 1200 PPR, how fast is the encoder spinning, because you could also be missing counts.
 
Last edited:

Similar Topics

Hello everyone i have a question about Allen Bradley Data types.I have a ladder that moves an interger data type N7:6 to a destination M0:1.12. I...
Replies
6
Views
2,312
Hello anyone have any stick time with the Citect SCADA software ver 7.20. Would like to share and swap technical answers and question. Thanks
Replies
0
Views
1,837
Hello guys, I would need some help. I have installed the aveva plant scada and want to run a project. From the configurator, all are fine, as I...
Replies
0
Views
102
I want to establish a Profinet network in my production plant to connect multiple devices, including a PLC, HMI, and multiple Profinet-based...
Replies
19
Views
678
Hi, We are setting up an Aveva Plant SCADA node with the intention to connect it to a Wonderware Historian node. Everywhere I look online I see...
Replies
1
Views
173
Back
Top Bottom