Abs Encoder

CarlosMP

Member
Join Date
Dec 2006
Location
canarias
Posts
5
I need to count UP and Down a 10bits ABS encoder every single turn =1024bits, does anyone have an example ladder program I can use for the RSLogix 5000 o 500, because I new on this, I not sure if there is one instruction to do this.
 
i don't understand the question. what is the encoder interface (parallel, devicenet, etc.)?
what do you need help with? devicenet setup? or comparing value to see if encoder is in position?
 
Are you trying to count whole turns aka "encoder rollovers"?

This can be tricky depending on the application if the encoder turns in both directions. If can be tough to tell when the encoder "rolls over". If the encoder always turns less than half a revolution per PLC scan, you can detect the direction in PLC logic. Make a copy of the encoder position. FInd the difference between the copy and the NEW encoder position.

Something like this...
...Where:
max_counts=??? 'Maximum number of counts the encoder will move in 'a single PLC scan.
NEW_POS=actual value from encoder
OLD_POS=value from encoder recorded during the LAST PLC scan.

...Logic....
DIFF=NEW_POS-OLD_POS
IF DIFF < -max_counts THEN revs = revs-1
IF DIff > max_counts THEN revs = revs+1
OLD_POS=NEW_POS
...End Logic...

If you find that the PLC scan is too long or erratic for this to work, you may get it done with a STI routine (regulated scan frequency)...

Paul
 
Thanks Paul

I think what you explained is fine for my application; The mechanism consisted in 2 parallel 10bit encoder + two stepper motor, The program work like this, I have these two variables REAL_POSITION “The ABS encoder” and the DEMAND POSITION “where I wont to go”, I have automatic subroutine that calculate the steps and direction, and a toggle bit start the motion and then we have to repeat the calculation 2..3..4…… times until the error is close to 0. I think, I don’t need to use the instruction STI!!, the axis move very slow, to read the encoder, I’m using 2 TTL modules and then I have to convert from Gray code to binary normally in one scan. (Using a controllogix CPU).



Thanks,



Carlos
 

Similar Topics

I have an application where I will be using a Yaskawa SGDH servo drive with a SGMCS motor. The motor has an absolute encoder that goes back to the...
Replies
3
Views
5,771
Can someone guide me how to set speed reference for ACS580 drive. using ADD on instructions and after setting up a generic Ethernet module in...
Replies
2
Views
1,166
I have been searching and cannot find a reason for why this is happening. This programming was factory installed by a machine vendor and I have...
Replies
5
Views
974
This is s stupid thing but it drives me crazy. 5000 seems to open new lad windows to the far left every time. I tend to like to have my Tags...
Replies
3
Views
1,132
Does anyone know how to, if its possible, get the bar at the top of RS Studio that displays all your open routines as tabs, to shrink width of...
Replies
1
Views
1,565
Back
Top Bottom