01-21-2013 02:04 AM
Hello,
I am using DIADem 2012.
I have two channel of type : TimeStemp, I want to unite them into one channel, for example:
my first channel(with values):
01/15/2013 16:44:33.1570 - 50
01/15/2013 16:44:33.1890 - 40
01/15/2013 16:44:33.2050 - 15
01/15/2013 16:44:33.2780 - 15
01/15/2013 16:44:33.3120 - 60
01/15/2013 16:44:33.3650 - 40
01/15/2013 16:44:33.4250 - 45
01/15/2013 16:44:33.4900 - 75
01/15/2013 16:44:33.5500 - 58
01/15/2013 16:44:33.6250 - 46
the time stemp and the values in the second channel are taken from the first one:
01/15/2013 16:44:33.1890 - 40
01/15/2013 16:44:33.3120 - 60
01/15/2013 16:44:33.4900 - 75
01/15/2013 16:44:33.6250 - 46
i want unite them in this way that i could get the total duration of the first one with the values of the second channel only and also get the same length of the first channel .
Maybe something like this:
01/15/2013 16:44:33.1570 - 40
01/15/2013 16:44:33.1890 - 40
01/15/2013 16:44:33.2050 - 40
01/15/2013 16:44:33.2780 - 40
01/15/2013 16:44:33.3120 - 60
01/15/2013 16:44:33.3650 - 60
01/15/2013 16:44:33.4250 - 60
01/15/2013 16:44:33.4900 - 75
01/15/2013 16:44:33.5500 - 75
01/15/2013 16:44:33.6250 - 46
Can i do it with the math function for calculator instead of script?
Thanks and waiting for reply
01-21-2013 01:53 PM
Hi Oz,
Please submit a sample data file, it is still not clear to me which information is in which channel and how many channels there are and how many you want to end up with.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
01-21-2013 04:52 PM
Hello brad,
I attached a tdms file.
First channel is the general timestamp, second group have timestamp that are taken from the general channel with data channel with values,the last channel is the channel i want to create.
At the end i want to present the general timestamp with the last channel in Two-dimensional graph
Thanks
01-22-2013 04:37 PM - edited 01-22-2013 04:39 PM
I am also having the same question: How to connect two channels into one (that is, concatenate channels)?
For small files, the DataBlClpCopy() and DataBlClpPaste() could be used, but I would need to do tens (if not hundreds) of similar operations each time. It will be difficult to track row numbers of each operation.
Any better way to do a whole channel operation?
Thanks!
01-23-2013 02:56 AM - edited 01-23-2013 02:57 AM
Hello Zhi_lu,
for the concatenation of the channels an example code exists (in the HELP, at least from Diadem 2011 on), just test it.
The script does the same as DataBlClpCopy / -Paste, but automatically.
02-12-2013 05:36 PM
Hi OzShimon,
It sounds like you just need to use the ANALYSIS function "Linear Mapping" found in the curve fitting palette. Why are your datetime values in the TDMS file negative?
Brad Turpin
DIAdem Product Support Engineer
National Instruments
02-12-2013 05:41 PM
Hi Zhi_lu,
If you want to concatenate the full contents of ChannelA at the end of the full contents of ChannelB, you should use the following commands (assuming they're each called "Timestamp" and stored in Groups 1 and 2 respectively):
Set ChannelA = Data.Root.ChannelGroups(1).Channels("Timestamp") Set ChannelB = Data.Root.ChannelGroups(2).Channels("Timestamp") Call ChnConcat(ChannelA, ChannelB)
Brad Turpin
DIAdem Product Support Engineer
National Instruments