11-21-2012 08:57 PM
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.
11-22-2012 02:01 AM
This?
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.
11-23-2012 07:21 AM
Thanks Bill.
I understand