DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

I want to fix indexes to canals to make calculations ?

Hello,
I have to make timings calculations between several canals ( i must calculate times between a value canal and an other value canal).
To realise it, i must affect indexes to the canals.
 
Could someone explain me how to do this ?
 
Greetings
0 Kudos
Message 1 of 3
(3,408 Views)

Every channel in DIAdem has a name and an index.

You can see the index of a given channel when looking at the data portal. Just klick on a channel and look in the lower right corner.

Most of the time you can make your calculations by using the channel name, but sometimes (e.g. ChDx) you have to use the channel number.

0 Kudos
Message 2 of 3
(3,398 Views)
Hi K9,

This example shows how to process a fast channel calculation (it's one possible way to do that). In this case a loop is running over a channel groups and calculates the differece between the tow first channels. Feel free to modify it and to use the DIAdem help to get detailed infos about the used functions.

call GroupCreate("Result")
call GroupDefaultSet(GroupIndexGet("Result"))

for iLoop = 1 to GroupCount - 1
  L1 = CnoXGet(iLoop, 1) ' First channel for FormulaCalc
  L2 = CnoXGet(iLoop, 2) ' Second channel for FormulaCalc
  T1 = "MyDiff" & str(iLoop) ' new channel name
  call chnAlloc(T1, val(ChnPropGet(L1, "length"))) ' create a new channel
  call FormulaCalc("ch(" & T1 & ") := ch(L1) - ch(L2)") ' calculation
next

Greetings

Walter
Message 3 of 3
(3,396 Views)