Determine what types of photoelectric sensors are being used in the application. Is there a separate sender (transmitter) and receiver arranged in a through-beam configuration so that they are looking at one another? Is it a single photoelectric device using a reflector or bouncing a beam off the objects to be detected? Look for a part number and manufacturer name on the device. Try to find data sheets for the device on the company's website. Having the data sheets will reduce much of the guesswork involved in troubleshooting.
Determine the problem. Are the photo eyes registering an output with no object present? Are they ignoring objects that they should be detecting? Does the problem happen at a certain time of day? Are there environmental influences acting upon the photo eyes? If the photo eyes register an output when no object is present, first check the face of the eyes to be sure they are clean. If they are dirty, use a soft cloth and a non-abrasive, non-corrosive cleaner to wipe them clean. If the photoelectric system incorporates a reflector, be sure to clean it thoroughly too. Test the photo eyes now to see if they work.
If problems persist, try aligning the photo eyes. Using a length of string or wire have one person hold the line beside one photo eye and take your end across to the other. Pull the line tight so that it passes in parallel beside each eye, forming a straight line. It should be obvious that the photo eyes are out-of-alignment if one eye is parallel to the string and the other is not. Adjust both photo eyes as close as you can. Once they are pretty straight, make fine tuning adjustments to the sender eye only. If the sender photo eye is projecting a beam off to the side, then adjusting the receiver photo eye is worthless. This "string method" can also be used with an eye / reflector combo.
If the photoelectric system still is not functioning, check the data sheets for the sensors to determine what supply voltage is necessary to operate the eyes. Set your multi meter to the correct setting AC or DC and verify that enough power is present to operate the photo eyes. If the photo eyes use a visible beam, verify that you can see the beam coming from the sender. If the photo eyes use infrared light, it is possible to use a video camera equipped with the nighttime filming option (often referred to as "Night Shot") to see the beam projected from the infrared sender. Is the receiver photo eye positioned in direct sunlight? The light from the sun can have adverse affects o photoelectric systems. It is OK to mount the sender (transmitter) in direct sunlight as long as the receiver is shielded from it. Is the photoelectric system properly grounded? Be sure to use earth ground or at least a machine ground. Don't ground your photo eyes to a small screw or tiny DIN rail and think that will suffice.
If the photo eyes do not generate random signals, but instead ignore the objects that they are supposed to detect, then the problem is, more than likely, that the beam of light is not actually being broken. If there is a gain adjustment available on the photo eyes, adjust it to a lower setting. If this doesn't work, try positioning the photo eyes so that the object-to-be-detected passes closer to the receiver eye. If this is not possible, try narrowing the beam of light projected from the sender (transmitter) and/or narrow the field of view of the receiver. Both may be accomplished using a short, narrow piece of PVC pipe.
Check your splices. If the wires of the photo eyes have ever been spliced, check the splices and verify that they are clean. Don't just wrap them together and wind electric tape around the splice. Solder the connection and use a heat shrink tube to seal the connection. If all else fails, try calling the manufacturer of the photoelectric sensors or a distributor of the products and ask for troubleshooting assistance.
Infrared photoelectric sensors for harsh environment applications
Test amplifier with automatic diagnostic tool for testing photoeyes
Technical support webpage for Pantron infrared photoelectric sensors