i have a 6 pin optical slot sensor/optical encoder, which does not have a part # on it. I need a way to determine what each pin is. I will award the answer to the first answer that accurately explains the process of determining the function of each pin. thanks!
I am assuming you have no markings to be able to obtain a spec-sheet for the device. If you do this is a non-starter.
If not, you need to look at it mechanically first.
One side will likely be an LED the other with have either two photo-diodes or photo-transistors.
Once you identify the LED side you can attach the other side pins through a resistor in combinations and polarities or all pairs to a low voltage supply and see what happens when you turn the LED on and off.
Chart out that information and you should be able to identify the "truth-table" of the device.
If you can't identify the LED, repeat the last step for all pins. That is apply low power through 2 (say 5ma), measure the others, reverse, try the next two.. etc.