LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I read the serial data from my mouse on com 1?

I just started using LABView so please have patience with me!

An error message says the resource is valid but VISA can not open a session with the device, in this case a Roller ball cannected to the comm port. Obviously windows is already using this device, I don't want to over ride it just monitor it.
0 Kudos
Message 1 of 5
(3,176 Views)
If you are using LV 7 the attached VI demonstates how to use the new functions that are now included with LV.

I just stumbled across these earlier today and they worked right out of the box.

Have fun,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 5
(3,176 Views)
I chose the mouse as its the most convenient serial device to hand, I'm a beginner to this and I am just looking at different exercise in using the IO assistant and reading Serial data.

My next plan is to plug in a GPS unit and look at the NMEA-183 serial data, are there any VI's floating around that deal with this, my assumption is that this would be a realtively simple exercise? so a good starting point for me!
0 Kudos
Message 3 of 5
(3,176 Views)
Unfortunately, I don't think your mouse will be a good instrument to practice on. If you are interested in the data from the mouse Ben's ideas are great, but I believe they just ask the OS what it is seeing, and does not actually look at the serial port.

The cause of the error, and the reason you can't use the mouse is as you expected. Windows only allows a single program to control a serial port. Even though you want to just read from it that is still considered controlling it, so windows is denying you access. You could use a mouse if you could attach a 2nd mouse to another COM port, and to then convince Windows to not think of it is a mouse. I am not sure if that is even possible.

You may just be better off, hooking up your instrument and going for i
t. Another area to check is Instrument Driver Network which lists a lot of VIs for specific instruments. Your instrument may already have VIs programmed for it.

Evan
National Instuments
Message 4 of 5
(3,176 Views)
Hi,

On NT/2000/XP, you will not be able to use the serial port,
once it is assigned to a mouse.
On 95/98/Me, you can do this, but you will lose the mouse
for the remainder of your Windows session.
Mouse output is not very useful for tests anyway.

Get an (old) external modem for your first tests, the ATIx
commands return a number of readible strings.

Test your actual device with HyperTerminal first, before
using LabView.

HTH, regards, Matt
0 Kudos
Message 5 of 5
(3,176 Views)