From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Visualizing 16 bit digital data on one DI line?

Solved!
Go to solution

I have been trying to loop back this digital data using one DO pin and one DI pin.

I have an analog signal having 15000 samples. I have converted it into a 16 bit digital waveform using analog to digital VI. The waveform graph at input side shows me 16 lines. While transmitting I have made line grouping as "one channel for all lines". I am writing this data into DO 1. But while receiving in loop back using one DI pin I am not getting what I have transmitted. I have made the "line grouping setting" same as the transmitter.

I am attaching both of my tx and rx vi's. 

Download All
0 Kudos
Message 1 of 36
(2,612 Views)

Hi maverikk,

 

I am attaching both of my tx and rx vi's. 

No, you don't…

All we got are two images of some block diagram of some VIs. How should we debug images?

 

Please do these steps:

1. Run your VIs.

2. Edit menu -> set current values as default

3. Save the VIs

4. Attach the VIs.

This way we get your VIs and your actual data…

 

I have converted it into a 16 bit digital waveform using analog to digital VI.

A 16bit digital waveform requires to use 16 digital channels…

 

I have been trying to loop back this digital data using one DO pin and one DI pin.

This somehow conflicts with your 16 bit digital waveform…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 36
(2,598 Views)

Hi GerdW,

Sorry, my bad. Here are the VIs.

Download All
0 Kudos
Message 3 of 36
(2,593 Views)

Hi maverikk,

 

unfortunately you didn't include the data in your VIs…

But well: it's like I wrote in message #2: you create a digital waveform for 16 DO channels, but you only read in one DI channel. That's a mismatch!

 

If you really want to use just one DO and one DI you need to serialize your data in the Tx routine and deserialize it in the Rx part!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 36
(2,585 Views)

Hi GerdW,

Thank you for replying so soon and bearing with my problem. Yes I want to use just one DO line and only one DI line. Please tell me how can I serialize and deserialize  this data. I am using PXIe-6366 which 24 DIO lines.

0 Kudos
Message 5 of 36
(2,577 Views)

Hi maverikk,

 

a simple serializer will work like this:

check.png

The result is a 1D array of bits…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 36
(2,574 Views)

@maverikk wrote:

Hi GerdW,

Thank you for replying so soon and bearing with my problem. Yes I want to use just one DO line and only one DI line. Please tell me how can I serialize and deserialize  this data. I am using PXIe-6366 which 24 DIO lines.


I do not know if that device is fast enough.

 

Assuming you want to handle up 20kHz signal and sampling the signal 100 times faster then the highest freq. component, then representing that as 16 bits means you have to drive the output and sample the input at more than 50MHz. I managed to get it up to 200MHz with the right High-speed I/O widget but the code was not trivial and I think it took a day or two to implement the code such that the processing could keep up with the data rate. I did attempt 400 MHz but that was a goal too far.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 36
(2,569 Views)

@Ben wrote:

@maverikk wrote:

Hi GerdW,

Thank you for replying so soon and bearing with my problem. Yes I want to use just one DO line and only one DI line. Please tell me how can I serialize and deserialize  this data. I am using PXIe-6366 which 24 DIO lines.


I do not know if that device is fast enough.

 .... I managed to get it up to 200MHz with the right High-speed I/O widget but the code was not trivial and I think it took a day or two to implement the code such that the processing could keep up with the data rate. I did attempt 400 MHz but that was a goal too far.

 

Ben


Correction!

 

That project I was thinking of required de-muxing two channels from digital stereo microphone and I had to over-sample since the data for each channel was clocked on both the rising and falling edges of a clock.

 

But do some math to figure just how fast you DIO lines have to transition to determine if your widget is ffast enough.

 

Ben 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 8 of 36
(2,564 Views)

After remembering that NI developed code for PDM I did a search and found this example.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 9 of 36
(2,544 Views)

Hi GerdW,

Attached are the tx and rx VIs. This time I have saved the current values 'as default'. Actually I have a .mat file which is having 15k samples ranging from -1 to +1. I want to do loop back test by digitizing it into 16 bit binary and send it via one DO line and receive it on a DI line. So in LabVIEW I called my .mat file using matlab script and used analog to digital vi to convert it to 16 bit digital format. Now while transmitting, line mismatch problem is occurring. And I am failing in basically whatever I am trying to remove this error. I tried making line grouping as "one channel for all lines" in both tx and rx side. The data is getting transmitted without any error but  at the DI I am not receiving anything.

Download All
0 Kudos
Message 10 of 36
(2,517 Views)