LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read USB joystick without using joystickAcquire.vi?

I am writing an application in which I would like to use a joystick to "fly" a microscope over a large sample.  My problem is that joystickAcquire.vi, and the third party software that provides my live microscope image both Call Library Function Nodes.  So...they can't run at the same time.  Unfortunately, it would be really useful to see where your "flying" while you're flying there!

Can anyone help me read the joystick without calling a library function node? 

(I'm using a Logitech Attack 3 USB joystick, which works great with the joystickAcquire.vi, but...  I'm open to easy solutions, like does anyone know where I can get a non-USB joystick?)

Thanks in advance!

-GN
0 Kudos
Message 1 of 5
(3,101 Views)
What is JoystickAcquire.vi and where did it come from? What version of LabVIEW are you using? LabVIEW, since 7.0, has included joystick control on the Advanced>Input Device Control palette. And, why can't you run the two different VIs at the same time? All you would normally do is put them into separate while loops.
0 Kudos
Message 2 of 5
(3,091 Views)
joystickAcquire.vi is one of the controls on the Advanced>Input Device Control palette.  It came with my version of LabVIEW (7.1).

I can't put them in separate, parallel while loops because both programs contain calls to a Library Function Node. The Application Note on Multithreaded VIs explains that calls to Library Function Nodes run synchronously, which is a fancy way of saying that two can't run in parallel.  Alas, the Application Note does not appear to be lying, as this corresponds exactly with my experience.
0 Kudos
Message 3 of 5
(3,081 Views)
Are non-USB joysticks so hard to come by these days? Surely they must be all over eBay?

I've come across numerous programs in the past that will allow you to control the mouse cursor with a joystick, or even simulate keyboard presses with a joystick. I'm not quite sure where these are nowadays, though (or how well they would work with XP or the like).

If you're feeling exceptionally bold, there are also instructions out there for rewiring various video game console controllers for use in a PC's parallel port.

Message Edited by kehander on 03-21-2006 02:02 PM

0 Kudos
Message 4 of 5
(3,070 Views)
Hi,


You could try to make a smart global (LV2 global, buffer vi, whatever).


If you give the global an init state, and a read state, you can use the buffer througout your program. Since the joystickAcquire.vi vi is only called from the buffer, it will never be called asynchronically.


Regards,


Wiebe.



"gnunesjr" <x@no.email> wrote in message news:1142889066490-340743@exchange.ni.com...
I am writing an application in which I would like to use a joystick to "fly" a microscope over a large sample.&nbsp; My problem is that joystickAcquire.vi, and the third party software that provides my live microscope image both Call Library Function Nodes.&nbsp; So...they can't run at the same time.&nbsp; Unfortunately, it would be really useful to see where your "flying" while you're flying there!Can anyone help me read the joystick without calling a library function node?&nbsp; (I'm using a Logitech Attack 3 USB joystick, which works great with the joystickAcquire.vi, but...&nbsp; I'm open to easy solutions, like does anyone know where I can get a non-USB joystick?)Thanks in advance!-GN
0 Kudos
Message 5 of 5
(3,058 Views)