Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview Visa Usb VI

Solved!
Go to solution

I am sending an array of samples by using visa usb communication.The size of each sample is 12 bits, because of the resolution of the ADC and the buffer size

of the USB is 8 bits. The program must split each sample to two bytes (each sample should

be divided to the least and most valuable part) in order to use the USB buffer. There for each

sample occupies two buffers of the USB and it can send 32 samples of signal per each

transaction, because the USB port can just transact 64 bytes together at highest speed.I have developed a program to reconstruct analog signals from those samples.

If I send array consist of four different signals seperated by some special characters and I have to display four different signlas separated by special characters .Please suggest me any modifications in attached VI to separate four signals and display them.This attached vi is to display just one signal

0 Kudos
Message 1 of 2
(3,634 Views)
Solution
Accepted by topic author fahadalhassan1

Hi, you can parse the string and split it using the Search/Split String. The wire the output string to a string indicator. You can follow these steps to use this function:

 

  1. Add the Search/Split String function to the block diagram.
  2. Wire the string you want to split to the string input of the Search/Split String function.
  3. Enter the text that indicates where string should be split in the search string/char input of the Search/Split String function.
  4. In offset, enter the number of characters in string to skip before the Search/Split String function starts searching for the text in search string/char.
  5. Wire the substring before match and the match + rest of string outputs of the Search/Split String function to string indicators or VIs or functions that accept a string as an input.
  6. Run the VI.


Regards,


Miguel Fonseca

Applications Engineer

National Instruments

 

Message 2 of 2
(3,614 Views)