LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Xcontrol Cursor (XY Graph) with cursor release

I try to build a Xcontrol who give the values of a cursor.  The only data I send to the Xcontrol is the reference of a XY Graph.  It is working fine when using the boolean left  and right (see drawing).  When I try to to utilize the "cursor release event" (in the Xcontrol) it is not working and the cursor freezes, any idea?

 
 
Jean-Marc
Download All
0 Kudos
Message 1 of 7
(3,773 Views)

Hello Marc,

 

I studied your XControl, and not everything is as it should be but some things are noticable:

A the event is correctly registered, you notice this because the FP of the Vi is locked

B You can prevent the locking by right clicking on the 'Register' node and deselect 'Lock fp while processing'

C Somehow the event structure is not triggered, I'll need another look at this but haven't resolved that.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 7
(3,743 Views)

Hello J-M,

 

I have experienced the same behavior that you have described. I don't have a concrete answer for you at this time, but I am still looking at the program.

Regards,

Jon S.
National Instruments
LabVIEW NXG Product Owner
0 Kudos
Message 3 of 7
(3,685 Views)
Thanks for your commentaries  TonP and Jon S.

 

I made some modifications and now I pass the "cursor Index" in the data of the Xcontrol.  I still not understand why the "cursor release event" is not triggered inside the Xcontrol.

 

I begin to work with the Xcontrol and any commentary will be appreciate.

 

Jean-Marc
0 Kudos
Message 4 of 7
(3,649 Views)

Hello J-M,

 

 I think I figured out what was causing the hang in LabVIEW when you moved the cursor.  You need to put an Unregister for Events at the output of your Event Structure in the Facade of your Xcontrol.  After I did this LabVIEW didn't hang.  The values didn't update in your cluster but the hang didn't occur.  You might need to do some more coding the case for "Mouse Up".

 

 

 

Let me know if this helps

Message Edited by Jon S. on 03-20-2009 02:25 PM
Message Edited by Jon S. on 03-20-2009 02:26 PM
Regards,

Jon S.
National Instruments
LabVIEW NXG Product Owner
0 Kudos
Message 5 of 7
(3,603 Views)

Thanks Jon

 

I will try this modification during the weekend.

 

Jean-Marc

0 Kudos
Message 6 of 7
(3,586 Views)

Jon S. wrote:

Hello J-M,

 

 I think I figured out what was causing the hang in LabVIEW when you moved the cursor.  You need to put an Unregister for Events at the output of your Event Structure in the Facade of your Xcontrol.  After I did this LabVIEW didn't hang.  The values didn't update in your cluster but the hang didn't occur.  You might need to do some more coding the case for "Mouse Up".

This actually is bad advice.

What it does is unregister the event refnum every time the VI is run, this means that the event only is registered during execution of the XControl.

The fact that the FP gets locked means that there is a valid registration that has the 'Lock FP during processing'==True.

For dynamic events you need to right click on the registration node and deselect that option.

 

What might work is setting the timeout of the event node to -1 and not stop the while loop. However I am not sure what happens in these cases.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 7 of 7
(3,562 Views)