S7-1217C Differential Input Wiring for Dry Contacts

David Krause12 min read
S7-1200SiemensTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Overview

The SIMATIC S7-1200 CPU 1217C integrates 14 digital inputs, of which the eight "b" channels (DI 0.0b through DI 0.7b, DI 1.0b through DI 1.3b) are wired as differential receivers for high-speed counting, frequency measurement, and pulse-train feedback. Although the official SIMATIC S7-1200 manual collection documents these terminals primarily for 24 V DC differential encoder operation, the built-in bias network and integrated termination resistors allow them to be driven from a single-ended dry contact (potential-free contact) source. This reference explains the internal circuit topology of the 1217C differential input, derives the bias-network equations that govern dry-contact operation, and provides a step-by-step wiring procedure, TIA Portal configuration, and field verification protocol.

Safety notice: De-energize the 24 V DC supply to the S7-1200 and isolate any encoder or pulse source before re-wiring the terminal block. Observe ESD precautions when handling the CPU. Verify all wiring against the cabinet drawing and the SIMATIC S7-1200 System Manual before re-applying power.

CPU 1217C Digital Input Architecture

The 1217C ships with the following on-board I/O inventory:

Channel Type Quantity Design Use
DI 0.0a – DI 0.7a Standard 24 V sink/source input 8 Boolean logic, alarms, push-buttons
DI 0.0b – DI 0.7b Differential input (paired with "a") 8 HSC up to 200 kHz, motion control, pulse train
DI 1.0a – DI 1.3a Standard 24 V input 4 Boolean logic
DI 1.0b – DI 1.3b Differential input (paired with "a") 4 HSC, motion control, pulse train

The "b" inputs are the differential complement of the corresponding "a" terminal. The differential receiver inside the CPU measures VDI+ − VDI− rather than the absolute voltage on a single terminal, which rejects common-mode noise picked up along long encoder cables and provides the bandwidth required for HSC inputs up to 200 kHz.

According to the SIMATIC S7-1200 manual collection entry CPU 1217C Differential Input (DI) detail and application example, each differential DI is biased "OFF" when terminal block screws are open-circuit, and the channel has built-in DI termination. This is the foundation that allows dry-contact operation: the input is not left floating when the contact opens, but is held in a defined OFF state by the internal network, so no external resistor is strictly required.

The corresponding output-side reference, CPU 1217C Differential Output (DQ) detail and application example, mirrors the input-side guidance and includes the differential input wiring guidelines that this article expands upon.

Internal Bias Network Analysis

The internal equivalent circuit of one differential input pair on the 1217C is shown below.

DI+ DI- 220 220 DIFF RX CPU 5V Internal 5V bias

Components identified from the SIMATIC S7-1200 System Manual and the CPU 1217C application example:

  • 220 Ω input impedance per terminal, referenced to the internal 5 V bias rail
  • Differential receiver with a minimum sensitivity of 0.2 V (Vdiff,min)
  • Internal 5 V rail that supplies the bias current; this rail is not bonded to any external terminal

When the terminal block is open (no external connection), the divider formed by the two 220 Ω resistors and the 5 V reference drives the receiver to a default differential voltage. The common-mode voltage at the divider mid-point is approximately:

VCM,open = 5 V × (R− / (R+ + R−)) ≈ 1.1 V

and the differential offset (VDI+ − VDI−) is in the range of 0.5 V to 1.1 V, depending on resistor tolerances specified by Siemens. With the 0.2 V receiver sensitivity, the input latches to a known OFF state well within the noise margin.

The source current through the bias network is:

Ibias = Vref / (R+ + R−) = 5 V / 440 Ω ≈ 11.4 mA total, ≈ 6.5 mA per terminal

When a dry contact closes between DI+ and DI−, the contact shorts the two terminals. The differential voltage collapses to 0 V. The receiver then sees a transition that the TIA Portal HSC or DI logic interprets as either ON or OFF, depending on the configured polarity. Because the dry contact does not need to source or sink current into the 24 V logic supply, no external resistor is required.

Dry-Contact Wiring Topologies

Three practical wiring configurations exist for driving a 1217C differential input from a dry contact. Each is evaluated below.

Topology A: Dry contact between DI+ and DI− (recommended for HSC)

DI+ DI- Dry 1217C DIFF Topology A

Connect the dry contact directly between the DI+ and DI− terminals of the chosen channel. The internal 220 Ω bias network provides the source voltage and current limiting. The CPU 1217C application example in the SIMATIC S7-1200 manual collection explicitly lists this as a supported wiring pattern.

  • Pros: No external components; matches encoder-replacement scenarios; uses the differential input as designed.
  • Cons: Open-circuit bias sits at 0.5 V to 1.1 V differential, closer to the 0.2 V threshold than the standard 24 V OFF margin. Adequate input filtering (≥ 3 ms) is required for mechanical contacts.

Topology B: Dry contact between DI+ and 2M

DI+ 2M Dry CPU Topology B

Leave the DI− terminal floating (or unused). Wire the dry contact from the DI+ input to the 2M (24 V common) terminal. The standard 24 V single-ended input path is used, and the differential "b" terminal is left open. Siemens permits using the "a" channel of a differential pair as a normal 24 V input.

  • Pros: Standard 15 V / 5 V thresholds, maximum noise margin in industrial cabinets.
  • Cons: Only half of the differential pair is used; HSC bandwidth is reduced to the standard DI limit (typically 100 kHz, depending on filter setting).

Topology C: Dry contact between DI+ and 24 V sensor supply

Wire the dry contact between the DI+ input and the 24 V sensor supply (terminal L+ or the sensor supply output). The DI− terminal is left unconnected. An external pull-down resistor (typically 4.7 kΩ to M) is required to define the OFF state when the contact opens.

  • Pros: Mirrors sourcing-sensor convention used elsewhere in the cabinet.
  • Cons: Requires an external resistor; floating DI− is a noise pickup risk; not recommended for HSC channels.

Wiring Procedure

  1. Power down the S7-1200 and remove the 24 V DC supply from the CPU power terminals (L+ / M). Lock and tag the disconnect.
  2. Identify the differential input pair you want to use. On the 1217C the differential inputs share a common "b" suffix: Ia.0 / Ib.0, Ia.1 / Ib.1, and so on. The wiring diagram for the 1217C is in the SIMATIC S7-1200 System Manual, chapter "Wiring".
  3. Loosen the terminal screws for the chosen DI+ and DI− terminals using a 3 mm flat-blade screwdriver.
  4. Strip 8 mm of insulation from the dry contact wires. Use ferrules (DIN 46228) where vibration or thermal cycling is a concern.
  5. Insert one wire of the dry contact into DI+ and the other wire into DI−. Tighten each screw to 0.5 N·m (4.4 lbf·in).
  6. If the dry contact shares a common return with other 24 V loads, route the wire pair in a shielded cable and bond the shield to the cabinet PE at the entry, not at the PLC end. This avoids ground loops through the shield.
  7. Re-apply 24 V DC and verify the input state in the TIA Portal online watch table or on the CPU's DI status LEDs.

TIA Portal Configuration

The differential inputs are configured through the device configuration of the CPU 1217C in the TIA Portal project tree (tested with TIA Portal V17 and V18; later versions follow the same path).

  1. In the project tree, expand Devices & Networks and select the CPU 1217C.
  2. Open Device view and click on the DI channel to access its properties.
  3. In the properties pane, set the Input filter to a value appropriate for the mechanical contact. Start at 3 ms for general-purpose limit switches, 10 ms for slow pressure switches, and 0.1 ms for solid-state dry contacts (e.g., reed relays with no bounce).
  4. If the input is used as a high-speed counter, navigate to Technology objects > High_Speed_Counter, create a new HSC instance, and assign the channel. Set the counting mode to "Count once" or "Count continuously" as required by the application.
  5. For motion control pulse inputs, open the Axis technology object and assign the DI to the encoder or homing input. The drive-side configuration (e.g., SINAMICS V90) is documented separately in the SIMATIC S7-1200 Motion Control function manual.
  6. Compile the project and download to the CPU. After download, go online and force a refresh to verify the channel mapping.

Verification

After wiring and configuration, perform the following checks before commissioning the line.

  1. Open-circuit test: With the dry contact open, monitor the input in the watch table. The bit must read 0 (OFF). If the bit reads 1, the wiring is reversed or the contact is shorted.
  2. Closed-circuit test: Close the dry contact manually (actuate the limit switch, energize the relay coil, etc.). The bit must read 1 (ON) within the configured input filter time plus one PLC scan.
  3. Bounce test: Cycle the contact ten times in one second. The input must change state cleanly, with no extra transitions logged in the HSC diagnostic buffer. If chatter is observed, increase the input filter to 10 ms or 20 ms.
  4. Voltage verification: With an isolated oscilloscope or DMM, measure VDI+ − VDI− in both states. Open: 0.5 V to 1.1 V differential. Closed: 0 V to 0.05 V differential.
  5. Common-mode check: Apply 24 V to both DI+ and DI− simultaneously (e.g., by shorting both terminals to L+). The input must remain OFF and no diagnostic event must be raised. This confirms the receiver is differential, not single-ended.
  6. Wire-break diagnostic: If Topology A is used, briefly disconnect one wire of the dry contact and observe whether the CPU raises a wire-break diagnostic. The 1217C HSC supports wire-break detection on incremental encoder channels; the dry-contact wiring may or may not be recognized as a "wire break" depending on the configured threshold.

Common Misconceptions

RS-422 is a balanced differential standard with a nominal 5 V swing, a 100 Ω termination, and 5 V TTL-compatible thresholds. The 1217C differential input is not RS-422 compliant. The CPU's differential inputs operate at 24 V nominal with a 220 Ω input impedance, designed for industrial encoders and 24 V pulse sources. Connecting true RS-422 drivers is not officially supported and may require an external level shifter such as a 5 V to 24 V differential translator.

Likewise, the inputs are not "differential TTL" in the 5 V signaling sense. The 5 V reference mentioned in the internal circuit is a bias for the receiver, not a logic supply for the field device. The receiver thresholds are derived from the 24 V logic supply rails, scaled to the 0.2 V differential sensitivity.

A further misconception is that the dry-contact source impedance must be low. The internal 220 Ω bias network is designed to absorb the contact resistance of typical mechanical switches (≤ 100 mΩ for new contacts) as well as the on-resistance of typical reed relays (≤ 500 mΩ). No special low-resistance contact is required.

Troubleshooting Matrix

Symptom Probable Cause Corrective Action
Input stuck ON Dry contact welded closed, or external short between DI+ and 24 V Replace contact; check wiring for shorts
Input stuck OFF Open contact, missing wire, or wrong pair assigned in TIA Portal Verify wiring; re-check channel assignment in HSC config
Input chatters Insufficient input filter for contact bounce Increase input filter to 3 ms or 10 ms
HSC counts extra pulses Long cable picking up noise, or missing shield ground Use shielded cable, bond shield at cabinet entry
Diagnostic event "Wire break" Topology A leaves one terminal truly floating, exceeding the diagnostic threshold Use Topology B (dry contact to 2M) for wire-break diagnostics
Input ON when contact is open 2M terminal bonded to PE, lifting the input common above the receiver threshold Verify 2M is at 0 V relative to PE; check cabinet bonding
Input OFF when contact is closed Contact wired to wrong polarity (DI− instead of DI+) Swap the two contact wires
LED on CPU lit, but PLC bit reads 0 Channel configured as HSC or PTO, not as a Boolean DI Check the channel assignment in the Technology objects tree
CPU diagnostic buffer lists "Encoder error" HSC expects A/B quadrature or pulse+direction; dry contact is single-channel Change HSC mode to "Single pulse" or rewire to provide a complementary signal

Field-Commissioning Checklist

Step Action Acceptance
1 Confirm 24 V DC at CPU power terminals L+ and M 24.0 V ± 10 %
2 Confirm dry contact wiring matches Topology A or B Torque 0.5 N·m on terminal screws
3 Confirm input filter in TIA Portal ≥ 3 ms for mechanical contacts
4 Watch table read at open contact Bit = 0
5 Watch table read at closed contact Bit = 1
6 10-cycle bounce test No extra transitions in HSC buffer
7 Shield termination at cabinet PE Shield bonded, not floating

FAQ

Can the S7-1217C differential inputs be used as single-ended dry contact inputs?

Yes. According to the SIMATIC S7-1200 manual collection, each differential DI on the 1217C is biased OFF when the terminal block is open-circuit and has built-in DI termination. A dry contact wired between DI+ and DI− is recognized by the PLC and is documented as a supported application example.

What current flows through the dry contact when it closes?

The internal 220 Ω bias network sources approximately 6.5 mA per terminal (≈ 11.4 mA total across the pair) from the internal 5 V bias rail. The 1217C manual collection confirms the rail is rated for this level continuously across all eight differential pairs, so no external current limiting is required.

Do I need an external pull-up or pull-down resistor?

For Topology A (dry contact between DI+ and DI−) and Topology B (dry contact between DI+ and 2M), no external resistor is required. For Topology C, an external 4.7 kΩ pull-down to M is required to define the OFF state when the contact opens.

Can I leave the 2M terminal untouched when wiring a dry contact?

Yes. The internal bias network is referenced to the internal 5 V rail, not to 2M, so leaving 2M unconnected does not affect the dry contact operation. The 2M terminal is the 24 V common for the standard digital inputs and is not part of the differential bias network.

What is the minimum differential voltage the 1217C will detect?

The differential receiver has a 0.2 V minimum sensitivity, well below the 1.1 V open-circuit bias and the 0 V closed-circuit state. This wide sensitivity window is what makes the input tolerant of dry-contact use despite the 24 V nominal rating of the channel.

Is the S7-1217C differential input RS-422 compatible?

No. The 1217C differential input is not RS-422 compliant. It operates at 24 V nominal with a 220 Ω input impedance. For RS-422 encoders, an external 5 V to 24 V differential level translator is required. See the SIMATIC S7-1200 manual collection, chapter on encoder interfacing, for the supported encoder families.

Back to blog