|
SSI Protocol Description:
SSI is a synchronous serial signal, consisting of two pairs of RS422, one pair triggered by clock and one pair for data transmission.
As shown in the figure on the right, the absolute position value of the encoder is triggered by the clock signal of the receiving device, starting from the high bit (MSB) of the Gray code, and outputting a serial signal synchronized with the clock signal. The clock signal is sent from the receiving device and outputs N interrupt pulses based on the total number of bits of the encoder. When the signal is not transmitted, both the clock and data bits are high bits. At the first falling edge of the clock signal, the current value begins to be stored. From the rising edge of the clock signal, the data signal begins to be transmitted, and one clock pulse synchronizes one bit of data.
Among them, t3 is the recovery signal, waiting for the next transmission; N=13; 16;25; 28. According to the total number of bits in the encoder. T=4—11us; t1=1—5.5us; t2≤1us; T3=11-15.5 us (Clock - and Date - not shown).
In practical use, to ensure signal stability and a longer transmission distance, the recommended parameters are as follows:
T=8us(125KHz); t1=4us; T2 '(actual reading delay time)=3~4us; t3=15us
|
data processing:
The encoder outputs a Gray cycle code, which is first decoded into binary code starting from the high-order bits using XOR after reception. Due to the fact that Gray code is a cyclic code, it cycles through the maximum value code to 0, which means there is a sudden change between the maximum value and 0. Therefore, to avoid sudden data changes in the working process, it is recommended to use the middle position of the encoder data value as the starting position of the work. After the encoder is installed, rotate it to the actual starting point, and make the MIDP line of the encoder cable core positively short circuited with the power supply. The current signal output is the median of the encoder's total bit output value, and the MIDP line returns to power supply 0. After converting the current measurement value received into binary code in the future, the following steps should be taken:
Actual position value=(C-MidP) × Dir+starting point value
In the above equation, C is the current measurement value output by the encoder; MidP is the middle position value, which is 2n-14096 for 13 bits and 32768 for 16 bits; 25 bits are 2048x8192, and 28 bits are 2048x65536. Dir is the rotation direction coefficient of the encoder, which is 1 when it is the same as the calculation direction and -1 when it is opposite to the calculation direction. It can also be changed by connecting the high and low levels through the DIR line on the encoder.
The starting point is not zero, and the calibration position can be determined by the user. Since the multi turn encoder can have 4096 consecutive measurements, starting from the starting point, both forward and reverse can have 2048 consecutive working strokes.
|