DIAdem Help

Content Type
Programming Language
Current manual
Table of Contents

Command: ValMin

Display all  Hide all

Command: ValMin

Determines the smaller of two numbers.

ReturnValue = ValMin(Value, Value)

Input Parameters

Value Specifies the first numeric value.
Value Specifies the second numeric value.

Return Parameters

ReturnValue The return value is a Floating-point number type.

Example

The following example determines the lower of the two variables MyValue1 and MyValue2.

VBScriptPython

 

Dim MyValue1, MyValue2, intMyResult
MyValue1 = Pi
MyValue2 = e
intMyResult = ValMin(MyValue1,MyValue2)    'intMyResult = 2.71828182845905

The following example determines the lower value in each line of the Group1/Input and Group1/Reference data channels and saves the results in the Group2/Result data channel.

VBScriptPython

 

Call Calculate ("Ch(""Group2/Result"")= ValMin (Ch(""Group1/Input""),Ch(""Group1/Reference""))")
 
Note  You must use the Calculate command in scripts to calculate data channels with formulas. Compute the data channels according to the syntax in the Calculator. Refer to the procedures Executing Channel Calculations in the Calculator and Assigning a Value to a Variable in the Calculator for more information about the Calculator. Use the MinV command instead of ValMin when you calculate quantity-based.

Related Topics

Command: ValEqual | Command: ValEqualGT | Command: ValEqualLT | Command: ValGT | Command: ValLT | Command: ValMax | Function: MaxV | Function: MinV

Was this information helpful?