lou_dc
Member
Hello All. I have a question for the group. I am working on a vision system where parts are fed onto a turntable and pass under a camera where it is inspected and the camera outputs a pass/fall to my PLC which is a Micrologix 1000 32 I/O.. I want to use a LSR (Left Shift Right) instruction to keep track of the part and its "pass/fail" status. There is a eject station 90 degrees from the camera where I have a gate which senses the part going through and as they exit I blow off good parts... Problem is that in between the camera and the blow off there can be a varying amount of parts depending on the part spacing and turntable speed.. What is the best way to find out the MSB (most significant bit) of the LSR so I can keep track of how many parts are between my camera and blow off and remove only the MSB...I was thinking of using a bunch of compare functions ie IF B3:0/5 =1, If B3:0/4=1 etc... Is there a better way that anyone has uses. Thanks......
Lou...
Lou...