Get Equipment Sub-Type and Current (ELE_GetEquipmentSubTypeAndNominalCurrent)

An opening ID is an entry point used to customize business logic.. The Get Equipment Sub-Type and Current opening ID is available in the Electrical Logical Resources resource set and is used to define how the equipment must be considered: as a fuse, as a charge, as a switch, or as a derivation.

Note: For more information about customization by business rules, see Customization by Business Rules.

This page discusses:

General Information

This opening ID is invoked during the Electrical Calculation command.

Definition Description
PLM Opening ID ELE_GetEquipmentSubTypeAndNominalCurrent
Customization intent Execution
Execution context Client

Input Objects

Input objects must be of the following types:

  • ThisObject: equipment occurrence (LogicalOccurrence)
  • Parameters corresponds to the context object.

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)