01-31-2014 11:04 AM
I did a search, and didn't find the answer to what is probably a simple question. (Or maybe it was there, but Meine Deutsch ist schlect...)
I have a long record (computer issues during data aquisition) that I would like to break into 3 different records. First, I am going to try to get my terms straight, hopefully.
Each channelgroup has 15 channels of data (5 accelerometers x 3 axes).
I would like to copy all 15 channels from one single channelgroup(?), make 3 new channel groups and copy the segments of all 15 channels into the new channelgroup. Hope this is clear.
Here is the basic idea of what I'm attempting:
Call Data.Root.ChannelGroups.Add("Record#2", 2).Activate()
Call DataBlClpCopy (Data.Root.ChannelGroups(1), 1, 40000)
Call DataBlClpPaste (Data.Root.ChannelGroups(2),1)
Then do this two more times, adding a new channelgroup, and copying a different range.
Thanks for any help you can provide. I have not done any coding in...years..., and I think the last time I did, it was fortran, so I'm not really familiar with object oriented coding except on a very high (and very fuzzy) level.
02-01-2014 10:27 AM
Hi Worldtraveller,
I can help you with the coding, and you're on the right track with those commands, but there are more efficient commands I'll suggest. I'm curious to step back and ask about the bigger picture here. Will you only do this operation once, or do/will you have other large files like this which you would/will want to split into different groups? Also, how are you determining the end of block 1 and the beginning of block 2? Is this something only a human can decide, or could the program figure this out based on some concrete criterion?
Would it be possible for you send me this large data set or post it to the NI ftp site? If you only need to do this once, it would be easiest for me to just do it for you...
Brad Turpin
DIAdem Product Support Engineer
National Instruments
brad.turpin@ni.com
02-03-2014 09:01 AM
Thanks for the reply. I actually solved it in a completely different way.
I pretty much copied the whole datagroup (15 channels) three times, and selectively deleted the different parts of each group to get the section I was interested in.
To answer your questions:
Will you only do this operation once, or do/will you have other large files like this which you would/will want to split into different groups?
- In this case, I only had a single channelgroup with 15 channels, so it was a little repetitive.
Also, how are you determining the end of block 1 and the beginning of block 2? Is this something only a human can decide, or could the program figure this out based on some concrete criterion?
- I had already figured the cut points, and it was pretty much something I had to determine, based on other similar tests we did. It was easy enough to look at the raw data and figure out where the break points where (I'm looking at transitions of flight modes on a helicopter, and it's pretty easy to spot the changes.)