LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Serial Digital Waveform Data

All,

 

I have to create a serial interface for a project I am working on.  This serial data is being created from an array of 16 bit integers being read in from an XML file.  I have had the darndest time figuring out how to turn this 16 bit integer into a single line serial data stream.

 

I thought this would be an easy task, and I was surprised that this question hasn't been asked and answered already in this forum.

 

With the help of a NI FAE that rolled through town (Thanks Justin!), we came up with this solution.  I thought I would post it here to aid future users.

 

The real problem I had to work around is that the digital waveform creation object wants a 2D array to populate waveform.  I still don't have any idea why a 2D array is necessary.

 

Anyway, this is my solution.  I hope people find it useful. And if there is a better way than converting from U16 to Boolean to Array of 1:0's to 2D array to WFM, I would love to see it.

 

Create_Serial_Data.png

 

 

0 Kudos
Message 1 of 3
(2,307 Views)

This?

 

digital.png

 

Although changing the mode from LSB to MSB doesn't seem to work...always stuck in LSB mode....bug maybe?

 

And you need 2D data because row = sample value and column = signal.

0 Kudos
Message 2 of 3
(2,290 Views)

Thanks Bill. 

 

I understand

0 Kudos
Message 3 of 3
(2,274 Views)