Hello,
I have a few questions regarding the use of XML-RPC and ModelVars in PLECS.
-
In the “Simulation Parameters” → “Initialization” tab, variables can be defined manually.
If a variable with the same name is also provided through Python usingModelVarsvia XML-RPC, which one takes priority? -
I set the block parameter name as
fs, and then assignedfsthroughModelVarsin Python. However, during simulation I received the following error saying thatfsis undefined:
2026-05-28 11:29:22 [ERROR] [Error in simulate: <Fault -34000: "Simulation error: Error while executing callback for parallel simulation 1:
Error: Error in component 'sepic_no_under_cpp/PI_Digital2/Delay' while evaluating parameter 'Sample time (s)': 'fs' undefined.">]
[{'ModelVars': {'L1': 0.00022, 'L2': 2.5e-05, 'fs': 55600.0}}]
In this case, are there certain blocks that cannot access variables provided through ModelVars?
- When using:
plecs = xml.Server("http://localhost:1080/RPC2").plecs
is there a way to view the available functions, APIs, or internal arguments provided by plecs so that I can use them more effectively?
Thank you for your help.