Example Code

How to Extract Information from Strings Sent from External Sources.

Code and Documents

Attachment

Download All

Overview
This example VI provides several approaches to extract data from strings sent from external equipment.


Description
Usually, you can use “regular expression pattern matching” to find a certain format from the equipment output string. But, this VI shows you several methods to get important data from the long string if know the certain location of the important data in the string. In the VI, a long string displayed as Hex represents data from the equipment, four methods get 3 bytes starting at position 9 and show the data as U32, array of U8 values or a String.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Download the attached folder to your computer
  2. Open the VI " Byte Manipulations 2012 NIVerified.vi"
  3. Run the program

 

Additional Information or References
VI Snippet

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

Stephen C
Applications Engineer

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
KRAZE4LV
Active Participant
Active Participant
on

please send your porgram in LV 2009 or 2010