LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Analog data decoder

Newbie needs help please. I checked the previous questions and answers but did not see exactly what I am looking for. This is a little over my head and I could use some help from all the resident experts who like a challenge (small one that is). I am trying to develop two items: 1- Analog serial data generator and 2- Analog serial data decoder. Using LabVIEW 8.2. No RS-232 or any other type of communication ports will be utilized....only dummy vis and analog inputs from a DAQ.
 
For the generator, I need to develop a dummy vi that will generate the following: Data will be as follows and in this order: Sync (600mS) ~4.7-4.9V, Data1 (1.2Sec) ~0-4.5V, Data2 through Data 18 is the same as Data 1 but of varying levels. After Last Data bit, another sync pulse will automatically begin followed by its associated data. The data should be via the roll of the dice to vary the levels. It would be nice to have a CONTINUOUS and a ONE SHOT button for this generator. This dummy vi generator will be connected to a vi decoder. No real analog voltage levels have to be generated....just the serial data stream info.
 
The decoder is obviously very close to the generator. I should be able to use two types of data source....dummy from above generator and real data. I will receive REAL data via a PXI-4224 DAQ only. I have no choice but to use the DAQ for the input stream. Data also will be as follows and in this order: Sync (600mS) ~4.7-4.9V, Data1 (1.2Sec) ~0-4.5V, Data2 through Data 18 is the same as Data 1. After Last Data bit, another sync pulse will automatically begin. I would like to capture this data stream first, decode (and put in a array or Cluster) and then display it on a graph of some type. I guess it would be nice to sample the received data somewhere in the middle of the 1.2Sec pulse to preclude errors from other pulses. No problem with averaging....it would be a plus.
 
Attached is my feeble attempt at a generator but the sync pulse is displayed wrong. Obviously due to my poor understanding of charts and graphs. My generator might just work if I had some help from you guys, however feel free to develop a better one on your own.
 
The decoder is via some NI help, and it would probably work OK if I knew how to develop my own waveform data from a vi (or real data) generator.
0 Kudos
Message 1 of 3
(3,129 Views)
Did not see my attachments. I will try and get them in now.
Download All
0 Kudos
Message 2 of 3
(3,124 Views)
UFO182,

I would do a lot of playing around with For Loops and the array functions to get a feel for how they work.  Also check out the LabVIEW Help regarding for loops and array functions, as well as graphs -- there is a lot of good info.

In the VI where you generate data, I don't see why you generate the values one at a time, you could generate an entire array of random numbers in an auto indexing for loop at once, then do whatever you want with the data.  Also, I didn't quite understand what voltage levels represented a logic 0 and a logic 1.  It seems that you should be able to sample at 1.2 seconds using an analog start trigger and then check each value against a threshold, or at a higher sample rate if you want to check more than a single sample, then create a simple binary array of your overall frame.  You could then have a 2-D array of these frames.


Doug M
Applications Engineer
National Instruments
For those unfamiliar with NBC's The Office, my icon is NOT a picture of me 🙂
0 Kudos
Message 3 of 3
(3,094 Views)