LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable reading two usb joysticks in Labwindows

i have to get data from two joysticks and display it , unfortunatle till now i am unable to make any progress, i have read about VISA , calling .dll and stuff but till now i dont have any idea what to do.  i have found good labview example but my target is to use labwindows , kindly help me in this regard i shall be really thankful to you , your help will be highly appriciated , please give me some direction that how to read data from joystick and display it or send it on serial port ,

thanks in advance

ahsan

0 Kudos
Message 1 of 7
(4,673 Views)

Hello,

a quick search in the forum showed this thread that could of some help. Unfortunately I cannot help more that this since I don't use joysticks in my activity (actually I not even have any such device available to test!)



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 7
(4,667 Views)

this thread is not useful , i have tried my best to understand the concept and have a starting point but still i am unable to communicate with this device can you tell me that if i have a usb interface device attached then how can i get and set values to it , in my case i have to get coordinates of joystick.

 

0 Kudos
Message 3 of 7
(4,651 Views)

Unfortunately I have no great experience on USB input devices and I have no device to test.

 

Nevertheless, if your joystick appears in Device Manager then you should be able to query its position at any time with joyGetPos function: call the function passing 0 as the device ID and the pointer to a variable of type JOYINFO. Do you get any result? Do you get any error?

If this test is succesfull next you may experiment with that command or go further experimenting with joySetCapture which should give you a more efficent way of getting values.

Note: you need to include windows.h in your source file and add Winmm.lib to your project in order to execute the code.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 4 of 7
(4,644 Views)

Hello, looking into CodeProject I have found this example that could be of help: it shows how to use raw input to receive values from a joystick

Using the Raw Input API to Process Joystick Input



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 5 of 7
(4,638 Views)

great sharing sir all i can say is that i respect you and thanks alot sir

0 Kudos
Message 6 of 7
(4,599 Views)

You're welcome! Smiley Happy



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 7 of 7
(4,592 Views)