LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create multiple cursors with different spacing on XY graph

Solved!
Go to solution

Hello,

I'm trying to create 4 cursors each with different spacing. I came up with this idea (refer to the attachment), but when I executed, the program just bypassed the for loop. Nothing got computed. Can someone take a look at it and give me some hints? 

 

Thank you in advance!

MV

0 Kudos
Message 1 of 6
(2,308 Views)

Your loop runs zero iterations because one of the auto-indexing inputs into the loop has a zero array length...




Certified LabVIEW Architect
Unless otherwise stated, all code snippets and examples provided
by me are "as is", and are free to use and modify without attribution.
0 Kudos
Message 2 of 6
(2,281 Views)

Attach your VI. We cannot debug images.

0 Kudos
Message 3 of 6
(2,278 Views)

Thank you for the quick response. I just figured out that my array of cursor list cluster has zero length, but I don't know how to fix it. Should I initialize the cursor list array of 4 elements and then feed it into the for loop?  Or is there other way to do it more efficiently?

 

This is a VI snippet of a portion of my code, the other half is irrelevant to this problem.

 

0 Kudos
Message 4 of 6
(2,238 Views)
Solution
Accepted by dmvpdx

@dmvpdx wrote:

Thank you for the quick response. I just figured out that my array of cursor list cluster has zero length, but I don't know how to fix it. Should I initialize the cursor list array of 4 elements and then feed it into the for loop?  Or is there other way to do it more efficiently?

 

This is a VI snippet of a portion of my code, the other half is irrelevant to this problem.

 


No, you only need to initialize the array if you are going to be modifying it. In this case, just put the cluster on the block diagram (no array) and auto-index output will create the array for you.

0 Kudos
Message 5 of 6
(2,231 Views)

It worked. Thank you so much!! 

0 Kudos
Message 6 of 6
(2,222 Views)