10-31-2012 09:32 AM
Hi.
I am using DIADEM 2012 and I want to know if there is any option that DIADEM can fill in automaticly cells that contain no data (NO VALUE) with the last value?
Further more if there is any option that DIADEM will mark new data again preferably in the VIEW mode.
for example:
Before:
Date Value
1 5
2 7
3 (NO CHANGE)
4 4
After:
Date Value
1 5
2 7
3 7 (NO CHANGE)
4 4 (MARK)
Looking forward for your help.
Shay.
11-01-2012 10:54 AM
Shay,
Here is an example I threw together that I believe will be a good start. I will encourage you to expand upon this script using ChnFlagSet to flag the rows that you would like.
Dim oChn,K,currentValue, lastValue lastValue = 0 ' get access to the channel you are interested in Set oChn = data.GetChannel("TestData") ' loop over all values For K = 1 To oChn.Size currentValue = oChn(K) If (IsNull(currentValue)) Then 'MsgBox("Changing oChn(" & K & ") NoValue to " & lastValue) oChn(K) = lastValue Else 'MsgBox("oChn(" & K & ") = " & currentValue) lastValue = currentValue End If Next
11-01-2012 04:06 PM
Hi Guys,
Or you can use the built-in ANALYSIS function to perform linear mapping with a "Stairs" (hold-value) parametrization:
Call ChnMapLinCalc("[1]/X-Channel", "[1]/Y-Channel", "[1]/X-Channel", "[1]/Y-Channel", 1, "Y[bound.value]", Null, "Stairs")
Brad Turpin
DIAdem Product Support Engineer
National Instruments