Indian LabVIEW Users Group (IndLUG)

cancel
Showing results for 
Search instead for 
Did you mean: 

Track cursor on front panel

Solved!
Go to solution

Hi all, my name is Chethan and I am currently working on a project where one of the tasks requires monitoring of the front panel. If the user is not using the front panel for 1 min, the VI should stop the execution. The VI should track cursor movement on front panel only. If the user run the VI and minimize the front panel, this time should count for 1 min wait time before stopping the execution.

 

Feel free to share your thought on this topic.

0 Kudos
Message 1 of 9
(5,328 Views)

Hi Chethan,

 

Check the VI attached. It has an event structure that tracks the VI mouse event. If there is no mouse activity on the Front panel of the VI then the VI stops executing.

 

Hope this helps.

 

 

0 Kudos
Message 2 of 9
(5,315 Views)

Hi Alifiya,

 

Thanks for the solution. This VI is working fine however even when the cursor is moving inside the front panel, the VI is stopping the execution after a minute. What I am trying to say is, cursor movement inside the front panel should be considered as mouse activity, VI should not stop executing as long as the cursor is moving inside the front panel. Is it possible to do so?

 

Thanks.

0 Kudos
Message 3 of 9
(5,286 Views)
Solution
Accepted by topic author chethanspring

Hello, I believe this simple event-case VI shall solve your purpose.

0 Kudos
Message 4 of 9
(5,279 Views)
Solution
Accepted by topic author chethanspring

Hi Chethan,

 

Use the attached VI. It is modified as per your requirement.

 

Let me know if this helps.

 

 

 

 

0 Kudos
Message 5 of 9
(5,271 Views)

Hi Umesh,

 

Thanks for the solution. This VI works fine but instead of giving such a big value to "Event Timeout", I used an"Elapsed Time VI" inside the timeout event.

 

Thanks very much for the quick response.

 

I am attaching the modified VI. Please check it once. I am using LV 2015 version.

0 Kudos
Message 6 of 9
(5,264 Views)

Hi Alifiya,

 

The solution VI is working as expected with few more added features like mouse wheel monitoring.

Thanks very much for quick response with solution.

0 Kudos
Message 7 of 9
(5,263 Views)

Hi,

Can you post 2017 version vi?

 

Thanks.

0 Kudos
Message 8 of 9
(5,254 Views)

Hi,

 

Attached is the VI in LabVIEW 2017 version

0 Kudos
Message 9 of 9
(5,249 Views)