04-12-2006 11:21 AM
04-13-2006 08:54 AM
Hi bm2cox,
It sounds to me like you are mixing two issues. You say that you are having trouble "having more than 60 channels" and then describe the difficulty as "I can not specify the max channel length".
Do I gather correctly that you are wanting to do the appending of the new values by loading the original data set into DIAdem, writing a few new values under each original channel, then saving the data set back to the TDM file in its original location on disk?
One problem you will run into with this method is that when you load a data set from disk, DIAdem will automatically set the maximum length of each channel loaded to the number of values declared in the TDM header for that channel. So first you have to lengthen each channel before you can append to it:
NumNewValues = 100
Call DataDelall
Call DataFileLoad(".\libr\dat\Example.TDM")
FOR j = 1 TO GlobUsedChn
NumOldValues = ChnLength(j)
Call ChnReAlloc(j, ChnLength(j) + NumNewValues)
ChnLength(j) = NumOldValues + NumNewValues
FOR i = 1 TO NumNewValues
ChDX(NumOldValues + i, j) = CDbl(j + i - 1)
NEXT ' i
NEXT ' j
Call WndShow("VIEW")
Ask if you have further questions,
Brad Turpin
Product Support Engineer
National Instruments
04-13-2006 09:40 AM
04-14-2006 01:18 PM
04-17-2006 10:10 AM
Hi bm2cox,
Right, this was more difficult in older DIAdem versions. If you just create a new Group with identically named channels and populate them with the new values, you can use a posted example to append them to the bottom of the first set of channels (you read from the TDM file). You should run the VBScript "Concatenate Groups.VBS" once you have the 2 Groups set up:
Choose the 9.1 version if you have DIAdem 9.1,
Brad Turpin
Product Support Engineer
National Instruments