LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to send 12 bit on serial port

I made some changes to your code and scattered some comments around.  Remember to keep wires flowing from left to right to ease readability.

 

1.  Yes, the build array method would increase the array indefinitely.  There is a way to create a history for an array.  I created one with an action engine method so the array is stored in a functional global variable, and it keeps track of the size of the array and overwrites old data.  I don't have an example of it here at home, and it would be a few days before I can find a copy at work to post an example.

2.  The problem with the waveform chart is related to the fact you are creating an array and sending it to it.  That array is coming from some convoluted code using a feedback node where you are converting an array to a digital waveform and back again.  Just wire the incoming data point to the waveform chart and it will add it a point at a time.



ziad h. wrote:

Another thing I wanted to be sure I understand it right, on the sending loop I should set the “digital waveform to binary” to U16 so that at the receiving part the chart (or graph) will read it as U32 ,but shouldn’t the receiving signal be different than the sent signal; since different points.



 
I don't know why you would be messing with a U32 at all in the receiving loop, and like the comment in #2, I don't know why you  are messing with the digital waveform/binary conversions in the receiving loop.

One caveat to what I am posting is that I don't have a chance to test it because I don't have a PC with 2 serial ports and a null modem cable to try it out.

0 Kudos
Message 11 of 12
(644 Views)

If I’m using an 8 bit ADC shell I use string to byte array U8 to plot the graph or use type cast.

In case of 12 bit ADC shell I use type cast and a one diminution array with 16 bit integer then plot it on the graph.

Because if that’s the case then I do not need an 8 bit to 16 bit arranging or calculation and I was on the wrong track.

 

0 Kudos
Message 12 of 12
(633 Views)