DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

NO VALUE/ NO CHANGE, MARKERS, VIEW MODE

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.

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

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

 

Jared A.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(4,396 Views)

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

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