Grating used in conjunction with the PLC

http://www.ymmfa.com/read-gktid-1644629.html
It was suggested at the forum to see the scale problem and how supporting the use of PLC. I used the combined scale of experience, wrote this article. Hoping to provide a useful reference.
 
First, the structure and working principle
    The scale grating has a grating (scale body) and a reading head of two parts. Foot moving member mounted on the body, reading head mounted on the fixing member. It was also the reading head mounted on a movable member (for the case of foot body moves inconvenient), measured effect is the same, is not the same signal line moving inconvenient.
Foot moving body is one pair of main grating grating (scale grating) and the sub-gratings (index grating) for relative displacement, generates black and white (or light and dark) under the action of light diffraction and interference rules fringes (moire fringes ). After the photovoltaic device so that black and white (or intensity) of the same sinusoidal variation fringes into an electric signal, and then, after amplification and shaping circuit, to obtain a phase difference of two 90 -degree sine wave or square wave signals A and B . Number of cycles of a sine wave or square wave with a distance proportional to the movement. When the ruler body is moved forward, A signal leads the B signal by 90 degrees, when the ruler body is moved backward, A signal lags the B signal by 90 degrees. Some encoders also output a signal Z (return to zero signal).
 
Second, the pitch and resolution
    Equidistant dense lined, utilizing the phenomenon of light transmission grating is formed, it is referred to as the pitch lined pitch. In pitch 20um (50 lines / mm) as an example, assuming no other measures, each foot body is moved 20um, reading head outputs a periodic signal, the output periodic signal 10 indicating the movement of 200um. The smaller the pitch, the higher the measurement accuracy, the higher the cost. In the case of maintaining a constant pitch, the periodic signal outputted four times segmentation process, then each moved 20um, signal outputs four cycles, each cycle signal indicates movement 5um. Manufacturers will call this grating resolution is 5um, but this does not mean 5um pitch is 5um. If the moving distance of the foot member is less than 20um, no matter how much subdivision process, the result is the output signal 0 cycles.
 
Third, the power supply and the output signal
    Common DC 5V and 24V two power supply. In order to facilitate and supporting the use of PLC, the best choice for 24V power supply.
    Most of the output signal of the grating is a square wave signal, there are two common: one is a TTL level signal, the other is the RS422 differential signal. Some manufacturers also build an open collector output signal (NPN and PNP, two). For the PLC, it is not all signals are applicable. PLC main unit and the high-speed counter modules (e.g. FX2N-1HC, FX3U-2HC, FX3U-4HSX-ADP CC-Link and counting module AJ65BT-D62, etc.) may directly receive open-collector output signals, open collector output Plainly It is an electronic switch. High indicates that the switch is turned on, a low level indicates the switch is turned off. It may be a direct current. Connecting method indistinguishable open collector outputs of the rotary encoder. The difference between the NPN and PNP type: when the switch is turned on, the NPN type current direction is emitted from the collector to the electrode. PNP type current direction is from the emitter to the collector electrode.
    TTL signal output level can be used for microcontroller or DSP, but can not be used directly in the PLC. We need to add a DC electronic switch module (Taobao sale), converting the TTL level signals to an open collector output signal. For low-speed movement member, almost no impact. But for high-speed moving parts that may cause signal delays, and even the loss of a periodic signal.
    RS422 characteristics of the differential signal, the output of A, A inverted, B, B 4 reversion signals. Some of Z and Z can output the inverted signal. This output may be utilized to offset the two inverted signal of external electromagnetic interference, especially for poor interference environment. PLC unit and the main part of high-speed counter modules (e.g. FX2N-1HC, AJ65BT-D62) not directly receive RS422 signals, one differential signaling requires open collector output module (Taobao sale), the open collector output differential signal transduction signal. This way problems caused by conversion receiver, the TTL level signal received is the same. Some high-speed counter modules (FX3U-2HC, AJ65BT-D62D , AJ65BT-D62-S1 , etc.) capable of receiving a direct RS422 differential signal.
    PLC main unit has an input port and an external high-speed counting speed counter, can be used to scale signal processing. This is not to say that there is no high-speed counter module to use it? the answer is negative. PLC unit processes the main signal frequency is better high-speed counter module. FX2N series single-phase signal is received the highest 60KHz, receiving a two-phase signals highest 30KHz. If special compare instruction, single phase up to 10KHz, 2-phase signals highest 5KHz. FX3U series single-phase signal is received the highest 100KHz, two-phase signal is received the highest 50KHz. If you use a special command, will not exceed the maximum 60KHz. Many high-speed counter modules that can handle the maximum single-phase signal 200KHz, 2-phase signal maximum 100KHz. This is almost double the main unit.
    We can calculate to Case FX3U main unit, the received two-phase signals (in many cases because the phase difference is determined according to the moving direction component), without using a dedicated instruction (programming more difficult), the maximum response frequency is 50KHz, showing 50,000 may be received pulse signals per second, assuming the grating pitch to 20um, and a moving pitch, a pulse output. So 50000 × 20um = 1000mm. That is, the moving member can not exceed the speed of 1000mm / s. If the resolution of the grating is used 5um, 20um move every four pulses is output, moving member speed can not exceed 250mm / s. To use private instruction, have further reduced moving speed. The above analysis calculations are performed in the reference state. In practice, consider the master PLC unit processes the high frequency signal distortion, loss in volume, in response to the implementation of the program loop delay caused. Further, in the industrial environment, preferably using RS422 differential signal to ensure that the anti-jamming capability. The PLC main unit is not directly receive RS422 differential signal.

Guess you like

Origin www.cnblogs.com/BMYC/p/10935074.html