LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Possible to create an array of devices?

Solved!
Go to solution

Hello,

 

as a Java Programmer I like to programm in the object orientated manner.

 

I have more than 50 valces to manage and established a state diagramm.

 

So if the value is true or one in the matrix in row 52 of a column definig the operation type then I would like to set the valve 52 to "open".

 

Therefore I would like to put all devices of type valve in an array and start the corresponding valve.at index 52 of a device array in a for loop.

 

I have not hardware yet but I probably want to use the DAQ unit of NI.

 

Will it be possible to program it in this way?

 

Thanks very
 much

 

Thommy7571

 

0 Kudos
Message 1 of 5
(2,774 Views)

Yes you can do this.  You would just use Index array to break out the value of a particular column, row, or individual element of an array.

 

You can also use auto-indexing of an array in a For Loop to be able to act on every row in a 2-D array, or every element in a 1-D array in turn.

0 Kudos
Message 2 of 5
(2,765 Views)

Hello,

 

thanks, but as I have no valves and no NI hardware yet I would not only like to know if I can make an array of devices

but also if it is possible to act on each device of this array to get the signal, work on it, open it etc.

Do you have an example somewhere to show me (or a link)?

 

By the way if I create an array and use it with this index component to act on one element this did never work yet..

Even if the dimensions are equal I get an error:

error: trying to connect a 2D array of type "boolesch" to 2D array of "invalid". 

the same if I want to initialize one.

I don't see any possibility to adapt or define the type of the element

in an array for all elements at once. How must I do it?

I will have the same problem with the device array.

 

 

Thanks veryx much.

 

Thommy7571

0 Kudos
Message 3 of 5
(2,738 Views)

@Thommy7571 wrote:

By the way if I create an array and use it with this index component to act on one element this did never work yet..

Even if the dimensions are equal I get an error:

error: trying to connect a 2D array of type "boolesch" to 2D array of "invalid". 

the same if I want to initialize one.

I don't see any possibility to adapt or define the type of the element

in an array for all elements at once. How must I do it?

I will have the same problem with the device array.


That description makes no sense. Can you show us your code instead?

0 Kudos
Message 4 of 5
(2,731 Views)
Solution
Accepted by topic author Thommy7571

Hello,

 

I solved the problem with the array. I will do another posting for a similar but different subject.

 

Thanks

 

Thommy7571

0 Kudos
Message 5 of 5
(2,683 Views)