Example Code

Calculation Manager Example Using VB Script in DIAdem

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • Diadem

Code and Documents

Attachment

Description

This example shows you how DIAdem's calculation manager can be automated in VBScript. The calculation manager is an analysis function of DIAdem, which is useful for representing mathematical operations in text-type formulations. For example, the variables X and Y and the resulting value Z can be entered into the equation (ex. X+Y=Z). Calculation formulas can be saved with the extension file(.tca). When implemented to VB Script, automation can be maintained by modifying only the .tca file without modifiying VB Script.

 

 

 

How to Use

  1. Open the Script tab of the DIAdem.
  2. Run the script, Calculation_Example.VBS in attached file.
  3. This VBS automatically calls Calculation_Manager_Example.TCA, the Calculation manager file of DIAdem.
  4. The two operations stored in the .TCA file generate two result channels, plusResult and mimusResult, in Channel group 1.

The following settings are stored in the Calculation Manager file:

Note : The calculation manager for DIADem can be found at: DIAdem Analysis >> Calculation manager

 

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors