LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically disabling/enabling cursor in intensity graph

Solved!
Go to solution

Hello all,

 

I am building a LV interface (LV2011) for a stepper XY stage.  The system "scans" a surface, displaying it on the graph.  I set up to cursors to zoom into a region of interest (ROI).  Pressing a button resizes the scales to the ROI (zooming in on the area).  Sections of code move the XY stage, and read a device.  When done I want to zoom into a ROI and use a THIRD cursor to manually move the XY stage.  I have this working with TWO graphs, based on the "region of interest.vi" I found in the dev zone.  

 

What I would like to do is have a boolean toggle controlling ONE GRAPH between setting min/max (cursors 0 and 1) and manual stepper position (cursor 2).  If cursor 2 is visible I want cursors 0 & 1 not showing and visa versa. Can I do this?

 

I attached the example - bascially what I did was add a cursor to the 2nd graph, grabbing the XY vales and sending to the stepper controllers. Works great!  I am trying to "combine the two" by resizing the orig graph with a button click (works fine) and then click another button to show the XY stage cursor (and hiding the min/max cursors) - thats the brick wall 🙂

 

On a seond note - controlling a XY stage using the intensity graph's cursor is really nice; however it would be great if I can control the cursor similar to a slider's "coerce" - has anyone done this?  I assume I have to write a routine in the event that performs some modulo function. Just curious!

 

Thanks,

Steve

0 Kudos
Message 1 of 5
(3,391 Views)

The VIs sent are broken, is there something missing?

Message 2 of 5
(3,357 Views)
Solution
Accepted by topic author Steven8R

A couple of quick hits:  switch between cursors and use the first two cursors to bound the movement of the third one.

Message 3 of 5
(3,352 Views)

Your exmaple works perfect. Howver I am having probs with Val(sngl) on the XY graph.  On the example you gave, lets say I move the cursor with the mouse - event fires, everyone is happy. If I move the cursor with CODE - nada.  I even read the "Value" of the graph and wrote it to "Val(sngl)" to try to fire the event.  How does one force a trigger on an XY chart when you move a cursor (say cursor idx2) using code?

 

Better yet - why when I read the Val and write to Val(sngl) does the event not fire??? I have been searching for a basic XY table with sensor -type project but havent found one yet.  Everyting works great - draginng the cursor moves the XY stage. Now I need to do the auto-scan part 😛  Use code to place the cursor - trigger the even that moves the stage.

 

 

Thanks

Steve

0 Kudos
Message 4 of 5
(3,335 Views)

Value Change events are intended to fire when the object is a control and the user changes the value of the control.  Since XY graph is an indicator, there is no way for a user to cause a value change event to fire.  You can trigger a value change event programmatically when you write to the Value(signalling) property.  You are writing to that  property in your code, howevever you VI doesn't have an event case to handle the value change event for the XY graph.  Right now you only have cursor grab and cursor move.

 

What you may want to do is create a user event.  That way you can programmatically fire the user event.

0 Kudos
Message 5 of 5
(3,318 Views)