03-31-2022 12:51 PM
@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".)
03-31-2022 12:54 PM
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!
03-31-2022 12:54 PM
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
03-31-2022 12:57 PM - edited 03-31-2022 12:59 PM
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:
03-31-2022 12:58 PM
Okay thank you sir
03-31-2022 04:24 PM
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.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
04-01-2022 04:13 AM
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 🙂
04-01-2022 09:18 AM
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.
Blog for (mostly LabVIEW) programmers: Tips And Tricks