04-20-2010 10:23 AM
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
Solved! Go to Solution.
04-20-2010 12:08 PM - edited 04-20-2010 12:17 PM
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.
04-20-2010 01:12 PM
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
04-20-2010 02:17 PM