11-22-2015 11:27 AM
Hello!
I am trying to run an application, written in LabView 8.2.1 and compiled with Application Builder 8.2.1, in VirtualBox 5.0.10. VM is Window XP (32-bit) SP3. Everything seems normal until I click a button in the running application. The button itself clearly shows that it is beeing clicked but no mouse event is generated in the event structure of the block diagram. Keyboard seems to work normally since it is possible to change scaling of X and Y axis i the graphs. We experience the same thing when using Parallells on Mac. I would be grateful if someone recognizes and has a solution to this problem.
Best regards
/Mats Olsson
Solved! Go to Solution.
11-22-2015 12:17 PM
Does it work correctly if you run it on a regular OS?
11-22-2015 01:32 PM
Yes it does.
11-22-2015 01:41 PM
Well, I was going to Rant about "fly-by-night VMs", but decided to do a test. I wrote a routine recently that captures Regions of Interest (ROIs) from images. When you draw an ROI on an Image and let go of the Mouse Button, that generates a Mouse Up Event that you can trap and use to "do things". So I ported this to a handy VM make with VMWare VM Workstation, with LabVIEW 2015 installed on the VM. Worked fine in LabVIEW, but to my shock and surprise, the Mouse Up Event didn't seem to be recognized in the Executable.
So I tried it on my desktop. Same thing!!! This may be something weird with NI Vision -- I'm going to try a few other Mouse Events with more "ordinary" LabVIEW code ...
Bob Schor
11-22-2015 02:15 PM
I have tried with both mouse down and mouse up events and none of these events are generated in the Virtual machine.
/Mats Olsson
11-22-2015 02:22 PM
OK, maybe it's a Vision thing. I'm currently in a VMWare VM that has LabVIEW 2012 installed (different VM from the previous test, different PC as well). I created a very simply VI with a Test Button (an ordinary Boolean On/Off Switch), and created 5 Events on that Button: Mouse Down, Mouse Up, Mouse Enter, Mouse Leave, and Value Change, as well as a Value Change for the Stop Button.
Everything works as expected when run from LabVIEW. The Mouse Down indicator lights when I first click the Test Button, then turns off when I click it again. Mouse Enter is on whenever the Mouse is over the Button, whether or not it is being clicked.
What about when run as an Executable? Fortunately for my sanity, it works the same way. That is to say, LabVIEW 2012 Executables involving Mouse Events appear to work perfectly well in a VMWare VM. [Tomorrow, when I'm back at work and don't have to struggle with VPN, I'll try my example that uses the Vision Toolkit, LabVIEW 2015, and seemed to fail, even not in a VM. Oh, I've got LabVIEW 2015 here -- I can test the not-in-a-VM here, but that's another post ...].
Here is a Snippet of my test routine:
Hmm -- I don't know why the Case Label is missing here. On my PC, it shows "Test Button": Mouse Enter.
Bob Schor
11-22-2015 02:32 PM
Good news -- the Mouse Events in my earlier failing test example that used LabVIEW 2015 and Mouse Events, along with routines from the Vision Toolkit was not failing because it didn't "see" Mouse Events (they worked just fine), but because something in the Vision stuff failed in the Exe (and I was using it as a "flag" that the Mouse Event was working or failing ... Duh, bad flag).
I still haven't (really) tested Mouse Events in VMWare VMs except the test I just ran with LabVIEW 2012. However, I'm confident that it will work with LabVIEW 2015 -- if someone needs me to test this tomorrow, I'll be happy to do so ...
Bob Schor
11-22-2015 03:26 PM
There are certain options for the mouse handling in vlrtualbox. In particular, are you using any of the Guest additions?
11-23-2015 08:19 AM
Three points. First, I think Altenbach has hit on the problem, namely whether or not the VM passes all Mouse Events in from the Host. Second, I did just test on the VM at work that has LabVIEW 2015, and everything works. Third, the exception is that my Snippet really is missing all of the Case definitions for the Events -- I don't know if this is "Expected Behavior" or a bug, but I will let NI know about it.
Good luck with your efforts. If all else fails, VMWare's Virtual Workstation does seem to work with LabVIEW Executables and Mouse Events.
Bob Schor
11-23-2015 08:43 AM
How embarassing (for me). The "bug" I mentioned in the previous post appears to be a bug in LabVIEW 2012 which has been fixed by the time LabVIEW 2015 was released! I'd forgotten I'd saved the Snippet as LabVIEW 2012 (though it says "2012" right there in the Forum post) -- I've just confirmed that this really is a "problem" saving Snippets in LabVIEW 2012, but is not a problem when they are saved in LabVIEW 2015.
Sorry for adding so much confusion to the Forums.
Bob Schor