Hi!
I have this lab where I am given 4 parallell random size metal plates and I need to sort them according to size.
I am given in the beginning an inductive sensor, which I am going to use to detect and measure the length of each piece.
So I make a nice path that runs through the pieces and I write some code in a TRAP to record the point of one edge of the a metal piece when the sensor goes high and record the other position when the sensor goes low.
The plan is to subtract and find the length. It goes well for the first piece, but when the sensor goes to the next metal piece it just applies the position values of the first piece and so on for the rest of the pieces.
I suspect the problem lies with my TRAP routine and that I should use IDelete/IEnable/Iwatch or smth to deactivate the TRAP? Or can you suggest something that works?
Thanks in advance!