Sign in to follow this  
Followers 0
robert_

logic for monitoring the change of position of a carriage

5 posts in this topic

Hello, anyone know how to make a logic that monitors the change in position of a carriage through some rails ?. In my application I measure the position of the carriage by means of a laser sensor and I have to detect if the laser beam is interrupted when the carriage is stationary or moving. I have implemented a logic as the adjunct file, but doesn't work.

Share this post


Link to post
Share on other sites
You should put this in the allen bradley forum. It looks like RSLogix 5000. I don't really understand your logic, it doesn't make sense to me (it just seems to go in circles and not really accomplish anything). Can you answer a few questions? What is the typical reading of the sensor? What is the reading of the sensor when it's interrupted? What do you want to do under normal operations? What do you want to do when it's interrupted? Answer these 4 questions and it will be much easier to help. Edited by MrAutomation

Share this post


Link to post
Share on other sites
the carriage is moved by electric motor, and I want to monitor its position to know when the car loses its position. I don't use encoder for this application, I use laser sensor and I wanna know when the carriage lost his position because of an interruption in the laser beam or a sudden change in accounts analog signal. someone had recommended me to program a logic that monitors the position of the carriage every so often (perhaps every two seconds) and when it detects that there was a change in position from the previous scan, then generate the error bit in the laser. Go storing the position from time to time and compare it with the previous, could be something ?, but I have doubts of how to implement it

Share this post


Link to post
Share on other sites
Oh I understand. It takes a sample of the current position, and later it takes a sample of the position again. If the error is too great in either direction, flag an alarm. What's not working with it? It actually seems like it should work, now that I understand what it is. The one question I have is the "%s6" tag. I don't know if that would work. What PLC is this? Try replacing that with a real timer. Edit: Also, change the scan order of your blocks. Right now it's all out of order, and that could be causing the problem. The numbers at the top left of each block should go from 1 to 6, reading left to right, then down to the next row, like a book. This way the blocks will be executed in the order that makes logical sense according to the program. Sometimes the scan order doesn't really make a difference, but sometimes it makes a big difference. Edited by MrAutomation

Share this post


Link to post
Share on other sites
This is a schneider plc written in Unity Pro The numbers of the block doesnt make a difference at all. Your code looks fine....I think the problem is with using the enable pins on the blocks. I would let the subract abs and gt blocks calculate on every scan so take out the enable pins. Use the %s6 on your move block's enable pins . I would use the same %s6 bit to trigger that and again the last move aswell. Use not alarm and %s6 to trigger the move for the last block Edited by cHud

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0