Context Object Parameters
| Parameter Name |
Type |
Read or Write |
Comments |
EqtPin
|
EleLogicalPin or EleLogicalPortEntity |
Read |
The pin of the equipment or the port of the
equipment where the cable is connected |
oEqtSubType |
Integer |
Write |
Enter one of following values:
- 0: unknown
- 1: Fuse
- 2: Charge
- 3: Switch
- 4: Derivation
|
oNominalCurrent |
Real |
Write |
The nominal current of the pin or equipment in
ampere [A]. |
Sample
/* Rule : ELE_GetEquipmentSubTypeAndNominalCurrent
This rule reads 2 pins attributes: V_Elec_SubType and V_Elec_NominalCurrent */
/* ThisObject : #In LogicalEquipmentOcc, Parameters : #In RuleContext */
// input args
let eqtPin(EleLogicalPin)
// output args
let EqtSubType(Integer)
let onominalCurrent(Real)
let strEqtTyp(String)
let nominalCurrent(COURANT)
set eqtPin = Parameters.GetAttributeObject("EqtPin")
if (eqtPin <> NULL)
{
strEqtTyp = eqtPin->GetAttributeString("V_Elec_SubType")
if (strEqtTyp == "Fuse") EqtSubType = 1
else if (strEqtTyp == "Switch") EqtSubType = 3
else if (strEqtTyp == "Charge") EqtSubType = 2
nominalCurrent = eqtPin.V_Elec_NominalCurrent // value is in A or mA (as set in Me-Preference)
onominalCurrent = eqtPin->GetAttributeReal("V_Elec_NominalCurrent") // value has no Unit, value returned is in A (even if Me-Preference says that electrical intensity is in mA
}
Parameters.SetAttributeInteger("oEqtSubType", EqtSubType)
Parameters.SetAttributeReal("oNominalCurrent", onominalCurrent)