LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Questions about the build array function

Hello,


  I have questions about the "build array" function. When I use "boolean inputs" to the build array function I can use the "boolean array to number" function on the output of the "build array" function and then send the output  to a numerical indicator. Life is fine, the  numerical indicator goes from 0  to 127 when all of the 7 inputs are high.
  However, when I change the inputs of the "build array function"  to be driven by the output of an and function, everything does right down the toilet. The output of the "build arrray" function changes to a 1D dynamic array and and  I get errors galore.  What I am trying to do is to convert 7 discrete signals into a single entity, such as a unsigned 8 bit integer.
Does anyone have a fix for this?
Regards,


Kaspar
0 Kudos
Message 1 of 13
(3,811 Views)

Hi Kaspar,

I don't quite understand your problem, but could the "Concatenate Inputs" option on the Build Array help you?  If not, post an example VI and explain the problem in a bit more detail and I'm sure I can help.

-D

0 Kudos
Message 2 of 13
(3,801 Views)
is this what you mean?  i don't see any problem with it...
Download All
0 Kudos
Message 3 of 13
(3,790 Views)
Hello,

  The problem that I am trying to solve it to combine numerous discrete/separate signals into a signal signal. For example I want to send the combined signal into the selector input of a case statement.  The currecnt problem I am working with is to combined the outputs of 7 and gates into a single signal.
Regards,


Kaspar
0 Kudos
Message 4 of 13
(3,787 Views)

Are you trying to combine the several booleans into a single boolean or a single number?  If you're trying to combine them into a single number, then your Build Array to numeric conversion approach should work.  If you want a single boolean, you should use the Compound Arithmetic function set to "AND" mode.

Again, a sample VI that more clearly illustrates your problem is worth a thousand words.

-D

0 Kudos
Message 5 of 13
(3,784 Views)
Hello,

  Thanks for both of the examples, I have looked at them. One of the inputs to my AND gate is a boolean ok button, the other input to the and gate is the output of a comparison that has wider and a "black and white" pattern for the signal line. I am note sure what the difference is between the different types of signals. I have not be able to "cut and paste" into a posting to the forum, oterwiae I would put a section of my block diagram into my append.
Regards,


Kaspar
0 Kudos
Message 6 of 13
(3,787 Views)
To post click on the Attachment "Choose File" button, which is cleverly hidden outside (below left) the message body box.

You problem with your VI may be that the comparison may be a "Broken Wire" possibly caused by inadvertently wiring the output to one of the inputs. Or you may need to pop up on the comparison function and select "Compare Aggregates" if one of the inputs is an array or dynamic signal type.

Lynn
0 Kudos
Message 7 of 13
(3,778 Views)
the black and white wire sounds like an array of no type...
 
 
0 Kudos
Message 8 of 13
(3,760 Views)
Hello,

   Attached to this post is a section of the vi that I am having a problem with, here is the goal of the vi

  • There are 4 comparison function (setup for "in range" operation) to monitor a input signal
  • Each one of the outputs of the comparator is "anded with" the "Process Selection" push button.
  • The outputs of each of the and gates are combined together with the build array function to create a selector to a case statement
  The theory is that when the button is not pressed the case selector will be zero and the case block will process nothing. When the button is pressed, the case selector will be either 1, 2, 4 or 8.

So here it is....









Regards,


Kaspar
0 Kudos
Message 9 of 13
(3,766 Views)
Hello,
 
  I am having problems attaching my vi, I have the correct file in the attachment box, but for some reason it does not get attached.
 
 
Regards,


Kaspar
0 Kudos
Message 10 of 13
(3,751 Views)