LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Shift register, Serial input parallel output

I would like to implement 16-bit serial input parallel output shift register (SR), for 8 channels. The data input is U8 1-D array from a binary file. The requirement is to split the 8-bits from each array element, and insert into the 8 SRs. All D0s should go to SR0, All D1s to SR1, and so on, till D7. After when the SRs are filled (i.e., when 16 byte elements from array are read and stored in the SRs' bits), the 16-bit data (from SRs) are intended to plot in a waveform graph. The process is required to loop till the end of the file. I am using LabVIEW8.0.

 

Can anyone shower some valuable clues to solve this problem? Any help will be highly appreciated. Thanks in advance.

0 Kudos
Message 1 of 5
(4,720 Views)

I'm going to guess that the way you are using the term "shift register" really doesn't mean the same thing as a shift register in LabVIEW.

 

Look at the example finder for examples such as Serial Read and Write.  Read two bytes.  Then use typecast to cast those two bytes of the string datatype to a U16.  Then use Number to Boolean Array to get an array of Booleans.  There is a Boolean to 1,0 function that you can feed the boolean array into to get an array consisting of 1's and 0's

 

Now your requirements get kind of confusing.  First yoiu say you are getting it from a serial port.  Then you say you want the process to loop until you get to the end of the file.  Is the data coming from a serial port or a file?

 

You also mention a parallel port output, but say you want the data to show on the waveform graph.  You can wire the array of 1's and 0's to a waveform graph, but I don't know if that is a normal way you would want to look at your data of 1's and 0's.

0 Kudos
Message 2 of 5
(4,710 Views)
Is this a real project, or a homework problem?
0 Kudos
Message 3 of 5
(4,703 Views)

Thanks for your reply Ravens. I meant the shift register as the logical shift register, text book kind.

In some other programs, I can easily read and plot little endian data (2 bytes, multi channel) from various sources, using 'Decimate 1D array'.

 

I am always reading the data from a binary file. I meant 'Serially' to array elements, one by one, in my ealier post. Sorry for being unclear. Therefore the operation must continue till the end of the file. Since the SR (shift register) is of SIPO (serial input parallel output) type, therefore the data must be fed serially, from each array elements, and read parallely.

 

Actually I am trying of decode 8-channel 16-bit ADC sample data, where each data point for all 8 channels are stored in 16 bytes. All D0s from 16-bytes chunk are required to combine to form Channel 0 data. Likewise for remaining 7 channels using D1-D7. If we split each incoming byte from the file (array) into 8-bits, and store in 8 different 16-bit SIPO SRs, after each 16-byte chunk will get 16-bit ADC data stored SRs (for all 8 channels). I intend to plot this extracted 8-channel 16-Bit data into charts/graphs.

0 Kudos
Message 4 of 5
(4,696 Views)

I'm a little confused as to what you are really trying to do here.  Reading a binary file and plotting the data on a graph is all pretty basic and trivial LabVIEW functions.  The example finder has many examples to show you how.  But you seem to want to do it in a way using electrical engineering terms and electronic constructions that really have nothing at all to do with LabVIEW the programming language.

 

For example, a shift register in LabVIEW is a type of tunnel on a while loop or For Loop that preserves the value of a piece of data to be used in the next iteration of that loop.

 Is this related to your earlier post?  It seems like you were already getting help there.

 

 

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

 

To see what LabVIEW is and does, learn the terminology, and be able to ask a more relative question in the future.

 

 

Message Edited by Ravens Fan on 06-14-2010 12:09 AM
0 Kudos
Message 5 of 5
(4,691 Views)