# Discrepancy Between RT Box 2 Results and Offline Simulation in PLECS 4.9.5

**URL:** <https://forum.plexim.com/t/discrepancy-between-rt-box-2-results-and-offline-simulation-in-plecs-4-9-5/3085>\
**Category:** RT Box\
**Tags:** plecs, plecs-coder, rt-box\
**Created:** [May 21, 2026, 6:24am UTC](https://forum.plexim.com/t/discrepancy-between-rt-box-2-results-and-offline-simulation-in-plecs-4-9-5/3085 "2026-05-21T06:24:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dudu7963](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@dudu7963](https://forum.plexim.com/u/dudu7963)\
**Post date:** [May 21, 2026, 6:24am UTC](https://forum.plexim.com/t/discrepancy-between-rt-box-2-results-and-offline-simulation-in-plecs-4-9-5/3085/1 "2026-05-21T06:24:08Z")

</div>

**Issue description:**  
I have encountered an issue with the PLECS Coder for HIL.

**Attachments:**

- PLECS model (updated)

- scope figures

**In the figure:**

- Figure 1: RT Box 2 results
- Figure 2: offline simulation results (reference)

**Although both results are generated from the same model file, the RT Box results and the offline simulation results do not match. In addition, I noticed that the waveforms returned from the RT Box vary slightly between different runs**

**Environment:**

- Hardware: RT Box 2
- Software: PLECS 4.9.5

---

<div class="post-metadata">

**Author:** ![Oliver\_Schwartz](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/oliver_schwartz/32/6_2.png) [@Oliver\_Schwartz](https://forum.plexim.com/u/Oliver_Schwartz)\
**Post date:** [June 1, 2026, 1:04pm UTC](https://forum.plexim.com/t/discrepancy-between-rt-box-2-results-and-offline-simulation-in-plecs-4-9-5/3085/2 "2026-06-01T13:04:25Z")

</div>

Your C-Script to calculate the G-values in the Plant uses the absolute simulation time. Since the controller and the plant are running asynchronously and are most likely not started at the same time, it is not surprising that you get different simulation results in each run (and in offline simulation as well).

---

<div class="post-metadata">

**Author:** ![dudu7963](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@dudu7963](https://forum.plexim.com/u/dudu7963)\
**Post date:** [June 2, 2026, 7:29am UTC](https://forum.plexim.com/t/discrepancy-between-rt-box-2-results-and-offline-simulation-in-plecs-4-9-5/3085/3 "2026-06-02T07:29:45Z")

</div>

**Thank you for your advice! I’ll give it a try.**
