All formulas will fail due to the encapsulation of the discipline components and the usage of interface parameters.
Modifying formulas for the component M_WiringDiagram
- Open the component M_WiringDiagram.
- Switch to the Parameter editor page.
- For the Plant parameter, enter the following value:
=mc.$Plant
- Save the component.
The formula =mc.$Plant requires that a Plant parameter exists in the higher-level component, meaning the Feeder component and that it supplies a suitable value. This parameter must still be inserted in the Feeder and have a value assigned to it.
Creating a plant parameter and inserting it into Feeder
- Select the Parameter unit.
- Select New > Parameter in the shortcut menu.
- Specify the Plant name.
- Specify the String type.
- Save the parameter.
Insert the Plant parameter into the Feeder component.
- Open the Feeder component.
- Open the Parameters editor page.
- Drag the Plant parameter from the Parameter unit into the editor page.
- Enter the ='Feeder’ formula as the value.
- Save the component.
Modifying formulas for the component M_SchematicPage
- Open the component M_SchematicPage.
- Switch to the Parameter editor page.
- Enter the following values for the parameters:
Name | Value |
---|---|
Functiontext1 | =if (mroot.mos('ISensor',4).size > $PageNo * 8 + 0) then mroot.mos('ISensor',4).at($PageNo * 8 + 0).$Functiontext else '' endif |
Functiontext2 | =if (mroot.mos('ISensor',4).size > $PageNo * 8 + 1) then mroot.mos('ISensor',4).at($PageNo * 8 + 1).$Functiontext else '' endif |
Functiontext3 | =if (mroot.mos('ISensor',4).size > $PageNo * 8 + 2) then mroot.mos('ISensor',4).at($PageNo * 8 + 2).$Functiontext else '' endif |
Functiontext4 | =if (mroot.mos('ISensor',4).size > $PageNo * 8 + 3) then mroot.mos('ISensor',4).at($PageNo * 8 + 3).$Functiontext else '' endif |
Functiontext5 | =if (mroot.mos('ISensor',4).size > $PageNo * 8 + 4) then mroot.mos('ISensor',4).at($PageNo * 8 + 4).$Functiontext else '' endif |
Functiontext6 | =if (mroot.mos('ISensor',4).size > $PageNo * 8 + 5) then mroot.mos('ISensor',4).at($PageNo * 8 + 5).$Functiontext else '' endif |
Functiontext7 | =if (mroot.mos('ISensor',4).size > $PageNo * 8 + 6) then mroot.mos('ISensor',4).at($PageNo * 8 + 6).$Functiontext else '' endif |
Functiontext8 | =if (mroot.mos('ISensor',4).size > $PageNo * 8 + 7) then mroot.mos('ISensor',4).at($PageNo * 8 + 7).$Functiontext else '' endif |
Input1 | ='I' + $PageNo + '.0' |
Input2 | ='I' + $PageNo + '.1' |
Input3 | ='I' + $PageNo + '.2' |
Input4 | ='I' + $PageNo + '.3' |
Input5 | ='I' + $PageNo + '.4' |
Input6 | ='I' + $PageNo + '.5' |
Input7 | ='I' + $PageNo + '.6' |
Input8 | ='I' + $PageNo + '.7' |
PageDescription | ='PLC_Sensors_' + ((($PageNo + 1) * 8) - 7) + '_' + (($PageNo + 1) * 8) |
PageNo | =mc.mos('ISchematicPage').indexOf(this) |
Plant | =mc.$Plant |
- Save the component.
Modifying formulas for the components M_Sensor_Inductive, M_Sensor_optical and M_Sensor_Pressure
- Open the component M_Sensor_Inductive.
- Switch to the Parameter editor page.
- Enter the following values for the parameters:
Name | Value |
---|---|
DT | ='S' + ($Sensors.indexOf(origin.ifNull(this))+1) |
Functiontext | =mc.absoluteName.substring(mroot.absoluteName.size+1, mc.absoluteName.size - 1).replaceAll('\\.',' ') |
IP | ='I' + (mroot.mos('ISensor',4).indexOf(this) / 8) + '.' + mroot.mos('ISensor',4).indexOf(this).mod(8) |
Sensors | =mroot.rmos('T_ECAD_P8.ECAD.PLC_Inputs.abstract_Sensor') |
- Save the component.
- Repeat Steps 1 to 4 for the components M_Sensor_optical and M_Sensor_Pressure.