The SSI Synchronous Serial Interface: Timing and Gray Code Conversion
SSI (Synchronous Serial Interface) is a point-to-point, host-clocked, unidirectional digital interface: the host issues a clock burst and the sensor shifts out the absolute position value bit by bit on the clock edges. There is no station address, no protocol stack and no network configuration; with the wiring correct and the clock frequency and data-bit count set correctly, the reading appears at once. The cost is that one sensor occupies one interface and cannot be shared like a fieldbus. The two items that must be matched on SSI are data-bit count and encoding format (Gray code or binary); get them wrong and the reading is completely scrambled. Series 16 SSI is 162; Series 19 is 192 — the electrical figures are the same set. This article covers 192 SSI; contrast: 162 vs 192.
SSI timing: who issues the clock, and when the data is valid
SSI uses two differential pairs (usually RS-422 levels): the clock pair from host to sensor, and the data pair from sensor back to host. A complete read proceeds as follows:
- In the idle state the clock line is held high and the sensor continuously updates its internal position value.
- The host issues the first falling clock edge and the sensor latches the current position — that instant determines the sample moment to which the reading corresponds.
- Each subsequent clock edge shifts out one bit, starting from the most significant bit (MSB).
- After the clock burst ends, a silent interval must be held (the monoflop interval); the sensor uses this to judge that the transfer has finished and returns to idle, after which it can accept the next read.
Three engineering points follow. First, latching occurs at the start of the clock burst, so the reading corresponds to "the instant the read was initiated", not the instant the clock burst ended — a difference that cannot be ignored in high-speed motion. Second, enough silent time must be left between two reads; squeezing it too tight will prevent the sensor from resetting and it will return abnormal data. Third, clock frequency is inversely related to cable length: the longer the cable the lower the usable clock frequency, and forcing a high clock over a long distance will produce random bit errors.
Cable length vs baud (same for 162 and 192)
| Cable length | Max data rate |
|---|---|
| < 3 m | 1000 kBd |
| < 50 m | 400 kBd |
| < 100 m | 300 kBd |
| < 200 m | 200 kBd |
| < 400 m | 100 kBd |
Minimum clock spacing 48 μs. 162 and 192 share this table; see 162 SSI vs 192 SSI.
Gray code and binary: why Gray code is used
The property of Gray code is that only one bit changes between two adjacent values. This is critical in parallel reads or asynchronous sampling: with ordinary binary, crossing from one number to the next may flip several bits at once, and the bit-flip instants cannot be absolutely simultaneous; a sample that lands exactly on the transition will read an intermediate state that is neither the previous nor the next value, appearing as a large instantaneous jump in position. Gray code reduces this risk to a minimum — the worst case is an error of one least increment.
| Dimension | Gray code | Binary |
|---|---|---|
| Bits changing between adjacent values | Always 1 bit | Several bits may flip at once |
| Transient sampling risk | Worst case: 1 increment wrong | A large erroneous intermediate state may be read |
| Can it be used directly in arithmetic? | No; convert to binary first | Yes |
| Host-side work | Conversion logic must be implemented | None |
| Typical use | High-speed motion; closed loops sensitive to jumps | Host cannot conveniently convert; lower speed |
The standard algorithm for Gray-to-binary conversion: the most significant bit is copied directly (Bn-1 = Gn-1); the remaining bits recurse from high to low, each bit being the XOR of "the binary result of the bit above" and "this Gray bit" (Bi = Bi+1 ⊕ Gi). Most PLCs have a ready-made Gray-code conversion instruction; if not, a loop of XOR from MSB to LSB implements it, and the logic is short.
A critical reminder: the encoding format set on the host must match the sensor's factory configuration. Gray-code data parsed as binary will produce an irregular jumping reading that still "looks as if it is changing", which is easily misdiagnosed as interference when it is only the wrong decode.
Correspondence of data-bit count and measuring range
The SSI data-bit count determines the representable position-count range. Bit count, resolution step and measuring range must be consistent: maximum representable displacement = 2bits × resolution step, and that value must cover the actual measuring range. The resolution step is chosen from 1 / 2 / 5 / 10 / 20 / 50 / 100 μm; the finer the step, the more bits are needed for the same measuring range.
The number of clocks issued by the host must match the sensor's data-bit count exactly: too few clocks and the low bits are not read, so the reading is coarse and stepped; too many clocks and the surplus bits are padding or error-flag bits, usually appearing as a periodic numerical anomaly. These are the two most common SSI commissioning errors. For the relationship between resolution and accuracy figures see The Three Accuracy Terms of Magnetostrictive Sensors: Resolution, Repeatability and Non-Linearity.
How SSI sits relative to other interfaces
SSI outputs absolute position, so power-loss restart needs no homing — the same as fieldbus types; for the mechanism see Absolute vs. Incremental Position. The fundamental difference from a fieldbus is networking: SSI is point-to-point, each sensor occupying one SSI interface on the host; a fieldbus can share a pair of wires among many nodes and brings diagnostics and parameter configuration.
The selection judgement is therefore clear: few axes, a ready-made SSI module on the host, and the simplest possible communication link → SSI; many axes, and a need for diagnostics and remote configuration → fieldbus. For the full decision path across interface families see Analog vs. Digital Across the Whole Range; for a cross-protocol comparison see Comparing the Whole Fieldbus Range; for a pulse-interface counterpart see The Start-Stop Interface: How Pulse-Based Position Reading Works.
Note also: SSI uses RS-422 differential transmission, so both signal pairs must be twisted-pair shielded cable, with the shield earthed to specification. Unlike CAN/Profibus, SSI is a point-to-point link; matching requirements follow the host and sensor manuals and cannot simply reuse bus terminating-resistor rules. For the difference between the two physical layers see Terminating Resistors and Bus Length: Why It Has to Be 120 Ω. For product parameters and pin-outs see Series 192 SSI Digital Interface Explained.
Frequently Asked Questions
Q: Why does SSI commonly use Gray code rather than binary?
Only one bit changes between two adjacent Gray-code values. Binary may flip several bits at once when crossing a value, and the bit-flip instants cannot be absolutely simultaneous; a sample that lands exactly on the transition will read an intermediate state that is neither the previous nor the next value, causing a large position jump. With Gray code the worst case is an error of one least increment.
Q: How is Gray code converted to binary?
The most significant bit is copied directly; the remaining bits recurse from high to low: each binary bit is the XOR of the binary result of the bit above and this Gray bit. Most PLCs have a ready-made conversion instruction; if not, a loop of XOR from MSB to LSB implements it.
Q: Is an irregular jumping SSI reading interference?
Rule out the decode first. When Gray-code data is parsed as binary, the reading jumps irregularly but does still change, which is easily misdiagnosed as interference. The encoding format set on the host must match the sensor's factory configuration.
Q: What happens if the SSI clock count is wrong?
The clock count must match the sensor data-bit count exactly. Too few and the low bits are not read, so the reading is coarse and stepped; too many and the surplus bits are padding or flag bits, appearing as a periodic numerical anomaly. These are the two most common SSI commissioning errors.
Q: How should I choose between SSI and a fieldbus type?
SSI is point-to-point: each sensor occupies one host interface, the link is simplest and there is no configuration. A fieldbus can share the wire among many nodes and brings diagnostics and remote parameter configuration. Choose SSI when the axis count is small and the host has an SSI module; choose a fieldbus type when the axis count is large and diagnostic and configuration capability are needed.







