From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

My array is erroneously adding elements (help!!!)

I have an array of clusters that I am using as a list of commands.

1. I run the program and bring the Edit Tab to the front.
2. I add several new elements by giving values to the servo (first on left).
3. Once I have several elements in, I increase the index to scroll them up.
4. When I do this, new elements are added to my array.

I can't find any reason for this in my code. Hope someone else can help me figure out the problem.

I have attached the code (LabVIEW 7.1.1)
Randall Pursley
0 Kudos
Message 1 of 5
(2,328 Views)
Randall,

You found an interesting situation! I found that you do not have to change an element. Simply running and stopping the VI is sufficient. I removed everything from your VI except the while loop, the Stop button and the array of clusters. I removed everything from the cluster except Position. Still does it. I replaced the cluster with a boolean. That is OK.

I notice that the first element of the array has a bluish higlight at the left edge. Don't know what that means.

I created a new array of clusters and dropped a copy of the same cluster with Position into it. It works OK while the original still misbehaves. The new cluster does not have the highlight.

I am now curious about this also.

Lynn
0 Kudos
Message 2 of 5
(2,295 Views)
The bluish line in the array indicated that a "selection" (for copying or deleting, etc.) has been made. With the arrow tool right click on the arrays index, select "Advanced" and "show selection" will be checked. Haven't figured out what effect that might have though.

Putnam Monroe
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 3 of 5
(2,290 Views)
Lynn,

Could you post your scaled down version that still exhibits the incorrect behavior?
Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 4 of 5
(2,259 Views)
I did replace the cluster with a duplicate and the behavior went away, but I am still curious why it occurred in the first place.
Randall Pursley
0 Kudos
Message 5 of 5
(2,252 Views)