LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to insert cluster in to array element

Hi stephen,

I have already initialised the array in the the type def when I made it, haven't I?  

No you don't. You only defined a datatype, but not the value of the datatype!

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 32
(2,471 Views)

okay so I did this, still didn't work. Only when the index was 0 did were values updated. 

 

Labview 14.0, Labview 12.0
CLAD
Mechanical Engineering Student
Download All
0 Kudos
Message 12 of 32
(2,467 Views)

Hi stephen,

 

repeat after me: "I can only replace existing array elements!" 😄

 

You initialize the "task info array" with just one (1) element. This first (and only) element will get index zero (0).

And you still wonder why you only can change parameters in this single array element? Really? After all the explanations before?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 32
(2,464 Views)

I thought the initialise dimension input was for 1D, 2D, 3D etc. not the amount of elements I want to initalise. Anyway that half works, as it reinitialises everytime the VI is called but I'll put that code higher up and hopefully it will work. 

 

Thanks

Labview 14.0, Labview 12.0
CLAD
Mechanical Engineering Student
0 Kudos
Message 14 of 32
(2,457 Views)

Hi stephen,

 

I thought the initialise dimension input was for 1D, 2D, 3D etc. not the amount of elements I want to initalise.

When you are unsure about how the function works you should read the LabVIEW help for that function! 😄

as it reinitialises everytime the VI is called but I'll put that code higher up and hopefully it will work. 

Yes, as the initialization is part of this VI. Usually you only initialize once at program start…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 15 of 32
(2,453 Views)

     When you are unsure about how the function works you should read the LabVIEW help for that function!

I would normally check if I was unsure but to be honest its a rather misleading terminal name. Should be called number of elements or size of dimension.  

 

thanks for your help anyway 🙂 


Labview 14.0, Labview 12.0
CLAD
Mechanical Engineering Student
0 Kudos
Message 16 of 32
(2,436 Views)

@Stephen1995 wrote:

I would normally check if I was unsure but to be honest its a rather misleading terminal name. Should be called number of elements or size of dimension.  

 



 

According to the help, the terminals is called (dimension size ...), so the focus is on the "size" in each dimension, i.e. exactly what you are suggesting. No action needed. ;).

The number of dimensions is given by the number of size inputs you expose by resizing the node. So for a 2D array you would expose two size terminals. Wiring numbers will now determine the size in each dimension and the product of the sizes will determine the total number of elements.

0 Kudos
Message 17 of 32
(2,429 Views)

Misleading never the less. Maybe once you know the nuance its obvious but until then it isn't as clear as it could be. 

Labview 14.0, Labview 12.0
CLAD
Mechanical Engineering Student
0 Kudos
Message 18 of 32
(2,424 Views)

Pretty clear to me.  If it was what you were thinking, then it would be called "Number of dimensions".

0 Kudos
Message 19 of 32
(2,422 Views)

Going by your profile you have 10 years experience. I would hope it is clear by now. For new user however things aren't as simple, as you should know if you think back a little.

Labview 14.0, Labview 12.0
CLAD
Mechanical Engineering Student
0 Kudos
Message 20 of 32
(2,419 Views)