DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Text Basic Math Evaluation

Can someone point me to documentation for scripting in DIAdem?  I'm trying to do a basic evaluation (shown below) 

 

 

If (@@Str(Data.GetChannel("PilotData/Frequency Drift").Properties("minimum").Value - Data.GetChannel("PilotData/Frequency Drift").Properties("maximum").Value, "AutoAdj")@@) > @@(2235.97E6*.00002)@@ Then
@@Str("FAIL")@@
Else
@@Str("PASS")@@
End If

 

This is in a text object in the report section.  basically I want to evaluate the math and if it's true, print out "FAIL", otherwise print "PASS"

 

Thanks in advance.

0 Kudos
Message 1 of 3
(4,950 Views)

I made some modifications:

 

IIf(@@Data.GetChannel("PilotData/Frequency Drift").Properties("minimum").Value - Data.GetChannel("PilotData/Frequency Drift").Properties("maximum").Value@@ > @@(2235.97E6*.00002)@@,"FAIL","PASS")

 

The above evaluates to this:

 

IIf(0 > 44719.4,"FAIL","PASS")

 

I want it to evaluate to:

 

PASS

0 Kudos
Message 2 of 3
(4,948 Views)

Hi plasmaphase,

 

You just need the @@ symbols to the left and the right of the IIF() function, NOT inside it:

 

@@IIf(Data.GetChannel("PilotData/Frequency Drift").Properties("minimum").Value
    - Data.GetChannel("PilotData/Frequency Drift").Properties("maximum").Value
    > (2235.97E6*.00002),"FAIL","PASS")@@

 

You need to have a "Frequency Drift" channel in the "PilotData" group in the Data Portal for this to work.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 3 of 3
(4,925 Views)