UCM block Update

am currently using a UCM block, and after every script modification, I follow the usual workflow:

Generate Code → Update → Analyze

However, during the Update step, I encounter the error shown below. At the same time, I notice that a .bak folder/file is automatically created in the library directory for the UCM.

To work around the issue, I have been manually renaming the folder by removing the .bak suffix, after which the update proceeds successfully.

Could you please confirm whether this is the correct approach, or if there is a recommended procedure to resolve this issue?

Additionally, I have defined several UCM outputs with hardcoded values for testing purposes. However, when I monitor these outputs in ScopeView, I observe seemingly random values, typically limited to the range of 0 to 1, instead of the hardcoded values defined in the UCM.

The relevant code snippet and observed results are shown below. Could someone please help me understand what I might be missing or doing incorrectly?

If required, I can also share the .def file over email for a more detailed review.

Hi Raviteja,

Thanks for the detailed screenshots. Both issues are most likely linked.

  1. Update error and the .bak folder

From your screenshots, you’re editing ucm_secarc3.def directly in the model’s own UCM library folder (WithFaultSA3_hyp\libs\secarc3). That folder is also where HYPERSIM puts the UCM during Update. When the file you edit and the library copy are the same file, the update in your version (2026.2) can fail. It leaves the folder renamed with .bak, and then reports that the .def can’t be found. This was fixed in HYPERSIM 2026.3 (“Fixed UCM previously inability to update when the source path was equal to the reference”).

Renaming the .bak folder back works as a temporary fix, but I don’t recommend relying on it, because you may end up with a mix of old and new files. I’d recommend one of these:

Upgrade to HYPERSIM 2026.3 or later (best option), or

Keep your working .def outside the _hyp\libs folder (for example, in a separate UCM_src folder). Edit that copy, then use right-click on the UCM → Update, pointing to that source file. HYPERSIM will then refresh its own library copy without conflict.

  1. Outputs showing 0–1 values instead of the hardcoded values

Because the update failed (“The model was not updated”), the simulation is still running the previously compiled UCM. Your hardcoded values (Varc2_out = 14, CBsts_out = 9, Varc_raw_out = 5) were never compiled in. Your ScopeView recording (02:10:12) was made just after the failed update (02:08). The 0/1 pulse you see is most likely your earlier fault logic, not random values.

Once the update works:

Update the UCM and confirm there’s no error dialog.

Run Generate Code, then Analyze, and start a new simulation.

Load the new recording in ScopeView, not the older .oprec file.

A few more checks if values still look wrong:

Code section: your test assignments are in the After Voltage Calculation section. For control logic, our documentation uses the Before Voltage Calculation section, which runs every time step. Try moving the test assignments there to rule this out.

Correct instance: make sure the sensors in ScopeView (Fault.UCM9.*) point to the UCM instance that uses secarc3 (right-click the UCM → Edit Sensors).

Signal type: check that these outputs are declared as double (or integer) in the Control I/O section.

Hope this gets you unblocked! Let us know how it goes after the update. If anything still looks off, send over the .def file and your HYPERSIM version through a support ticket and OPAL-RT could take a closer look together.

Hi,

Thanks for the quick reply.

I upgraded to the latest HYPERSIM version (2026.3.3.o33) available in the Download Center. After opening my model in the new version, I attempted to update the UCM block, but I am still encountering the same issue where a backup file (.bak) is automatically created.

Additionally, regarding the results, I also suspect that the UCM is not being updated correctly. This is because the changes made in the UCM do not seem to be reflected in the simulation output as expected.

Could you please advise if there are any additional steps required to ensure that the UCM is rebuilt and updated properly?