Reading encoder for input/output and limit reading

yard1e

Member
Join Date
Sep 2019
Location
Porto
Posts
1
Hi, I'm just a complete newbie on ladder logic and plc programming and I started a few weeks working with that, also it's my first post here, I'm working with an omron plc and I have an encoder attached to a rack and a pinion that reads the move of a component that is moved on a rail with a motor.
The encoder sends a signal ranging from 0 to 10v and I already set the limits physically on the encoder, but I need to measure that component distance outside of the range from a reference point in millimeters. First I need to convert the position in millimeters (I saw scl and apr functions but I don't get how I proper use it) so in an HMI it shows the proper distance that this component is placed at a reference point, set limits so this component so it only rides forward and backwards on that range and let the user input a value in millimeters so it travels to the desired position.
I tried to convert the signal in milimeters with a couple of mathematical operations but I think scl or apr is more suited for that operation, I have the conversion working but I think it can be optimized.
Another thing is that I need to store the current value because it oscillates and I'm using a compare function <> to check if the value has been changed to call the move function, probably here's another good way of doing it with switches.. I dunno.
The last thing is I need to reposition the component because when it reaches the value it travels a lil bit further so I need to make it go inside an approximated value (-1mm or +1mm).

Is anyone here that have done something similar and could help me out? It's my first post here and I'm already asking for too much... I did a research over the internet and here but could not find anything similar for my problem...

Thanks
 

Similar Topics

Hello all. I have an issue I have not been able to find an answer to online. I have a 1794-VHSC connected to a Contrologix PLC and a Sick...
Replies
5
Views
2,381
Hi, Everyone I am interfacing rotary encoder(incremental encoder) with PLC. This encoder using for speed measurement (RPM). The encoder is giving...
Replies
6
Views
4,480
Hi all, Anyone can tutor me that how to write the formula for encoder to read the motor RPM(Omron PLC). Thanks in advance
Replies
5
Views
2,687
Hey guys I have a TWK encoder . WIth 4096 ppr and 334 mm /turn. I would like to get position from it.. How to count the pulses . I have...
Replies
3
Views
2,765
Dear all, I don't know why setup of password became challenging and weird. After setting up the password and try to upload the ladder from the plc...
Replies
3
Views
97
Back
Top Bottom