Selecting an S7-1200 for 90 Digital Inputs: CPU 1214 and SM 1221

David Krause22 min read
S7-1200SiemensTechnical Reference
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

System Overview and I/O Budget

The target installation aggregates status data from 30 distributed microcontrollers (µCs) into a single cabinet-mounted PLC for centralized visualization through a webserver. Each µC exposes three discrete signals, so the total discrete input count is 30 × 3 = 90 digital inputs. The cabinet sits approximately 100 m from the nearest µC, with a routed Ethernet internet connection present inside the cabinet. The PLC must (1) read the 90 inputs at a cycle rate that meets the supervisory requirement, (2) serve the live input state on standard HTTP/HTTPS, and (3) be addressable remotely for engineering or monitoring from outside the local network.

This reference walks through the full component selection, wiring, network, and commissioning process. It targets the SIMATIC S7-1200 platform, which provides onboard DI, signal module (SM) expansion, an integrated webserver, and a TIA Portal programming environment. All part numbers and firmware assumptions match the published Siemens catalog state (S7-1200 firmware V4.x, TIA Portal V13 SP1 minimum, V16 or V17 recommended for long-term support). Documentation is on the Siemens Industry Online Support portal and the S7-1200 product page.

Begin with the deterministic input count: N = 30 µCs × 3 signals/µC = 90 DI. Apply a 5–10% margin for spares, future expansion, and diagnostic re-purposing. The most cost-effective configuration that absorbs the 90 DI plus margin is the SIMATIC S7-1200 CPU 1214C (14 onboard 24 V DC DI) plus five SM 1221 modules (16 × 24 V DC DI each), giving 14 + (5 × 16) = 94 DI, four channels of headroom above the 90 required.

The CPU 1214C integrated DI count is 14 regardless of the relay/transistor output variant. The 24 V DC / 230 V AC selection in the field report refers to the CPU's supply voltage, not its input signal type — all S7-1200 onboard DI are 24 V DC sourcing per IEC 61131-2 Type 1.

CPU Selection: SIMATIC S7-1200 CPU 1214C

The CPU 1214C is the smallest S7-1200 that comfortably supports the required expansion while leaving program, webserver, and PROFINET resources available. The relevant catalog numbers and key specs:

Catalog Number Power Supply DI DQ AI Work Memory Load Memory Bit Memory
6ES7214-1AG40-0XB0 24 V DC 14 (24 V DC, sink/source) 10 (24 V DC, source) 2 (0–10 V) 100 kB 4 MB 4096 B
6ES7214-1BG40-0XB0 120/230 V AC 14 (24 V DC, sink/source) 10 (relay, 2 A) 2 (0–10 V) 100 kB 4 MB 4096 B
6ES7214-1HG40-0XB0 24 V DC 14 (24 V DC, sink/source) 10 (relay, 2 A) 2 (0–10 V) 100 kB 4 MB 4096 B

For a pure aggregation/visualization node the DC/DC/DC variant (6ES7214-1AG40-0XB0) is recommended. Its 24 V DC DI share the same 1M/2M common reference as the SM 1221 inputs, simplifying field wiring and avoiding ground-loop ambiguity. The relay variants are appropriate when the system also drives loads that need dry contacts. All variants support the integrated PROFINET interface (1 × RJ45, 10/100 Mbit/s), the integrated webserver (firmware V4.0 and later), and up to 8 SMs on the right-side expansion bus.

Each CPU 1214C accepts up to 8 signal modules, plus additional communication processors (CM 1241 for RS-232/485, CP 1243-1 for cellular) and a battery board (BB1297) for RTC backup. Five SM 1221 modules leave three expansion slots free for future SMs, an additional CM, or a second PROFINET port (CPU 1215C and higher provide 2 × PROFINET natively). See the SIMATIC S7-1200 product page for the published maximums and operating temperature limits: 0 °C to 55 °C horizontal mounting, 0 °C to 45 °C vertical mounting, 5–95% non-condensing humidity, 795 hPa to 1080 hPa pressure.

The CPU 1214C has a single PROFINET port. To connect the CPU to the cabinet router and a programming PC simultaneously, place a CSM 1277 4-port unmanaged switch (6GK7277-1AA10-0AA0) in the cabinet. The CSM 1277 supports 10/100 Mbit/s, auto-crossover, and operates from -20 °C to +70 °C, so it can sit in the same enclosure as the S7-1200.

Digital Input Expansion: SM 1221 Modules and Cabinet Footprint

The SM 1221 digital input modules are available in three point counts. For this application the 16-point, 24 V DC sink/source module is the right match:

Catalog Number Points Type Input Voltage "1" Threshold (V DC) "0" Threshold (V DC) Width
6ES7221-1BF32-0XB0 8 DI 24 V DC, IEC Type 1 24 V DC 15 V DC @ 2.5 mA 5 V DC @ 1 mA 45 mm
6ES7221-1BH32-0XB0 16 DI 24 V DC, IEC Type 1 24 V DC 15 V DC @ 2.5 mA 5 V DC @ 1 mA 70 mm
6ES7221-3AD30-0XB0 32 DI 24 V DC, IEC Type 1 24 V DC 15 V DC @ 2.5 mA 5 V DC @ 1 mA 140 mm

Five SM 1221 6ES7221-1BH32-0XB0 modules provide 5 × 16 = 80 DI, and the CPU 1214C provides 14 onboard DI, totaling 94 DI (4 spare channels). The 70 mm width per 16-point module gives a manageable cabinet footprint. SM 1221 modules install to the right of the CPU on the same DIN rail; the bus connector is pre-fitted and self-connects when the modules are clipped together.

The hardware width stack is:

Module Width Quantity Subtotal
CPU 1214C 110 mm 1 110 mm
SM 1221 DI 16 × 24 V DC 70 mm 5 350 mm
PM 1207 (24 V DC, 2.5 A) 60 mm 1 60 mm
CSM 1277 (4-port switch) 45 mm 1 45 mm
Total DIN rail length — 565 mm
IEC 61131-2:2017 defines Type 1 digital inputs with the 15 V DC "1" threshold and 5 V DC "0" threshold shown above. This is the recommended input type when sourcing from transistor outputs on PLCs, microcontrollers, or 24 V DC sensor signals. Confirm the µC output stage can source ≥ 2.5 mA at 15 V DC worst case; open-collector µC outputs require a pull-up to 24 V DC, sized to source 2.5 mA at the worst-case low-level voltage.

100 m Field Wiring Considerations

Wiring 30 µCs × 3 signals over 100 m has three constraints: voltage drop, capacitive loading, and electromagnetic susceptibility.

Voltage drop. For a 24 V DC input with a 15 V DC "1" threshold, the allowed round-trip drop is 24 V − 15 V = 9 V. With a typical 0.50 mm² (AWG 20) Cu conductor at 36 mΩ/m, the loop resistance is:

R = 2 × 100 m × 36 mΩ/m = 7.2 Ω
V_drop = I × R
V_drop (at 2.5 mA signal) = 2.5 mA × 7.2 Ω = 18 mV
V_drop (at 100 mA worst case, relay-driven source) = 100 mA × 7.2 Ω = 720 mV

Both values are well inside the 9 V margin. A 0.75 mm² (AWG 18) cable is the standard recommendation for 24 V DC signal runs of 50–150 m; it gives a loop resistance of 4.8 Ω at 100 m and provides mechanical robustness for outdoor or tray runs.

Capacitive loading. A 100 m run of standard 0.5 mm² signal cable has roughly 50–80 pF/m, giving 5–8 nF of cable capacitance. The SM 1221 input has a 2.2 kΩ input impedance with an internal RC filter of approximately 1.5 kΩ / 4.7 nF, so the cable adds a distributed low-pass in parallel. Signal edges from µC GPIO are typically 10–100 ns, so a 100 m cable adds 1–5 µs of delay and some edge rounding — acceptable for status signaling at the supervisory cycle rates typical here.

EMC. Run the 90 input conductors in a single multi-conductor cable (e.g., a 100-conductor, overall-shielded, LiYCY-type) with the shield grounded only at the cabinet end. Keep the 24 V DC input bundle at least 200 mm from any VFD output wiring, relay coil wiring, or unshielded 230 V AC conductors in the cabinet. For installations in close proximity to large VFDs or motors, place a 30 V TVS diode (e.g., P6KE36CA) at the SM terminal of each long run to clamp induced transients.

Cable routing. Use a single home-run cable from the cabinet to a junction box near the µC cluster, then a multi-conductor drop cable to each µC. This keeps the 100 m main run shielded and unbroken, and reduces the number of shield terminations. Land the shield at the cabinet-end 1M/2M ground bar using a 360° low-impedance clamp, not a pigtail.

Check the input filter time on the SM 1221: the default is 6.4 ms, suitable for mechanical contacts. If the µC outputs are short pulses, change the input filter to 0.8 ms or 0.2 ms in the device configuration of TIA Portal. See the S7-1200 system manual for the input filter selection table — typical available values are 0.2, 0.4, 0.8, 1.6, 3.2, 6.4, and 12.8 ms.

Webserver Configuration on the S7-1200

The S7-1200 webserver is a free, integrated function that ships with the firmware. It exposes the standard system pages (diagnostic buffer, module status, tag table, watch table) and supports user-defined pages written in HTML/JavaScript. The S7-1200 webserver listens on TCP/80 by default; on firmware V4.0 and later HTTPS (TCP/443) is supported and recommended for any internet-exposed deployment.

Setting Default Recommended for Internet Exposure
Port 80 (HTTP) 443 (HTTPS) with TLS 1.2 minimum
Authentication Off (system pages) / per-user User list, strong password, ≥ 12 characters
User-defined pages Enabled, no HTTPS required Enabled, served over HTTPS
Update interval 5 s 2–5 s depending on tag count
Access list None Restrict to known subnets where possible
Write access Off by default Disabled for the remote-access user

To enable HTTPS, generate or import a server certificate in the device configuration under "Webserver → Security". Self-signed certificates work for browser access; for permanent deployments, use a certificate from a public CA or an internal PKI, and load the CA chain into the engineering PC so that browsers trust the PLC.

User-defined pages are built in TIA Portal under "Webserver → User-defined pages" and transferred to the CPU by the "Load to device" function. The standard approach is to add a single HTML file in the project tree, reference input tags with the :="DB_name".TagName: substitution syntax, and load it to the CPU. A minimal example that displays the first three µC signals (I0.0, I0.1, I0.2) follows:

<!DOCTYPE html>
<html>
<head>
  <title>Cabinet Status</title>
  <meta charset="utf-8">
  <meta http-equiv="refresh" content="5">
</head>
<body>
  <h1>Aggregated µC Status</h1>
  <p>µC 01, Signal A: :="DB_Status".uC01_SigA:</p>
  <p>µC 01, Signal B: :="DB_Status".uC01_SigB:</p>
  <p>µC 01, Signal C: :="DB_Status".uC01_SigC:</p>
</body>
</html>

The :="DB_Status".uC01_SigA: syntax is replaced server-side by the CPU with the current boolean state and an automatic refresh timestamp. The CPU webserver supports up to 99 user-defined pages and 1 MB total HTML size on firmware V4.x. For 90 tags, use a single consolidated page rather than per-tag pages; the webserver refresh is single-threaded and scales with the number of referenced tags, not the page count.

To populate DB_Status, copy the IW input words into the DB in OB1. A representative ladder/network for the first three µCs is:

// Network 1 — copy 14 onboard DI to DB_Status.Onboard14 (WORD)
"DB_Status".Onboard14 := IW0;

// Network 2 — map I0.0, I0.1, I0.2 to µC 01 signals
"DB_Status".uC01_SigA := I0.0;
"DB_Status".uC01_SigB := I0.1;
"DB_Status".uC01_SigC := I0.2;

// Network 3 — map µC 02 signals (I0.3, I0.4, I0.5)
"DB_Status".uC02_SigA := I0.3;
"DB_Status".uC02_SigB := I0.4;
"DB_Status".uC02_SigC := I0.5;

For the remaining 28 µCs, continue the bit-by-bit mapping across the SM 1221 input range (I8.0 through I25.7), with three bits per µC. To reduce code volume, declare the DB with arrays and use a FOR loop with a calculated bit index; this approach is also more maintainable than hand-written ladder.

Network Architecture: Cabinet Router, Port Forwarding, VPN

The original design uses an internet-connected cabinet router and exposes the S7-1200 webserver through that router. The minimum viable topology is:

INTERNET DynDNS / Public IP e.g. cabinet.dyndns.org CABINET Industrial Router 192.168.0.1 / -20 to +40 °C S7-1200 CPU 1214C 192.168.0.10 / HTTPS:443 CSM 1277 Switch 4 × RJ45, 10/100 REMOTE CLIENT PC Browser HTTPS client Smartphone Mobile browser Engineer VPN TIA Portal / TIA remote

Three deployment patterns are common, ranked by security posture:

Pattern Mechanism Security Use Case
Port forward :443 → S7-1200 Router NAT + firewall Low–medium Single-user, read-only HMI
Reverse proxy + TLS termination Industrial edge gateway in cabinet Medium–high Multi-user, logging, role-based access
Site-to-site or client VPN IPsec / OpenVPN / WireGuard tunnel High Engineering access, SCADA integration

For simple read-only access, a single port-forwarded HTTPS listener is sufficient. Configure the router as follows:

  1. Assign a static LAN IP to the S7-1200 (e.g., 192.168.0.10) and a static DHCP reservation on the router to avoid address conflicts.
  2. Set the PROFINET device name on the CPU (e.g., cabinet-plc-01) under "Device configuration → PROFINET interface → Ethernet addresses".
  3. Create a NAT rule: external TCP/8443 → internal 192.168.0.10:443 (offset the external port as a basic security-through-obscurity step).
  4. Enable a DynDNS client on the router (No-IP, DynDNS, or vendor-specific) if the cabinet has a dynamic public IP.
  5. Create a strong, unique user on the S7-1200 webserver with the "Read" permission only; do not enable the "Write" permission for the remote-access user.
  6. Set the S7-1200 webserver update interval to 2–5 s. Sub-second intervals on 90+ tags overload the single-threaded webserver refresh.
Do not expose the S7-1200 diagnostic or tag write pages directly to the internet. Even with HTTPS, the engineering interface is not hardened against brute force on every firmware version. A reverse proxy with rate limiting and IP allow-listing, or a VPN tunnel, is strongly recommended for any production deployment. For Siemens sites, the SINEMA Remote Connect platform provides a managed VPN relay that does not require a public IP on the cabinet.

Industrial Router Selection (-20 °C to +40 °C)

For an unheated or outdoor cabinet, the router must operate across the full industrial temperature range. Common candidates that meet -20 °C to +40 °C with at least one margin degree are:

Vendor / Series Model Example Operating Temp Cellular Notes
Siemens SCALANCE M SCALANCE M876-3 -20 °C to +60 °C 3G/4G (UMTS/LTE) IP30, DIN rail, VPN, integrated firewall
Siemens SCALANCE M SCALANCE M826-2 -20 °C to +70 °C 2G/3G/4G 2 × SIM slots, IPsec/OpenVPN, IP30
Siemens RUGGEDCOM RX1400 -40 °C to +85 °C 4G LTE Cellular + 4-port switch + VPN, IP30
Hirschmann OWL LTE -25 °C to +70 °C 4G LTE Industrial LTE router, IP30
Cisco IR1101 -40 °C to +60 °C 4G LTE (pluggable) Cisco IOS-XE, dual SIM, IP30

Choose a router that supports the local cellular bands and the desired VPN. The S7-1200 does not need VPN hardware acceleration — any IPsec/OpenVPN/WireGuard stack on the router is sufficient for HTTPS-based access. For first-party integration in a Siemens cabinet, the SCALANCE M series is the natural choice and is supported in TIA Portal's "Devices & networks" catalog for offline engineering. Documentation is on the SCALANCE product page.

A static public IP from a cellular carrier is preferred for VPN reachability, but most operators issue private NAT addresses by default. Use the router's built-in DynDNS or a vendor cloud relay (e.g., SINEMA Remote Connect for SCALANCE) to bridge the private IP into a routable address. WireGuard and OpenVPN handle NAT traversal with no router-side configuration changes; IPsec NAT-traversal (NAT-T) must be explicitly enabled.

Power Supply and Hardware Sizing

The PM 1207 (6EP1332-1SH71) is the standard 24 V DC, 2.5 A supply for an S7-1200 cabinet. Sizing the 24 V DC bus:

Load Current (typ.) Current (max.)
CPU 1214C 200 mA @ 24 V 500 mA @ 24 V
SM 1221 DI 16 × 5 (logic only) 5 × 30 mA = 150 mA 5 × 60 mA = 300 mA
DI input current (94 channels × 2.5 mA each) — 235 mA
CSM 1277 (4-port switch) 50 mA 100 mA
Industrial router 200 mA 500 mA
Subtotal 600 mA 1 635 mA
+ 25% engineering margin — 2 044 mA

The PM 1207 with 2.5 A (60 W) output is sized correctly with 20% spare. For larger spare capacity (e.g., future SM additions, a second PROFINET device, or 24 V DC field power for µC inputs), step up to the PM 1207 6EP1333-1SH71 (24 V, 5 A). The CPU's 24 V DC input terminals (1L+/1L-) feed the module electronics; the SM 1221 input power is fed from the same 24 V DC rail through the bus connector, and the SM field-side commons (1M/2M) must be tied back to 24 V DC common on the supply.

Engineering with TIA Portal

Configure the CPU and SMs in TIA Portal. The minimum TIA Portal version that supports the firmware shipped on the S7-1200 CPU 1214C with MLFB 6ES7214-1...40-0XB0 is TIA Portal V13 SP1 Update 9. Newer V14 SP1, V15.1, V16, V17, and V18 releases all support the same hardware. For long-term maintainability, target TIA Portal V16 or V17 — both are still in mainstream support as of 2024. The TIA Portal product page has release notes and compatibility matrices.

Project steps:

  1. Add a new device → "SIMATIC S7-1200 CPU 1214C DC/DC/DC" (6ES7214-1AG40-0XB0).
  2. Open "Device view" and add five "SM 1221 DI 16 × 24 V DC" (6ES7221-1BH32-0XB0) modules to slots 1–5 of the right-side expansion bus.
  3. Open "Properties → DI 16 → Inputs" on each module and set the input filter to 0.8 ms. The default 6.4 ms filter is sized for mechanical contacts and will smear short µC pulses.
  4. Open "Properties → Webserver" and enable webserver access. Add at least one user with the "Read" role. Enable HTTPS and load a server certificate (self-signed is acceptable for first commissioning; replace with a CA-signed certificate before exposing to the internet).
  5. Open "Properties → Ethernet addresses" and set the CPU's IP to 192.168.0.10, subnet 255.255.255.0, and use-router 192.168.0.1. Set the PROFINET device name (e.g., cabinet-plc-01).
  6. Create a global DB "DB_Status" with 90 BOOL tags, one per µC signal. Add a 16-bit WORD tag "Onboard14" for the spare 14 onboard channels.
  7. Program OB1 to copy the IW input addresses into DB_Status (see code example in the Webserver section above).
  8. Configure the CSM 1277 and SCALANCE router as separate PROFINET devices in the same project, or simply configure them out-of-band — the S7-1200 does not require router configuration to be in the TIA project for webserver reachability.

Address map for the five SM 1221 modules in slots 1 through 5:

Slot Module Input Range Channel Count
0 (CPU) CPU 1214C onboard DI I0.0 – I1.5 14
1 SM 1221 DI 16 I8.0 – I9.7 16
2 SM 1221 DI 16 I12.0 – I13.7 16
3 SM 1221 DI 16 I16.0 – I17.7 16
4 SM 1221 DI 16 I20.0 – I21.7 16
5 SM 1221 DI 16 I24.0 – I25.7 16
Total DI 94

The address gap between the onboard DI (I0–I1) and the first SM (I8) is intentional; the S7-1200 reserves process-image space between onboard I/O and the first SM. Confirm the actual addresses in the device view's I/O table after project compilation — the values above match the S7-1200 system manual's standard mapping for CPU 1214C firmware V4.x.

Commissioning and Verification Procedure

Follow this sequence to bring the system up safely. Stop at any failed step and diagnose before continuing.

  1. Mechanical check. Confirm the DIN rail is bonded to cabinet ground, the CPU and SMs are clipped firmly, the SIMATIC Memory Card (SMC) is seated in the CPU's card slot, and the cabinet interior is dust-free.
  2. Power-on test (no field wires). Apply 24 V DC. The CPU's status LEDs should show STOP (yellow) on the right LED group, and the PROFINET LINK/ACT LED should be green/amber. All five SMs should show a solid green "OK" LED within 5 s; an SF (red) LED on any SM indicates a project/configuration mismatch.
  3. Engineering connection. Connect a PC to the CPU's PROFINET port (directly or through the CSM 1277), set the PC to 192.168.0.100/24, scan the network in TIA Portal under "Online → Accessible devices", and "Go online". Verify the CPU's IP, PROFINET device name, and firmware version match the project.
  4. Firmware compatibility. In TIA Portal, check "Online & diagnostics → General → Device information". The CPU firmware should match (or be downgradable/upgradeable from) the project version. If an online firmware update is needed, follow the procedure in the S7-1200 system manual — the CPU remains in STOP during a firmware update, typically for 1–3 minutes.
  5. DI walk-down (bench test). With the µCs powered but no active field wiring to the cabinet, short each SM input to 24 V DC with a test probe, one channel at a time. Confirm the corresponding bit in the watch table ("DB_Status") and the webserver tag toggles. This validates the SM addressing and the user-defined page.
  6. Field wiring hookup. Connect the 30 µC signal bundles one bundle at a time, starting with the closest µC. After each bundle, verify all three inputs register correctly on the webserver. Mark each cable at the cabinet end with a permanent wire marker (e.g., Weidmüller MultiCard or Phoenix PMC).
  7. Webserver check (LAN). From the engineering PC on the LAN, open https://192.168.0.10. Log in with the configured user. Verify the user-defined page renders, all 90 referenced tags resolve (no "?" placeholders), and inputs are live within 5 s.
  8. Internet exposure test. From a phone on cellular, connect to the public DynDNS hostname (or the public IP) on the external port (e.g., https://cabinet.dyndns.org:8443). Verify the page loads without certificate warnings and the inputs are live.
  9. Soak test. Leave the system running for 48 h. Monitor for any "SF" LED events, webserver reconnects, or DI chatter. Review the diagnostic buffer at the end of the soak — a clean diagnostic buffer over 48 h is the best predictor of long-term reliability.
  10. Documentation handover. Save the TIA Portal project (with user-defined page source) to the cabinet laptop or a managed version-control repository. Export the CPU's diagnostic buffer and webserver configuration as PDF. Update the single-line diagram and the I/O list to reflect as-built wiring.

Troubleshooting Matrix

Symptom Likely Cause Action
Webserver unreachable from LAN Webserver disabled in TIA project, or user lacks permission Enable webserver in device configuration, reload project, verify user list under "Webserver → User management"
Webserver reachable but tags show "?" User-defined page references a tag that does not exist in the project Recompile the page, verify each tag name against the project tag table; the "Download to device" must be repeated after any DB change
All DI read FALSE despite field signals 24 V DC common (1M/2M) not connected; wrong polarity; input filter too long Re-check 1M/2M jumpers on each SM; verify +24 V at terminal with a meter; reduce input filter to 0.2 ms in TIA Portal
One specific µC's 3 inputs all read FALSE Open µC output (no pull-up); µC not powered; broken wire on shared common Verify µC 24 V supply, then the 1M return wire; add external 4.7 kΩ pull-up to 24 V DC if open-collector
DI bits flicker / chatter Inductive coupling on long cable; insufficient debounce Switch to shielded cable with shield grounded at cabinet end; in TIA Portal, raise input filter to 6.4 ms for the affected module only
Router reachable from internet but S7-1200 not Port-forward not active; S7-1200 firewall blocked; HTTPS port mismatch Verify NAT rule on router; on S7-1200, check "Webserver → Access" for IP allow list; confirm port matches between CPU and NAT rule
SM 1221 SF LED on Module missing or wrong type in TIA project; external wiring fault (e.g., 24 V on input that is configured as 0 V); undervoltage on 24 V rail Compare online module to project; check wiring against the S7-1200 system manual wiring diagram; measure 24 V DC at the SM terminals
CPU switches to STOP after power cycle SD card write-protect; firmware mismatch with project; user program error Remove SD card and reinsert; perform firmware update from TIA Portal; check diagnostic buffer for OB cycle-time violation
Webserver page renders slow (>10 s) Update interval too aggressive; many user-defined pages loaded; high tag count Raise update interval to 5 s; consolidate pages; check CPU webserver load with diagnostic tags; consider reducing total tag references per page
VPN tunnel drops every few hours Cellular keepalive too long; ISP NAT timeout; DPD misconfigured Lower VPN DPD/keepalive to 30 s; enable router's "persistent" or "always-on" connection mode; verify ISP APN supports long-lived sessions
Inputs read TRUE at power-up and never clear Wire shorted to 24 V DC; SM 1221 input filter on wrong module; missing 1M common Disconnect the affected cable at the SM terminal and re-measure; re-verify 1M is bonded to 24 V DC common

FAQ

How many digital inputs does the S7-1200 CPU 1214C support with five SM 1221 modules?

The CPU 1214C has 14 onboard 24 V DC digital inputs. Each SM 1221 (6ES7221-1BH32-0XB0) provides 16 inputs. With five SMs the total is 14 + (5 × 16) = 94 digital inputs, leaving 4 spare channels above the 90 required by 30 microcontrollers × 3 signals each.

Can the S7-1200 webserver be exposed directly to the internet?

Yes, but only over HTTPS (TCP/443) with a strong, unique user password and the "Write" permission disabled for the remote-access user. For anything beyond read-only HMI use, place a reverse proxy with rate limiting or a VPN tunnel in front of the PLC; the S7-1200 webserver is not designed as a hardened, internet-facing application server.

What input filter time should I use for short µC pulses?

The SM 1221 default is 6.4 ms, suitable for mechanical contacts. For µC output pulses down to ~1 ms, set the input filter to 0.8 ms in the TIA Portal device configuration. For sub-millisecond pulses use 0.2 ms and confirm the µC pulse width exceeds the filter time by a factor of 2–3. Available filter values are 0.2, 0.4, 0.8, 1.6, 3.2, 6.4, and 12.8 ms.

What TIA Portal version is required for the S7-1200 CPU 1214C with MLFB ending -40-0XB0?

TIA Portal V13 SP1 Update 9 or later. Recommended for long-term projects is TIA Portal V16 or V17, which include the latest firmware upgrades and security patches for the S7-1200 webserver. TIA Portal V18 also supports the same hardware for newer installations.

What industrial router works from -20 °C to +40 °C for the cabinet?

The Siemens SCALANCE M826-2 (-20 °C to +70 °C), SCALANCE M876-3 (-20 °C to +60 °C), Hirschmann OWL LTE (-25 °C to +70 °C), and Cisco IR1101 (-40 °C to +60 °C) all support the -20 °C to +40 °C range with margin. The SCALANCE M series integrates cleanly with TIA Portal and is the first-party choice for a Siemens cabinet.

What cable size is recommended for 100 m of 24 V DC signal wiring?

Use 0.75 mm² (AWG 18) shielded, overall-shielded signal cable (e.g., LiYCY-CY). The loop resistance is 2 × 100 m × 24 mΩ/m = 4.8 Ω, giving a worst-case drop of 720 mV at 100 mA — well within the 9 V margin of a 24 V DC input. Ground the shield only at the cabinet end using a 360° low-impedance clamp.

Back to blog