cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Create multiple cursors with different spacing on XY graph

Solved!
Go to solution
Highlighted

Create multiple cursors with different spacing on XY graph

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
(135 Views)

Re: Create multiple cursors with different spacing on XY graph

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




Certified LabVIEW Architect
0 Kudos
Message 2 of 6
(108 Views)

Re: Create multiple cursors with different spacing on XY graph

Attach your VI. We cannot debug images.


LabVIEW Champion Do more with less code and in less time
I’m speaking at #NIWeek, May 21-24 in Austin, TX! Join me! (Session 1422)

0 Kudos
Message 3 of 6
(105 Views)

Re: Create multiple cursors with different spacing on XY graph

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
(65 Views)
Solution
Accepted by topic author dmvpdx
05-17-2018 10:24 AM

Re: Create multiple cursors with different spacing on XY graph


@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.



CLA | LabVIEW 2014 / 2016 | BALUG
0 Kudos
Message 5 of 6
(58 Views)

Re: Create multiple cursors with different spacing on XY graph

It worked. Thank you so much!! 

0 Kudos
Message 6 of 6
(49 Views)