LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extract Data from Digital Waveforms

I am using the LabVIEW JTAG library that I found on this site along with a PXIe-6535. I can now get the ID from my device, but the data is five channels of waveform data. One channel is a clock, and the other four channels are data. I'm really only interested in the TDO channel. I would like to convert the data from waveform data to the actual data. Right now I convert the data to arrays of booleans, and then loop through the clock array until I see a rising edge, then I check the data array to see what the value is. It works fine, but I just can't help but feel there is a better way to do this. I looked through the waveform functions, and didn't see anything..

 

Does anyone have a suggestions on how to more efficiently extract the data from a group of waveforms like those described?

0 Kudos
Message 1 of 9
(4,164 Views)
go to sig manip it is in express branch you can find some tools like Split Signals Function
they may help you
0 Kudos
Message 2 of 9
(4,132 Views)

Hi Jo-Jo,

 

how to more efficiently extract the data from a group of waveforms

It would help to see your VI before giving recommendations on improvements…

 

@Hatef:

How does converting an array of waveforms to DDT wires makes anything "more efficient"?

Please explain why you suggested to use an ExpressVI here…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 9
(4,121 Views)

Gerdw
as I told before they may help you so they may not too 🙂
but How does converting an array of waveforms
when you select Convert to Dynamic Data Express VI it let to select type of your waveform you can select 2d array of scalar and after that you can marge them easily so with just two vi may you could solve the problem  isn't true ?

0 Kudos
Message 4 of 9
(4,107 Views)

Hi Hatef,

 

when datatype conversion is your main concern I would suggest to read the data as 2D array instead of 1D array of waveforms…

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 9
(4,084 Views)
GerdW
thank you for answer it think both method are in same level for solve problem just that because we are face with waveform it is better to work with waveform tools in this case for post processing of signals we will more comfort to use appropriate vis
0 Kudos
Message 6 of 9
(4,073 Views)

Here is what I am currently using. It works fine, but it isn't seem very elegant:

 

VI.png

 

 

If it isn't obvious from looking at it, what I am doing is sampling channel 0 (data), when channel 4 (clock) transitions from low to high.

0 Kudos
Message 7 of 9
(4,048 Views)

Hi Jo-Jo,

 

If you know which index the clock signal is located, I would think you could check the clock signal for that edge, and then index your channel signal for the value corresponding to the rising edge. It sounds like this is what you're doing, so although it is not elegant, it is effective.

0 Kudos
Message 8 of 9
(4,003 Views)

The 6535 has change detection as a feature. Change your sample mode to change detect on the clock line, which will only sample the data lines in your task when a change is detected on the data line. This will remove any need for SW processing of the data afterwards and only return data as your clock strobes. May be worth testing to see if it gives you the desired behavior you are looking for in your application.

Kyle A.
National Instruments
Senior Applications Engineer
0 Kudos
Message 9 of 9
(3,839 Views)