04-22-2013 12:51 PM
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.
04-22-2013 01:06 PM
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
04-23-2013 10:21 AM
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