Overview
This example VI Convert 0xXX hex data to a U8 byte array.
Description
Often hex data will be represented in the format 0xXX, 0xYY, 0xZZ etc. In LabVIEW it is best converted to a byte array for manipulation. The easiest way is to cut the hex data into a string control and use regular expression pattern matching to extract the bytes.
As each byte is extracted the loop will build the data into an array at the output tunnel. Once the entire string has been scanned a position of -1 is output, stopping the loop. Once the loop is stopped, the U8 byte array is released.
Requirements
Steps to Implement or Execute Code
Additional Information or References
VI Snippet
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.