Simulation Parameters Initialization setting

Hello,

I have a few questions regarding the use of XML-RPC and ModelVars in PLECS.

  1. In the “Simulation Parameters” → “Initialization” tab, variables can be defined manually.
    If a variable with the same name is also provided through Python using ModelVars via XML-RPC, which one takes priority?

  2. I set the block parameter name as fs, and then assigned fs through ModelVars in Python. However, during simulation I received the following error saying that fs is 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?

  1. 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.

Can you post a simple model and your script? I suspect the issue is due to the variable scope in your masked subsystem, but a model is required to fully diagnose.

Is there a way to view the available functions, APIs, or internal arguments provided by plecs so that I can use them more effectively?

The API is documented in the user manual as well as relevant helpful demo models. If you are using XML-RPC, then the supported methods are accessible with the following, noting that the documentation here is thin and the user manual should be used for a more comprehensive reference.

import xmlrpc.client
proxy = xmlrpc.client.ServerProxy("http://localhost:1080")
proxy.system.listMethods()
>> ['system.listMethods', 'plecs.set', 'plecs.getModelTree', 'plecs.close', 'plecs.statistics', 'system.methodHelp', 'plecs.scope', 'plecs.analyze', 'plecs.load', 'plecs.codegen', 'plecs.simulate', 'plecs.webserver', 'plecs.get']