Encoder program

Hi PLC-programmers!
I try again, i don´t know what happened with my first attempt.

Can somebody help me to make a program in ladder, to the text below.
I´m using a S7-200 224XP.

Until now my result is MWO(10bit 0-1024)

  • Subtract the last binary 10 bit encoder value.
  • Shift the result left 6 places. The MSB will now provide the direction.
  • Shift the result right 6 places, using an arithmetic shift. The sign bit should be shifted into the upper bits, as the number is shifted right.
  • Add this to a software counter INT or DINT.
Thant you
 
Encoder

Hi Ozee!

My work until now is.
I´ve connected a 10bit(1024) gray code absolute encoder to a S7-200 224XP PLC, then converted the gray code to binary.
for each turn i count 0-1024, then start over again.
I want to continue count upwards/downwards,
for direction i have a input from encoder -
high=backward - low=forward.

The program i refer to in my request, should solve the problem, but i don´t know how to program it in ladder.

Thank you
hjajoe
 
Hi there

Well there must be a "Zero crossing" signal coming from the encoder.Check the encoder manual.This signal comes from the encoder when encoder turns from 360 to 0 degrees.
So 5 "Zero Crossing" pulses means you have walked: 1800 units + abolute counts of the ongoing rotation.
Using this Zero Crossing pulse along with Forward and Reverse pulses you can count UP and DOWN.
 
So 5 "Zero Crossing" pulses means you have walked: 1800 units + abolute counts of the ongoing rotation. Using this Zero Crossing pulse along with Forward and Reverse pulses you can count UP and DOWN.
Add this to a software counter INT or DINT.
I want to continue count upwards/downwards,..
In other words, create an UP and DOWN Counter in you PLC program to count the revolutions of the encoder. When it turns 1 revolution clockwise, Count UP. When it turns 1 revolution counter-clockwise, Count DOWN. Use an arithmetic instruciton to add value of UP/DOWN counter to current value of encoder to get total distance traveled.
 

Similar Topics

Hi All, I am using 1734-VHSC5 module for measuring Spindle (Drum) RPM. Encoder specifications are: PPR-200 Pulses - A and B I have configured...
0
Replies
782
Views
Hey all, So I have a question for you, I have an application where we need to run a gear motor across a rack (slow speed - approx 40 inches a...
9
Replies
3,436
Views
Hello I am having trouble setting up my encoder program to read and give an RPM value from a pulse train from an encoder. I have today found...
0
Replies
2,015
Views
hello could anyone tell me how to set up the KL5111 module on the Beckhoff plc to display a speed value from an encoder. I believer the KL5111...
9
Replies
5,166
Views
How do I keep track of the counts for this encoder in programming. I am using logics 500. The encoder PPR is 1000.
3
Replies
3,741
Views
Top