Troubleshooting
Why PLCSIM V18 crashes with a gRPC error at power-on
Short answer
A project that compiles cleanly and crashes only when simulator power is pressed has a fault in the simulation runtime or an unsupported PLC model, not in the logic. Prove it with a minimal project on a supported model, read the Windows application event record for the failing module, and if every supported test project crashes, run the installer's Repair option, then reinstall only if the repair changes nothing.
On this page
You compiled the project without a single error, pressed power on the simulated PLC, and the simulator answered Instance crashed with a GRPC error. That combination already tells you where the fault is not: the compiler accepted your hardware configuration and your blocks, so the logic is not what died. What died is the simulated PLC instance, the process the simulator starts at power-on, or the control channel that watches it. The fix is a decision tree, not a ritual: confirm the configured PLC model is one the simulator supports, reproduce the fault with a minimal project, read the Windows application event log for the failing module, and if every supported test project crashes, repair the PLCSIM V18 installation with the installer's documented Repair option. Running as administrator or re-applying Update 2 changes none of that.
What the message actually reports #
The S7-PLCSIM V18 online help describes the simulator as working with workspaces: one workspace can hold several simulated PLC instances together with the SIM views you watch them through. The instance is the simulated PLC itself, a process created for your session. Pressing power asks the control side to start that instance, attach the compiled configuration and hold a control channel open to it. That channel carries gRPC, a request-reply mechanism for structured calls between processes. Read the message in that order: the instance process ended first, and the gRPC text is only the control side reporting that its next call found nothing to answer. The crash is the fault; the error text is the messenger.
So do not chase the network. A port that Windows blocks fails differently, with a socket error at connect time, the pattern behind an M221 simulation failing with TCP error 10013 on port 51234, not with an instance that dies the moment you request power.
Checks that isolate the fault before you change anything #
Work these in order and write each answer down; the repair decision at the end reads off them.
- Pin the transition. Start the simulation from inside TIA Portal V18 and watch the workspace: does the instance list before you press power, or does the crash land on the power request? Capture the complete dialog text word for word; the two words gRPC error on their own are not a record.
- Read the configured PLC model. Open the device configuration and write down the exact CPU model and firmware. Compare that pair with what the installed simulator is documented to support. A near-name is not a match; if the pair is doubtful, switch the test project to a different supported model instead of defending the one you have.
- Build the minimal control project. New project, one supported PLC, nothing but an empty main program. Compile, start the simulation, press power. This one test splits a project-bound fault from a simulator-wide one, and everything downstream depends on its result.
- Pull the Windows application event log. Reproduce the crash, find the entry stamped at that moment, and record the failing application, failing module and exception code exactly as displayed. Those names decide whether you repair the simulator or something sitting under it.
- Compare launch paths once. Run the same test from inside TIA Portal and once from the desktop shortcut. An identical crash from both retires the entry point and puts the shared runtime beneath them in the fault domain; repeating the comparison adds nothing.
The same discipline retires the fixes you already tried. If the crash survived running as administrator, elevation is not the variable. If it survived Update 2, that update is installed and did not remove the fault, so applying it again is not a repair step. Move to the decision table.
Reading the results #
| Your result | What it isolates | The decision |
|---|---|---|
| The minimal project powers up; only the working project crashes | A project-bound fault: the model and firmware pair, or a damaged device configuration | Correct the hardware selection or rebuild the device configuration in the working project; install nothing |
| One supported model runs, another supported model crashes | A model-specific boundary inside the simulator | Simulate on the model that runs, and report the failing pair with the full error text through the manufacturer's support channel |
| Every supported minimal project crashes at the power request | The shared simulator runtime, its registration, or a dependency under it | Repair the PLCSIM V18 installation with the installer's Repair option |
| Identical crash from both launch paths, with and without elevation | Entry point and rights are not involved | Stop re-testing shortcuts; work from the names in the event log |
| The identical crash reproduces after Repair | Damage or inconsistency that Repair cannot reach | Uninstall and reinstall from the authorized installation media, then restore the update state |
The documented repair path #
The standard to work to is the manufacturer's own procedure. The S7-PLCSIM V18 SP1 installation notes define repair as starting the installer from the installation media, selecting the Repair option at the prompt and following it through, restarts included. Repair puts back the simulator's missing or damaged program files and registrations; it never reads your project, because the project is not what it services.
- Close TIA Portal V18 and PLCSIM V18, then confirm in the Windows process list that no simulation instance is still alive.
- Leave the working project closed and untouched, with the minimal test project kept as the comparison case.
- Start the S7-PLCSIM V18 installer from its installation media, select Repair, follow the prompts and take the restart it asks for.
- After the restart, run the minimal project test before opening anything else, so no project-specific variable contaminates the first result.
- If the identical crash returns, uninstall PLCSIM V18, reinstall from the authorized installation media, restore the update that matches your engineering portal's state and restart when asked. Get the installer only from the manufacturer or its distributors, and never copy runtime files over from another machine: the registrations do not travel with them.
A worked example with the arithmetic #
Take a station with TIA Portal V18 and PLCSIM V18 Update 2 where the working project targets an S7-1500, compiles clean, and returns the crash dialog at every power request. You build two minimal projects, one on an S7-1200 and one on an S7-1500, each with an empty main program and a fresh compile, and attempt power-on twice per project. Result: four crashes in four attempts, same text each time, and one Application-log entry per attempt naming the same failing application.
Failures ÷ attempts = 4 ÷ 4 = 100%. Projects failing ÷ projects built = 2 ÷ 2 = 100%. The two projects share no blocks, no configuration and no model, so the only component common to every failure is the simulator runtime. Decision: repair the installation, leave the logic alone and stop suspecting the S7-1500 selection.
After the Repair run and its restart, the same S7-1200 minimal project lists its instance, powers up on request and stays up, with no new entry in the Application log at power-on. That pattern releases you to the working project.
Prove the fix before you trust it #
- Compile: the minimal project's hardware and software compile with zero errors.
- Instance creation: the instance appears in the workspace and stays listed before power is requested.
- Power transition: the powered state is reached, the control interface stays responsive and no crash text appears.
- Repeatability: close the session normally, open a fresh one and repeat; a single clean start clears nothing.
- The working project: it opens, compiles, loads into the instance, powers up and runs the program.
One boundary stays fixed: a clean simulated run proves program behavior, never a machine safety function. Prove interlocks and stop functions on the real machine under its documented validation procedure before anyone relies on them.
Only then does the simulator earn its next job, for example as the stand-in PLC when connecting Vijeo Citect SCADA to PLCSIM without a PLC, so screens and tags can be tested before the hardware arrives.
When it still crashes #
If a clean reinstall from the authorized media still crashes on every supported model, stop swapping variables and escalate with evidence. Package the complete dialog text, the Application-log entry details, meaning the failing application, failing module and exception code, plus the configured CPU model and firmware, the installed update state, the launch path used and the minimal-project result, then open the case through the manufacturer's official support channel. One pointer from the event log outranks the rest: if the failing module the record names belongs to another product, such as a filter driver or a system component, the repair target moves to that component, serviced through its own vendor's documented update path. That is a repair decision, not a workaround.
Questions asked
Why does a local simulation report a gRPC error at all?
Because gRPC is the channel's name, not a network diagnosis: the simulator's control process talks to the simulated instance with structured gRPC calls, and on one PC that traffic runs over the loopback interface. When the instance process ends, the pending call fails and the control side reports the crash. The name tells you which channel broke, not that a LAN, a firewall or a cable is involved.
Is PLCSIM Advanced repaired the same way as standard PLCSIM?
No. PLCSIM Advanced is a separate product with its own installation and its own instance control, so the standard repair does not service it. Service Advanced through its own installation media, and check its documented compatibility with the engineering portal version you run. Treat a crash in an Advanced runtime as an Advanced fault with its own repair path.
Will the Repair option touch my TIA Portal project?
No. Repair restores the simulator's own program files and registrations; it does not open or rewrite project data. Keep the working project closed while the repair runs and open it only after the minimal test project powers up cleanly. Your compiled blocks and hardware configuration stay exactly as you left them, which is why the minimal project, not a backup restore, is your proof that the fix worked.
How many clean power-ons prove the fix?
Use four: three consecutive power-on and power-off cycles in fresh simulation sessions, plus one full run of your working project. Treat four of four passes as the pass mark. A single successful power-on after a repair proves nothing, because one lucky start is exactly what an intermittent startup fault would hide.