Chitika

Thursday, December 10, 2015

Converting Binary Array to Integer Value in Labview

Sometimes its is required to convert binary array into integer value in Labview or sometimes it is required to convert individual binary bits acquired from parallel data lines of output from Analog-to-Digital Converter into integer value that may be used for further processing or mathematical manipulations.Here is a simple Code for implementing this idea in Labview:
Figure 1 : The Front Panel
The Front Panel of this code implementation in Labview is shown in Figure 1.The Front Panel shows to ways of converting to number one from Boolean Array and the other from individual Boolean Bits combined through Build Array function.

Figure 2 : The True Case
Figure 2 shows the block diagram of the true case where we can set the elements of Boolan Array to 1 or 0 and also the same can be done with the individual Boolean values that are combined into an array by using build array function.
Figure 3 : The False Case
Figure 3 shows the false case in which all the elements in the Boolean Array as well as the invdiual Boolean elements are set to default values of 0 each when the stop button is pressed which also stops the While Loop which keeps on running until unless stop button is pressed.Boolean Array to Number Function has been utilized for this conversion.It is a simple but quite useful implementation of an idea in  Labview.

No comments:

Post a Comment