DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Unite two channels

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

 

 

 

 

 

 

 

0 Kudos
Message 1 of 7
(5,062 Views)

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

0 Kudos
Message 2 of 7
(5,038 Views)

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

0 Kudos
Message 3 of 7
(5,030 Views)

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!

0 Kudos
Message 4 of 7
(5,008 Views)

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.

0 Kudos
Message 5 of 7
(4,998 Views)

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

0 Kudos
Message 6 of 7
(4,920 Views)

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

0 Kudos
Message 7 of 7
(4,918 Views)