Example Code

Converting an Array of Binary Values to a Binary String

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Download All

Overview
This example takes an array of 1's and 0's and converts it into a single binary string.


Description
This VI takes an array of 1's and 0's and compares each element against a 1 to create an array of booleans. A Boolean Array to Number function is used to convert the array into a single number, which can be converted into a binary string using the Format Into String function.

 
Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Open " Binary Array To String 2012 NIVerified.vi"
  2. Run the program.

 

Additional Information or References
VI Block Diagram

 5-73.png

 **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.

Comments
crossrulz
Knight of NI Knight of NI
Knight of NI
on

There's no need for the FOR loop.  The equals will take the array and scaler inputs and give an array out.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5