DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How to import a complex waveform in Diadem

I have a TDMS file storing a complex double waveform. I/Q data obtained from a USRP. 

Is it possible to read these files in Diadem ? Complex data seems to be main issue. 

 

Thanks for the help,

 

Laurent

0 Kudos
Message 1 of 5
(3,735 Views)

You are right. Actually is not able to load complex channels from TDMS files.

0 Kudos
Message 2 of 5
(3,712 Views)

Starting from DIAdem 2017 there is a pipe that transports the data as double channel if requested so. This enables work with the data even if not natively supported. A script is needed to access the complex channels.

"<tunnelcomplex>yes</tunnelcomplex>"

must be given as additional parameter.

Option Explicit

dim filepath : filepath = "C:\testData\tdms\Complexs.tdms"

dim plgParam : plgParam = "<filename readonly=""yes"">" & replace(filepath, "&", "&amp;") & "</filename>" &_
  "<tunnelcomplex>yes</tunnelcomplex>"
  
data.root.clear
DataFileLoad(plgParam)
dim rCh : set rCh = data.Root.ChannelGroups(1).Channels("C1")
dim iCh : set iCh = SplitComplexChannel(rCh)
  
function SplitComplexChannel(byRef mixCh)
  set SplitComplexChannel = nothing
  
  dim imgCh : set imgCh = mixCh.ChannelGroup.Channels.AddChannel(mixCh)
  imgCh.name = mixCh.name & "_i"
  mixCh.name = mixCh.name & "_r"
  Data.Move imgCh,  mixCh.ChannelGroup.Channels, mixCh.Properties("groupindex").Value + 1
  dim maxindex : maxindex = CLng(mixCh.Size / 2) - 1
  dim i : for i = 0 to maxindex
    mixCh(i * 2 + 1 + 1) = NOVALUE
    imgCh(i * 2 + 1) = NOVALUE
  Next
  Call ChnNovHandle(mixCh.GetReference(eRefTypeIndexIndex),"","Delete","X",1,1,0)  
  Call ChnNovHandle(imgCh.GetReference(eRefTypeIndexIndex),"","Delete","X",1,1,0)  

  set SplitComplexChannel = imgCh
end function

I added a script method to split a channel.

SplitComplexChannel
0 Kudos
Message 3 of 5
(2,673 Views)

How one can obtain Diadem 2017? The download page only has Diadem 2015.

 

0 Kudos
Message 4 of 5
(2,656 Views)

Hello Fedor,

 

DIAdem 2017 is currently announced for sometime around June of 2017.

 

You can sign up for the beta test program and get access to a pre-release version for testing here:

 

http://www.ni.com/beta

 

 

Otmar D. Foehner
0 Kudos
Message 5 of 5
(2,651 Views)