Resolving SIMIT Virtual Controller DI/DO Bad Status Faults in PCS 7 V8.2: Hardware Export and Module Driver Emulation

Resolving SIMIT Virtual Controller DI/DO Bad Status Faults in PCS 7 V8.2: Hardware Export and Module Driver Emulation

In SIMATIC PCS 7 V8.2 with SIMIT Virtual Controller (VC), digital input and output driver blocks (Pcs7DiIn, Pcs7DiOu, FbDiIn) report Bad = 1 (bad signal status 16#00 or 16#28) while analog blocks work when the virtual controller lacks matching module diagnostic data. Unlike S7-PLCSIM which bypasses driver diagnostics, SIMIT VC strictly emulates hardware diagnostic records. This fault occurs if the SIMIT project coupling was created without importing the compiled HW Config (HWCN-Export), or if I/O addresses fall outside the Process Image Partition (PIP) assigned to the cyclic interrupt OB. Re-exporting HW Config, importing it into SIMIT VC, and recompiling module drivers resolves it.

Table of Contents

Hardware Emulation Architecture: S7-PLCSIM vs SIMIT Virtual Controller

When simulating SIMATIC PCS 7 automation software, engineers frequently transition from classic S7-PLCSIM to the SIMIT Virtual Controller (VC). S7-PLCSIM executes CPU user code in a simplified virtual memory space where standard channel driver blocks (Pcs7DiIn, Pcs7AnIn) recognize the simulation environment and automatically suppress diagnostic hardware alarms.

In contrast, SIMIT Virtual Controller is a high-fidelity hardware emulator designed to replicate physical S7-400 / CPU 410 controller behavior. It emulates the backplane bus, PROFINET/PROFIBUS communication ASICs, and ET 200 distributed I/O station diagnostic data records. If the virtual hardware topology does not match the PCS 7 project identically, channel drivers detect missing I/O modules and flag Bad = 1.

Why Digital Channel Drivers Report Bad Status in SIMIT VC

In PCS 7 APL, digital input driver blocks (Pcs7DiIn / FbDiIn) evaluate the signal status byte (Quality Code) and module diagnostic blocks:

  • The driver relies on the underlying diagnostic block (MOD_D1, MOD_HA, or MOD_D8) which queries diagnostic data records (DS0, DS1).
  • Analog modules often provide direct numerical values that can be simulated via process image inputs even if diagnostics fail.
  • However, digital modules strictly require module-present and channel-healthy acknowledgments. If SIMIT VC has not mapped the ET 200M/ET 200SP submodule diagnostic address, the diagnostic block reports a module pulled or unconfigured fault, forcing Bad = 1 and 16#00 (Bad quality).

The Role of HWCN Export and Module Diagnostic Address Mapping

To provide SIMIT VC with complete hardware awareness:

  1. In STEP 7 HW Config, the station configuration must be exported using the HWCN Export utility (HWCN-Export tool or Station -> Export).
  2. This generates a .cfg file containing every I/O rack, ET 200 station, head module diagnostic address, and channel slot.
  3. In SIMIT, the Virtual Controller coupling must import this exact .cfg file.
  4. SIMIT VC then creates the corresponding virtual hardware nodes and provides valid diagnostic replies when the PCS 7 CPU issues RDREC / DPNRM_DG calls.

Process Image Partition (PIP) Alignment in Cyclic Interrupt OBs

A secondary driver fault occurs when I/O addresses are assigned to Process Image Partitions (PIPs) not updated by the simulation slice:

  • In PCS 7, channel blocks running in OB35 (100 ms) require digital I/O addresses to be assigned to TPA 1 (Process Image Partition 1), which is updated synchronously with OB35.
  • If digital addresses reside in the default Process Image (OB1) or an unassigned partition, SIMIT VC does not refresh them during the cyclic interrupt, causing the driver to detect timeout errors.

Diagnostic Matrix: SIMIT VC Channel Driver States and Error Codes

The following table summarizes driver behavior across simulation platforms and configuration states:

Simulation PlatformHWCN Imported?SimOn Pin StateDriver Output BadSignal Status (ST)Diagnostic Root CauseS7-PLCSIM V5.4Not RequiredSimOn = 0Bad = 016#80 (Good)PLCSIM bypasses low-level hardware diagnosticsSIMIT VCNo (Missing HWCN)SimOn = 0Bad = 116#00 or 16#28Emulated module missing; diagnostic block reports faultSIMIT VCNo (Missing HWCN)SimOn = 1Bad = 016#60 (Simulated)Simulation mode on block bypasses driver diagnostic checkSIMIT VCYes (Correct HWCN)SimOn = 0Bad = 016#80 (Good)Hardware emulated fully; diagnostic block healthySIMIT VCMismatched PIPSimOn = 0Bad = 116#28 (Bad Process)I/O address partition not synchronized with cyclic OB

Step-by-Step Resolution Workflow for SIMIT VC Coupling

Follow this engineering procedure to resolve DI/DO bad status in SIMIT Virtual Controller:

  1. Compile HW Config in STEP 7: Open HW Config. Select Station -> Check and Save.
  2. Export HWCN: In HW Config, navigate to Station -> Export.... Save the file as <Project>_HWCN.cfg.
  3. Recompile Module Drivers in CFC: Open CFC. Click Options -> Customize -> Compile/Download. Ensure 'Generate module drivers' is checked. Perform a complete program compilation.
  4. Import HWCN into SIMIT: In SIMIT, open your project. Under Couplings, double-click the Virtual Controller coupling. Click Import HW Config, browse to <Project>_HWCN.cfg, and complete the import.
  5. Map SIMIT Signals: Open SIMIT Signals view. Confirm that digital inputs and outputs appear with valid byte/bit offsets matching HW Config.
  6. Download to VC: In SIMIT, deploy and start the Virtual Controller. In SIMATIC Manager, perform an AS Download to the virtual CPU.
  7. Verify Channel Status: Open CFC in test mode. Confirm Pcs7DiIn.Bad switches to 0 and ST evaluates to 16#80.

Verification

Verify healthy driver operation through these checks:

  1. CFC Test Mode Audit: Inspect Pcs7DiIn and Pcs7DiOu. Confirm Bad = 0, SimAct = 0, and output Out.ST = 16#80.
  2. Diagnostic Block Health: Inspect block MOD_D1 in the CFC driver chart @(1). Confirm MODF = 0 and PERIF = 0.
  3. Process Image Signal Toggle: In SIMIT, toggle a simulated digital input switch. Verify the corresponding input signal in CFC updates instantaneously.
  4. Module Pull/Plug Simulation: Use SIMIT Emulation Manager to simulate a module pull. Confirm Pcs7DiIn transitions to Bad = 1, and returns to Bad = 0 upon plug.

Limitations and Operational Precautions

Observe the following simulation constraints:

  • HW Config Modifications: Whenever I/O modules, rack configurations, or addresses are modified in STEP 7 HW Config, the HWCN export and SIMIT coupling import must be repeated.

  • Do Not Leave SimOn = 1 in Production: Forcing SimOn = 1 on channel blocks masks simulation errors but prevents real hardware diagnostics from functioning during site commissioning.

  • Commercial Accuracy Disclaimer: Software order numbers (MLFBs), package structures, and hardware capacity prerequisites vary across PCS 7 versions and hardware platforms. System integrators must confirm exact software entitlements and licensing requirements against the official Siemens Catalog CA 01 and obtain an authorized Siemens distributor quotation prior to purchasing.

Engineer FAQ

Does SIMIT Virtual Controller require an AS RT PO license?

No. The SIMIT Virtual Controller is licensed under SIMIT Simulation Platform runtime licenses, not AS Process Object licenses.

Why did AI/AO blocks work while DI/DO blocks showed Bad status?

Some analog channel blocks can process raw numeric counts directly, whereas digital channel drivers strictly require module-healthy acknowledgments from ET 200 diagnostic blocks.

What SIMIT tool manages module diagnostics and faults?

The SIMIT Emulation Manager allows engineers to simulate module failure, channel open-circuit, and module pull/plug states directly in the virtual controller.

Technical References

Related Articles

Related Tags

  • SIMATIC PCS 7
  • SIMIT
  • Virtual Controller
  • Pcs7DiIn
  • Bad Status
  • HWCN Export
  • Module Drivers
  • Simulation
6 respuestas