DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

reading independant values in a channel

Solved!
Go to solution

Hello,

 

I want to read the value of a chanel.

 

I suppose that every chanel is store like an array with an index and a value.

I would like to read a value of a chanel with his number index, then make some computations and then write in it.

 

For exemple:

Chanel 1:
index value
1           1
2           1
3           1
4           2
5           1
6           1

at beginning index = 0
value>1?
if no check the next one
if yes do something

Do you have an exemple of script to read a single value in a chanel?

 

Regards,

 

Frederic MANUEL

0 Kudos
Message 1 of 5
(4,927 Views)

Can you please let us know which DIAdem version you are using ?

Thanks

0 Kudos
Message 2 of 5
(4,925 Views)

sure 🙂

 

Its the evaluation version, 2012

 

 

0 Kudos
Message 3 of 5
(4,922 Views)
Solution
Accepted by topic author fmanuel

Ok, then this should work

 

Dim   oChn,K,dValue
' get access to the channel you are interested in
Set oChn = data.GetChannel("Time")

' loop over all values
For K = 1 To oChn.Size
  dValue = oChn(K)
  If ( dValue > 1 ) Then
    ' do something 
    MsgBox(" Value GT 1")
  End If
Next

0 Kudos
Message 4 of 5
(4,919 Views)

that is what i was searching, thank you for fast solution 😉

0 Kudos
Message 5 of 5
(4,915 Views)