LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extract a channel from a digital waveform

Solved!
Go to solution

I am using the I2C Digital Waveform Reference Libarary to create a WDT that consists of two lines/channels.  I was wondering how I could extract/remove a channel from the waveform and how I can add/merge waveform channels into a single WDT?  I have looked around for VIs but nothing seems to work with the WDT.

 

Right now my WDT is like this:

 

WDT.png

 

waveform pic.png

 

How could I get these two lines into seperate WDTs?  And then how would I be able to merge them again?  Naturally, I don't want to simply remove them and merge them, but that would be a good practice example to demonstrate.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If someone helped you out, please select their post as the solution and/or give them Kudos!
0 Kudos
Message 1 of 2
(2,940 Views)
Solution
Accepted by topic author MrHappyAsthma

After much trial and frustration, I have found a way to do what I was looking for.  It isn't the most elegant, but it works!

 

This is how I extract both channels into an array, and then merge them back to recreate the original graph:

 

*Note:  The reason why there are 2's in the Waveform Data array is because my waveform contains 0's and Z's instead of 0's and 1's.  The tri-state Z corresponds to the numeric 2.

 

Conversion.JPG

 

output.JPG

 

I even took this a step further and extracted a single line.  This could be modified to extract any line and eventually merge together your own custom signals:

 

Extract channel.JPG

 

output2.JPG

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If someone helped you out, please select their post as the solution and/or give them Kudos!
Message 2 of 2
(2,909 Views)