LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

To see ten arrayelement at a time

Hello!

I have an array with varying size. Then I have two buttons "previuos ten" and "next ten". If I click for exampel previuos ten I want the ten element that is before those we can see in the frontpanel to be seen. And the same with the button "next ten". This I want to do with an eventstructure, that is why I cant build the array with a while-loop... My problem is that there is an array I want to control. If I have just a number there is no problem... if anyone got a tip I would be happy.

Best regards and thank you
0 Kudos
Message 1 of 10
(2,733 Views)
Hello Ex-jobb,

why don't you use the property node "Index Values" of your array? You can adjust the selected items very easily with it.

Best regards,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(2,728 Views)
If I understand you correctly, you want to control the index of the array element that is shown. You can easily use an event structure where you increment or decrement the "IndexValues" property of the array.

(Simple example attached, LabVIEW 7.0)
0 Kudos
Message 3 of 10
(2,725 Views)
Hello GerdW!

Yes I have tried that. If I only for exampel have an array with 18 elements and I create a property node and then put an indicator on the property "Index Vals" then I see in the window that there is a number "30". I thought that the property "Index Vals" showed how many elements there is. This must be wrong??
0 Kudos
Message 4 of 10
(2,723 Views)
Hello Ex-jobb,

the help for "Index Values" says:
"Array of indexes (one per dimension) of element displayed in the top left corner of the array."

Wer lesen kann, ist klar im Vorteil 🙂 (Sorry, I will not translate it.)

You only have to provide some logic when you don't want to show empty elements (in your case: if you display element #10 to #19 of an array with only 18 elements you will see two empty elements. So it's maybe better to display only element #8 to #17...)

Best regards,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 10
(2,720 Views)
Hello GerdW!

Yes I know as usual 🙂 Ja aber ich kan nicht so gut english in text (sagt man so? ) verstehen :-/. Es wurde vieleicht besser in deutsch :-). Hope you can read my bad german :P. The thing is that I do not understand (I can not translate in right way to say) what that line means that you took from the LabVIEW help :-/. I do not understand what IndexVals show. Of course I would if it was written in my language... thank you for your answer anyway 🙂 Best regards!
0 Kudos
Message 6 of 10
(2,714 Views)
Hello altenbach!

Thank you for your help! I have tried that solution but without the eventstructure. The problem I have is that I have more then two events. Can one drag the wire through those too maybe? Thank you again for your help 🙂

Best regards!
0 Kudos
Message 7 of 10
(2,715 Views)
I missed some of your message. Yes but that was just an example of a size. The array is different from time to time depending of things happening before. It can also be 50 elements long. That is why I would like to be able to see ten elements at a time. Thank you for your answer !

Best regards.
0 Kudos
Message 8 of 10
(2,712 Views)

@Ex-jobb wrote:
Can one drag the wire through those too maybe? Thank you again for your help 🙂

Best regards!


Of course, all other events should leave the index untouched.
You might also want to coerce the number to a range determined by the array size so you cannot overshoot the boundary.
0 Kudos
Message 9 of 10
(2,693 Views)
Hello!

Thank you for your help :-). That was the problem that I did not know how to do when I had many events. Once again thank you!
0 Kudos
Message 10 of 10
(2,675 Views)