10-09-2012 09:12 AM
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
Solved! Go to Solution.
10-09-2012 09:22 AM
Can you please let us know which DIAdem version you are using ?
Thanks
10-09-2012 09:49 AM
sure 🙂
Its the evaluation version, 2012
10-09-2012 10:00 AM
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
10-09-2012 10:11 AM
that is what i was searching, thank you for fast solution 😉