logic for monitoring the change of position of a carriage

dingomex3

Member
Join Date
Mar 2012
Location
mexico
Posts
33
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. the carriage has 15 positions.

logic_car.jpg
 
what would cause the laser beam to be interrupted? Are you wanting something that tells when the laser is interrupted or something that tells where the carriage is located?
 
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.
 
...because of an interruption in the laser beam or a sudden change in accounts analog signal.
Usually this type of error-finding means you need to use some timers, and decide for HOW LONG the interruption has to be before action is taken, and for HOW LONG a sudden change is.
 
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.

Thanks
 
Yes, you could check for a change every scan of the PLC. That would most likely be in the 10 to 20 miliseconds range.

You could activate this logic all the time, but it seems it would be most useful when the carriage is supposed to be stationary.
 
Normally, a change in value is detected by saving the value (or carriage Current Position in your case) on every scan to a memory location called something like "Old Position".

Then on the next scan you compare the value of the saved Old Position with the read-in Current Position. If different (or greater, or less, or the difference is greater than some "X" value), then you take some action, then as the last step, again save the Current Position to the Old Position.

You may not want to do the above steps on every scan. You could do them every 2 seconds, or something like that, whatever makes sense for the process.

The details will depend on which brand of PLC, and which version of software you are using.
 
Last edited:

Similar Topics

I have programmed a Zelio logic to monitor 3 inputs, and coresponding 3 outputs for controling of 3 pumps. How to pause/resume timers for pumps ...
Replies
13
Views
4,381
need help on MicroLogic 1500 online monitoring, what is the best way to connect a PC to micro logic 1500 PLC. what kind of cable is needed?
Replies
2
Views
2,765
Hello, I´m having a problem trying to program in Ladder. An output should be trigged by two possible contacts. Take a look on the printscreen...
Replies
5
Views
149
I got my PanelView Plus 7 working with a Micrologix 1500. How would I connect my laptop to the PanelView to view the ladder logic while operating...
Replies
6
Views
174
Hello, I am trying to replicate a piece of logic on the PLC5 onto an SEL RTAC. I am using ladder on SEL and FBD. I am having issue on the ladder...
Replies
13
Views
251
Back
Top Bottom