master:lens21 parametersPSCAD Distance Relay - Lens

Every parameter of the PSCAD Distance Relay - Lens (master:lens21): 11 names, with the unit, the default and the meaning PSCAD gives each one. Copy a name into parameters().

What master:lens21 is

Distance Relay - Lens (Distance relay element - lens characteristcs), a component of PSCAD's Master Library, filed under control blocks.

Definition
master:lens21
PSCAD name
Distance Relay - Lens
Category
Control blocks
Parameters
11, in 3 groups; 2 carry a unit
Read from
PSCAD 5.0.0, 2026-11-07

Read and write master:lens21 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:lens21"):   # the exact definition, namespace first
    params = comp.parameters()           # every parameter, as PSCAD holds it
    print(str(params["theta1"]))         # Theta, in rad

comp = project.find_all("master:lens21")[0]
comp.parameters(theta1="1.9656 [rad]")   # a value that carries a unit is written with it
  • 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 without master: comes back empty; the Builder's px_find walks the pages for those.

The Builder's runtime does the same with the unit handled for you: px_get(comp, "theta1") and px_set(...), which also records the old value so the case is put back at the end. Getting started shows them.

Configuration

ParameterUnitDefaultDescription
NameText··Name for IdentificationEnter a name for identification
RDReal·0.6Radius of the Circles C1 and C2At least 1E-307
XYChoice·X_YCoordinates of the CentresSelect polar or cartesian coordinatesWritten as X_Y ((X,Y)), Z_THETA ((Z,theta))

Coordinates of Circle C1

ParameterUnitDefaultDescription
X1Real·0.4XUsed when xy==0
Y1Real·0.6YUsed when xy==0
Z1Real·0.72ZUsed when xy==1
theta1Realrad0.9828ThetaUsed when xy==1

Coordinates of Circle C2

ParameterUnitDefaultDescription
X2Real·1.2XUsed when xy==0
Y2Real·0.6YUsed when xy==0
Z2Real·1.34ZUsed when xy==1
theta2Realrad0.4636ThetaUsed when xy==1

Related

← master:discretizer Discretizer · master:div Divider →