I am writing a script which will take one data channel which has a repeating test sequence of 90 cycles. I'd like to separate the data into 90 separate channels, one for each test cycle.
I've created the new channels and copied the data, but when the data is copied into the new channel it overwrites the channel's name with the original channel name +1.
Is there a way of just copying the data, not the name as well?
dim i, j, n
Call DataBlClpCopy("/P3_CL 1 PRESSURE [Bar]",i,j)
Call Data.Root.ChannelGroups(1).Channels.Add("Clutch 1 -" &" " & n,DataTypeFloat64,30)
Call DataBlClpPaste("/Clutch 1 -" &" " & n,1,j)
Solved! Go to Solution.
dim i, j, n i=1 j=900 n=001 Dim newChnl, newChnlName newChnlName = "Clutch 1 -" &" " & n Call DataBlClpCopy("/travel",i,j) Set newChnl = Data.Root.ChannelGroups(1).Channels.Add(newChnlName,DataTypeFloat64, 30) Call DataBlClpPaste("/Clutch 1 -" &" " & n,1,j) newChnl.Name = newChnlName
Make sure your destination index (where you have "30") is good. I never use this parameter.