LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading values from a Matrix

Solved!
Go to solution

@AymanB95 wrote:

P.S.: i cant put the property node in the autoindexing loop, in the big VI that woukld be too complicated 😞


That means you are doing something wrong. Since the property only accepts a single number, it cannot accept an array as you currently do and that probably would not make any logical sense.. (there is a reason the property is named "position" and not "positions".)

0 Kudos
Message 11 of 18
(988 Views)
Solution
Accepted by topic author AymanB95

Hi Ayman,

 


@AymanB95 wrote:

i cant put the property node in the autoindexing loop, in the big VI that woukld be too complicated 😞


That node belongs into the FOR loop. Point.

 

When it is "complicated in the big VI" then your "big VI" needs some refactoring!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 18
(984 Views)

Thank you for your reply. 

Im of course aware that the node only takes ONE position at a time. My goal is to make the node take the values of X from the array one after one until the end of the Array

0 Kudos
Message 13 of 18
(981 Views)

Hi Ayman,

 


@AymanB95 wrote:

My goal is to make the node take the values of X from the array one after one until the end of the Array


Place that property node inside the FOR loop and you're done!

 

Like this:

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 14 of 18
(978 Views)

Okay thank you sir

0 Kudos
Message 15 of 18
(971 Views)

I recreated your VI example in my version of LV. Gerd is correct that you can place the property node inside the for loop and be done. Or you can also use a numeric conversion to whatever byte you need an I64 in your case. In my attached example, I left the node outside the for loop but wired the conversion piece inside it, I used a slider so I could watch it switch through the various numbers generated throughout the code. I also placed the entirety of the code inside a while loop, so the VI runs til the array is complete. I am learning as well and any corrections and or recommendations as to what I chose to do are always welcome.

Creig Mills
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 16 of 18
(953 Views)

Thank you so much, but the conversion wouldnt solve the problem. The slide you made in this VI only reads the last value in the Array (the last row) and not all values (row for row). But thank you again 🙂 

0 Kudos
Message 17 of 18
(924 Views)

I corrected what I was doing, after having re read all of your post. I believe this vi does what you want now. I multiplied the random number generator value by 250 for scaling purposes. In lieu of the index array, I placed another for loop. I wired indicators to both of those for loops to show the movement through rows and columns. As the slide reads them one and after another. Hopefully this works for you.

Creig Mills
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 18 of 18
(912 Views)