LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create cursors programmatically with custom properties

Solved!
Go to solution

Hi!

 

I am having problems creating cursors programmatically in Labview 2009. Basically I have an image represented as an array. When pushing a button, I want about 7 cursors to pop up on the intensity graph of my image. I then want to read out the values of the cursors (z-values) and do some basic calculations with them.

The Labview help says to use the CursorList property to create cursors if I understand correctly. I am trying this right now as follows:

 

Create property node and link to image. Choose CursorList property. Right-click and create constant. Then I am trying to pull out the different cursors with the index array vi, change their names to 1-7. Then I thought to put them back together with the build cluster vi but that doesnt work.

 

In the future I would like to set more properties of each cursor (not just the name). Is this the right approach to my problem? I did a search on the topic but nothing helpful showed up. Please point me to a thread I might have missed.

 

Attached is a screenshot of my problem...How do I create several cursors at once programmatically with some properties tuned to my taste?

 

Thanks for your help!

 

Chris

0 Kudos
Message 1 of 4
(5,809 Views)
Solution
Accepted by topic author Kokomoking

Kokomoking wrote:

Hi!

 

I am having problems creating cursors programmatically in Labview 2009. Basically I have an image represented as an array. When pushing a button, I want about 7 cursors to pop up on the intensity graph of my image. I then want to read out the values of the cursors (z-values) and do some basic calculations with them.

The Labview help says to use the CursorList property to create cursors if I understand correctly. I am trying this right now as follows:

 

Create property node and link to image. Choose CursorList property. Right-click and create constant. Then I am trying to pull out the different cursors with the index array vi, change their names to 1-7. Then I thought to put them back together with the build cluster vi but that doesnt work.

 

In the future I would like to set more properties of each cursor (not just the name). Is this the right approach to my problem? I did a search on the topic but nothing helpful showed up. Please point me to a thread I might have missed.

 

Attached is a screenshot of my problem...How do I create several cursors at once programmatically with some properties tuned to my taste?

 

Thanks for your help!

 

Chris


Don't use build cluster array. Just use build array (programming->array->build array). That should take care of your broken wire. When using build cluster array, it is building your cluster into ANOTHER cluster which is not what you want.

 

 

 

Also, the index array VI is expandable (click the bottom of it and drag). That way you don't need 8 of them on your block diagram.

Message Edited by for(imstuck) on 04-20-2010 12:17 PM
Message 2 of 4
(5,794 Views)

Hi!

 

Nice, your solution works perfectly! Thanks a lot for the fast help!

Attached is an updated screenshot showing the implemented solution with three cursors named "Background","Minimum" and "Maximum".

 

 

Cheers,

 

Chris

0 Kudos
Message 3 of 4
(5,782 Views)
glad to help
0 Kudos
Message 4 of 4
(5,764 Views)