The photoelectric encoder is a kind of encoder that uses high-precision metrology grating as the detection element to convert the input angular position information into corresponding digital signals through the photo-electric conversion device. It has the advantages of high resolution and wide measuring range, so it is widely used in precision angle measuring devices and high-precision speed regulating systems. In this study, an incremental photoelectric encoder is used, and a receiving system of vertical incidence is chosen, covering a photocell receiving circuit and an infrared circuit. The signal acquisition device of the photoelectric encoder is further designed, that is, the weak photoelectric signal is captured and transformed into an electrical signal that can be recognized by the microprocessor after amplification and adjustment, and then the signal is processed and transmitted. In the test, the signal output of the photoelectric encoder is simulated first. The results reveal that the theoretical output voltage of the drive is 3.5 V, and the peak of the actual output signal is 7.2 V, which meets the design requirements. The designed photoelectric encoder signal device is used with the charge coupled device (CCD) camera to capture the track image. The single-camera and dual-camera tests are carried out respectively. The speed of the bearing vehicle is adjusted to 0.6 m/s~1.2 m/s, and the velocity of the vehicle is adjusted timely. The findings show that the signal device of the photoelectric encoder +CCD camera can be triggered in real-time with the different speeds of the vehicle, and obtain relatively clear images of the track surface and its image of the fastener.