LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect 1-D array to Case Structure as a Case selector

Solved!
Go to solution

Dear all,

 

I am measuring Analog value using DAQmx, i obtained waveform component(Y) and this component is 1-D array data type of wire(double-64 bit real), according to my program i must use case structure , the selector should be Y values but labview says "you cant connect this type of wire to the case selector(you have connected two terminals of different types)"

 

Related issue works like below:

i should continue to move motor  while analog values(Y values) is smaller than the predefined value (for example "10")

 

Greetings from Turkey!

Best Regards.

0 Kudos
Message 1 of 6
(6,982 Views)

What is "a data type of wire"?

 

The Y component of the waveform is a 1-D array of values.  You cannot connect that to the case selector terminal.  A 1-D array has many different values.  If you could connect it, which value should the conditions be based on, the first, the last, the lowest, the highest?

 

You need to determine what your condition is that you are looking for in your array of Y values.  What if only 1 Y value is less than 10?  Or none are, or all are greater than 10?  Analyze your Y array in whatever manner you need to and use that to make a true/false decision to wire into the case structure.

0 Kudos
Message 2 of 6
(6,979 Views)

Dear Ravens Fan,

 

i know that i cant connect it, i am asking how to connect it. What should i do to the array to be able to connect it to the case structure's selector.

 

i will command to the motor that: if Y values are smaller than the predefined number(for example "10") then move to the desired position. Else STOP.

 

 

Greetings from Turkey!

Best Regards.

0 Kudos
Message 3 of 6
(6,975 Views)

That's what I am saying.  You need to figure out what conditions you want.  Do you care if only 1 value is less than 10, or do all values need to be less than 10?

Message 4 of 6
(6,971 Views)
Solution
Accepted by topic author Kindly-Wisher

either insert an "Index array" to look at one of the points (first, last, etc) or take the mean, max or min of the array to make a decision, depending on the requirements.

Message 5 of 6
(6,970 Views)

Dear Ravens Fan and Altenbach,

 

Thanks for your solutions.

I used array minimum and now if this value is smaller than 10 , this can be connected as a case selector.

 

Have a nice day.

0 Kudos
Message 6 of 6
(6,936 Views)