master:Cosimulation parametersPSCAD Co-Simulation
Every parameter of the PSCAD Co-Simulation (master:Cosimulation): 9 names, with the unit, the default and the meaning PSCAD gives each one. Copy a name into parameters().
What master:Cosimulation is
Co-Simulation, a component of PSCAD's Master Library, filed under control blocks.
- Definition
master:Cosimulation- PSCAD name
- Co-Simulation
- Category
- Control blocks
- Parameters
- 9, in 2 groups
- Read from
- PSCAD 5.0.0, 2026-11-07
Read and write master:Cosimulation in Python
import mhi.pscad
pscad = mhi.pscad.connect() # the PSCAD that is open; launch() starts one
project = pscad.project("my_case") # a case loaded in the workspace
for comp in project.find_all("master:Cosimulation"): # the exact definition, namespace first
params = comp.parameters() # every parameter, as PSCAD holds it
print(str(params["channel_id"])) # Channel ID
comp = project.find_all("master:Cosimulation")[0]
comp.parameters(channel_id="2") # written as text
- A parameter is named exactly as in the table, letter case included:
parameters()gives every one of them in a dictionary, and a name the component does not have is refused. - A value that carries a unit comes back as a number whose unit is only in its text, so read it as text first (
str(...)) or the unit is lost. PSCAD keeps a written unit as it is given:"2500 [mohm]"stays in mohm. - A Choice is read and written as its symbol (the capitals in "Written as"), not as the words PSCAD shows in the dialog.
find_all()takes the exact definition only. A wildcard or a bare name withoutmaster:comes back empty; the Builder'spx_findwalks the pages for those.
The Builder's runtime does the same with the unit handled for you: px_get(comp, "channel_id") and px_set(...), which also records the old value so the case is put back at the end. Getting started shows them.
Configuration
| Parameter | Unit | Default | Description |
|---|---|---|---|
NameText | · | Application | NameThe name of the component. |
channel_idInteger | · | 1 | Channel IDThe channel ID of the incoming informationRange 1 to 1024 |
client_idInteger | · | 40001 | Client IDThe ID of the client that will connect and provide information to the clientRange 40000 to 60000 |
display_nameBoolean | · | True | Display NameDisplay the name above the componentWritten as False, True |
r_dimInteger | · | 1 | Receiving Data DimensionRange 1 to 1024 |
s_dimInteger | · | 1 | Sending Data DimensionRange 1 to 1024 |
s_freqInteger | · | 1 | Sending FrequencyThe number of time steps to send the dataRange 1 to 1000000 |
Default Data
| Parameter | Unit | Default | Description |
|---|---|---|---|
default_data_sourceBoolean | · | True | Default Data SourceSource for information on timestep 0 (Before any has been recieved by the co-simulationWritten as False, True |
default_valueReal | · | 0.0 | Default ValueThe default value use on timestep 0 before any data has been retrievedUsed when default_data_source == false |
Related
← master:clarke Clarke Transformation · master:emtconst Common Constants →