Hi arkangel,
There was a change in the behavior of the ChnAlloc() function in DIAdem 9.1 SP2b, which I'm guessing you have. In the SP2b version, including group information in the channel name parameter of ChnAlloc() no longer sends the new channel to that group. What has NOT changed is that the second to last parameter in the ChnAlloc() function is the TargetGroupIndex, so this is where your "i" variable should go. Or alternatively you can Call GroupDefaultSet(i) inside the loop.
for i=1 to groupcount
Call ChnAlloc("X2", cl("["&i&"]/time"), 1, DataTypeFloat64, "Numeric", i)
next
<OR>
for i=1 to groupcount
call GroupDefaultSet(i)
call chnalloc("["&i&"]/X2",cl("["&i&"]/time"))
next
Either way will work in any DIAdem 9.x,
Brad Turpin
DIAdem Product Support Engineer
National Instruments