A Windows blue screen immediately after TwinCAT activates a configuration and confirms Restart TwinCAT System in Run Mode can originate from the saved boot configuration or an exception in the PLC application. Use the sequence below to separate those two causes.
Clear the TwinCAT Boot Configuration
Open C:\TwinCAT\3.1\Boot, delete its contents, and restart the industrial PC (IPC). This removes the existing TwinCAT boot content before the I/O configuration is rebuilt.
Reload and Verify the EtherCAT Devices
- Keep TwinCAT in Config mode and toggle Free Run on.
- Select the required adapters correctly, then click Reload Devices.
- Open the EtherCAT Master's Online tab and verify that all I/O is in OP mode.
- If Reload Devices completes without an error, disable the PLC project's Autostart Boot Project setting.
- Activate the configuration and confirm Restart TwinCAT System in Run Mode.
If Windows no longer blue-screens, the cleared boot content and rebuilt device configuration resolved the failure. Keep Autostart Boot Project disabled until the PLC program has been checked for execution errors.
Isolate an Exception in the PLC Code
If the IPC blue-screens or locks up when you log in to the PLC and then requires a reboot, investigate the PLC application. The identified exception candidates are divide-by-zero operations, null-pointer access, and array indexes outside their valid bounds.
| Observed result | Next engineering decision |
|---|---|
| Reload Devices reports an error or I/O does not reach OP mode | Do not proceed on the assumption that device reloading succeeded; correct the adapter or I/O configuration first. |
| Run mode starts without a blue screen while Autostart Boot Project is disabled | Continue by checking the PLC application before restoring automatic startup. |
| Blue screen or lockup occurs while logging in to the PLC | Use breakpoints to isolate the executing code and inspect it for divide-by-zero, null-pointer, or array-bounds exceptions. |
After correcting the PLC logic and eliminating its errors, activate the configuration again. Restore Autostart Boot Project only after confirming that the application runs without the failure.
FAQ
How do I fix a TwinCAT blue screen after activating the configuration?
Delete the contents of C:\TwinCAT\3.1\Boot, restart the IPC, reload the devices in Config mode with Free Run on, verify that all EtherCAT I/O is in OP mode, and retry with Autostart Boot Project disabled.
Why does TwinCAT blue-screen when I log in to the PLC?
The evidence points to a PLC-code exception when the failure occurs during login. Check for divide by zero, null-pointer access, and out-of-bounds array indexing, using breakpoints to isolate the executing logic.
When should I enable TwinCAT Autostart Boot Project again?
Leave Autostart Boot Project disabled while diagnosing the application. Enable it only after correcting the PLC logic and verifying that the program runs without errors or another blue screen.