LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with Mouse Acquire.vi and lvinput.dll

Hello,

 

I have a problem I canot really reproduce and I'm wondering if anyone has seen this behaviour so that I can understand more about it.

 

Let me explain. I'm using a vi wich uses the mouse acquire to obtain the current position of the mouse cursor and the button clicked on this one.

The functionnality I've develloped works perfectly... (I use it to move the window around when the user cliks on one of the controls).

However sometimes after Labview has been running for some time (couple of hours )the output of the Vi stops behaving as expected, button 1 is no longer regsitered even thought the returned mouse position is correct. This affects the behaviour of the entire functionnality. I have to restart LabVIEW for the functionnality to work again.

 

I've tried to replicate this behaviour with a simple vi, but I've never been able to replicate this. And since this doesn't happened every time I run my program for a long time. I don't really know what to do.

 

Any help in identifying the source of the problem would be appreciated.

 

Best regards

0 Kudos
Message 1 of 7
(2,606 Views)

Just a shot into the blue:

The connection to the mouse gets interrupted for a very short period which will re-initialize it in Windows. But as your VI stays on the "old" device, it could either stop working completly or give random results.

 

Is it possible that the connection (USB?) is a little loose?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 7
(2,571 Views)

First of all thank you for your suggestions.

 

The USB connection is good.

I never had any problems with any other application. and the mouse position indication is still correct. The only problem is the button clicked indication.

A new connection to the mouse is created at each mouse click and properly closed afterward (I can have more than one vi showing this same beahviour on the screen)

One of my colleague also had this same problem once.

 

Since I haven't been able to replicate teh problem I cannot be more specific and I understand that it will be difficult for me to understand the problem.

 

Best regards

0 Kudos
Message 3 of 7
(2,569 Views)

Is it possible that you are using different applications on that machine concurrently? Which means, that you are swapping tasks from time to time?

 

If so, do you have different setups for execution of those applications (e.g. "Run as Admin")?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 7
(2,557 Views)

I am indeed running different applications on the machine but only one instance of LabVIEW.

The problem seems to occur after LabCIEW has been running for at least 1 hour. (Starting LabVIEW is one of the first thing I do with my PC in the morning)

However I don't have significantly different setup for the applications running on my machines.

 

 

0 Kudos
Message 5 of 7
(2,553 Views)

I am not sure if this applies to your situation, but i encounter (depending on how i work) strange things regarding mouse control in Windows.

For instance, i work in one application, move my mouse and click somewhere, everything works fine usually. But if i have an application in the background running which just changes a specific mode of operation (e.g. change in graphic mode), my mouse pointer jumps around, and even mouse clicks are discarded for a short period of time.

My suspicion is that Windows messes up with "Active Application" once a process changes specific modes which re-positions/re-initializes HMI devices like the mouse.

 

just my 5 cents,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 6 of 7
(2,551 Views)

I understant what you mean.

And since i'm using lvinput.dll mainly for repositioning HMI this could be what to look for.

I am still looking into this but since every other mouse operation i tried works, I am focalising on the behaviour of this lvinput.dll

0 Kudos
Message 7 of 7
(2,546 Views)