LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

parsing string data

Solved!
Go to solution

I am reading data packets from serial port using NI Visa. My data packet format is attached herewith. Every packet of data contains 2 ms worth of ADC data of a certain waveform (<=500 KHz).  How do I remove the header and footer and select the required data and display its spectrum for every packet. This has to be done continuously.

0 Kudos
Message 11 of 14
(1,002 Views)

Use "Match Pattern" from the string palette (and next time, I would start a new thread instead of tagging on to a 4-year-old thread that has already been marked "solved," you're liable to be missed/ignored).

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 12 of 14
(997 Views)

Thanks for your help Cameron. I have managed to extract the data string (by removing the header/footer) coming from the serial port. I am posting the VI here. Now I am facing two problems:

1.  The serial buffer data is not being read completely by the  while loop section(which further breaks down the serial HEX data strings into an array of HEX strings each containing four characters) which followis immediately. Data comes to serial buffer and timeout error is displayed before it can be completely read by the while loop section ahead. Although I have broken down the VI into two VIs and reading the data by logging it into a text file. This doesn't serve my purpose as i want it to be done in real time.

2.  Although I am able to read data pertaining to a single packet, I want to do it for several data packets for which I am unable to develop the logic.

 

Download All
0 Kudos
Message 13 of 14
(961 Views)

Hello,

 

It would be best to create a new forum post for this issue as it is unique from the origional post. As Camerond pointed out this is an old and solved forum thread.

Thank you,
Eric E.

0 Kudos
Message 14 of 14
(936 Views)