Working with Dependent Inputs
- Updated2024-09-12
- 3 minute(s) read
Mathematics > Working with Dependent Inputs
Working with Dependent Inputs
Use calculations to create and to execute templates for recurring, user-defined formulas.
In these formulas you connect inputs that reference values, variables, or channels and store the results in outputs that reference variables or channels. In these formulas you also can access the results of other calculations. To do so, you define an input that is dependent on the output of a different calculation.
To create a calculation that uses a dependent input complete the following steps:
![]() |
Note For this example, delete all the data in the Data Portal and load the data file Example.tdm from the user folder. |
Select DIAdem ANALYSIS.
-
Click Calculation Manager on the toolbar.
-
Click New to delete the current calculation set.
-
Click Add Calculation Group to create a new calculation group.
-
Enter the name of the calculation group in the subdialog box, for example, Distances, and click OK.
-
Click Add Calculation to create a new calculation.
-
Enter the name of the calculation, for example, Distance relative, in the subdialog box.
-
Click Add Input in the Inputs area to create an input for the calculation.
-
Enter t as the Name , select Channel as the Data Type, and select the channel [1]/Time as the Reference.
-
Click Add Input in the Inputs area to create an input for the calculation.
-
Enter t as the Name , select Channel as the Data Type, and select the channel [1]/Speed as the Reference.
-
Click Add Output in the Outputs area to create an output for the calculation.
-
Enter S as the Name , select Channel as the Data Type, and enter the channel [1]/Distance relative as the Reference.
-
Click Extended to switch the calculation into the extended mode.
-
Enter the Calculation script which calculates the integral of the speed:
Call ChnIntegrate(t, V, S) -
Select Quantity-based so that DIAdem includes the units of the input channels in the calculation.
-
Click Validate to check whether DIAdem can execute the calculation.
-
Click OK.
-
Click Add Calculation in the main dialog box to create a new calculation.
-
Enter the name of the calculation, for example, Distance absolute, in the subdialog box.
-
Click Add Input in the Inputs area to create an input for the calculation.
-
Enter Srel as the Name and click ... next to the name.
-
Select the Dependency of output S in the subdialog box. Select the Calculation group Distances, the Calculation Distance relative, and the Output S. Click OK to close the dialog box.
-
Click Add Input in the Inputs area to create an input for the calculation.
-
Enter SO as the Name, select Value as the Data Type, and click the input field in the Reference column to specify the value.
-
Reference the offset in the subdialog box. To do so, select Expression and enter 1200. Select the Unit symbol m for the unit. Click OK to close the dialog box.
-
Click Add Output in the Outputs area to create an output for the calculation.
-
Enter Sabs as the Name , select Channel as the Data Type, and enter [1]/Distance absolute as the Reference.
-
Enter the Formula that calculates the offset correction:
Sabs = Srel + SO -
Select Quantity-based so that DIAdem includes the units of the input channels in the calculation.
-
Click Validate to check whether DIAdem can execute the calculation.
-
Click OK.
-
Select the calculation Distance absolute in the calculation manager and then click Execute.
DIAdem first executes the Distance relative calculation because this calculation generates the S output, which the selected calculation requires. When the output S exists, DIAdem executes the calculation Distance absolute. -
Click OK.
