This functionality is only available for certain module packages.

You are here: Tutorial > EPLAN Pro Panel > Creating EPLAN Pro Panel discipline components > Creating abstract and concrete discipline components

Creating abstract and concrete discipline components

The discipline components that have been created thus far are non-specific. We will now derive abstract discipline components containing all of the necessary parameters from these non-specific components. The abstract discipline components will then serve as the source for deriving concrete discipline components with specific parameter values.

The enclosure for this tutorial consists of the following parts from the EPLAN parts database:

Article Part number (EPN) ID of the mounting surface
Enclosure AE 1050.500
Mounting panel of the enclosure 15100.3.1;0;0
Mounting surface of the mounting panel 16000.1.2;10002;0
30 mm x 60 mm (H x W) wire duct KK3060
30 mm x 40 mm (H x W) wire duct KK3040
Mounting rail TS 35_7,5 15102.2.2;0;0
PxC power adapter for PLC PXC.2938581
PxC PLC IL PB DP PXC.2862246
PxC IL 24 DI PXC.2861221
Terminal endblock PXC.3022276
Terminal clamp PXC.3031212

The abstract components are created first:

  1. Select the ProPanel unit.
  2. Select New > ECAD > Enclosure.
  3. In the Name field, enter the text abstractEnclosure.
  4. Select the Abstract check box.

  1. Open the Parameter editor.
  2. Drag the EPN, Plug and Socket parameters from the Parameter unit and drop them into the editor.

A concrete component is now derived from this abstract component.

  1. Select the ProPanel unit.
  2. Select New > ECAD > Enclosure.

  1. In the Name field, enter the text AE1050_500.
  2. In the Super class field, enter the text abstractEnclosure.
  3. Select the Parameters editor.

  1. For the EPN parameter, enter the value AE 1050.500.

Follow this procedure to create the following abstract components and the concrete components derived from them.

Abstract components:

Component Super class Parameters Value
abstractEndBracket Device Coordinate
EPN
Mate
Plug
Position
abstractMountingRail MountingRail Coordinate
Dimension
DT_Code MR
DT_Counter
EPN
Id
Plug PlaneMounted
Socket =$DT_Code + $DT_Counter
abstractPowerSupply Device Coordinate
DeviceTag =$DT_Code + $DT_Counter
DT_Code
DT_Counter
EPN
Mate
Plug
Width
abstractPLCDevice Device Coordinate
DeviceTag =$DT_Code + $DT_Counter
DT_Code
DT_Counter
EPN
Mate
Plug
Width
abstractTerminal Device Coordinate
EPN
Plug
Position
abstractWireDuct WireDuct Coordinate
Dimension
EPN
Plug PlaneMounted

Specific components:

Component Super class Parameters Value
EndBracket_PxC_3022276 abstractEndBracket EPN PXC.3022276
Plug MR2
TS35_7_5 abstractMountingRail Coordinate
Dimension =List{329.0,0}
DT_Counter =mc.mos('T_Mechatronic_ModularSystem.ECAD.ProPanel.TS35_7_5').indexOf(this)+1
EPN TS 35_7,5
Id 15102.2.2;0;0
PowerSupply_PxC_2938581 abstractPowerSupply DT_Code T
DT_Counter =if(not(origin.isNull())) then dc.dos('T_Mechatronic_ModularSystem.ECAD.ProPanel.abstractPowerSupply').indexOf(this)+1 else '**Calculation is performed only in discipline structure**' endif
EPN PXC.2938581
Plug MR1
PxC_IL_24_DI abstractPLCDevice DT_Code Q
DT_Counter =if(not(origin.isNull())) then dc.dos('T_Mechatronic_ModularSystem.ECAD.ProPanel.abstractPLCDevice').indexOf(this)+1 else '**Calculation is performed only in discipline structure**' endif
EPN PXC.2861221
Mate =List{'M4','M2',-2.4}
Plug MR1
PxC_IL_PB_DP abstractPLCDevice DT_Code Q
DT_Counter =if(not(origin.isNull())) then dc.dos('T_Mechatronic_ModularSystem.ECAD.ProPanel.abstractPLCDevice').indexOf(this)+1 else '**Calculation is performed only in discipline structure**' endif
EPN PXC.2862246
Plug MR1
Width =p8dbquery($EPN,'1',22013)
Terminal_PxC_3031212 abstractTerminal EPN PXC.3031212
Plug MR2
KK3040 abstractWireDuct Dimension =List{329.0,0}
EPN KK3040
KK3060 abstractWireDuct Dimension =List{420.0,90}
EPN KK3060

Explanation of the formulas:

A formula is used for the DT_Counter parameter of the mounting rails that navigates via mc to the superordinate mechatronic component and uses mos(‘<type of discipline component>') to collect all subordinate components of the same type as the discipline component. These discipline components are saved in a collection that is accessed via indexOf(this) to determine the position of the current discipline component in the collection. The result of this formula is used for the value of the socket and therefore has to be determined in the mechatronic structure so that the discipline components can reference these in the subsequent calculation.

A formula is used for the DT_Counter parameter of all the devices to be placed on the mounting rails that navigates via dc to the superordinate discipline component and uses dos(‘<type of discipline component>') to collect all subordinate components of the same type as the discipline component. These discipline components are saved in a collection that is accessed via indexOf(this) to determine the position of the current discipline component in the collection. Since the value cannot be determined in the mechatronic structure, if(not(origin.isNull()) is used to query whether the component is located in the mechatronic or discipline-specific structure. In the case of the mechatronic structure the text '**Calculation is performed only in discipline structure**' is displayed instead of an error message.

The values for DeviceTag are assembled from the parameter values for DT_Code and DT_Counter, so that the value A2 is calculated for the PLC component PxC_IL_PB_DP.

The Dimension parameter receives a list containing two values that correspond to the length and the angle, respectively. For example, =List{329.0,0} supplies a length of 329.0 mm and an angle of 0 degrees.

For the Width parameter, =p8dbquery is used to initiate a database query to the EPLAN Electric P8 parts database. As arguments for the query, $EPN is sent to the parts database as the value of the EPN parameter, and '1',22013 as the field number for the width.

Tip:

If field contents are to be queried by the parts database that cannot be accessed via p8dbquery, it is advisable to convert the parts database into an SQL database. SQL database queries that return the desired result must then be inserted into the formulas of the parameters.