Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Wireless joystick using TCP/IP

Hi,
     i have a problem currently.. I'm able to control my robot wirelessly using the numeric readings i obtain from my jostick on the server side.. However, i am unable to send the boolean readings obtain when pressing the buttons over to the client side.. On my client side, the second "type cast",  i uses a cluster with 2 numeric constant for my x and y-axis as for my boolean readings i get from my buttons i'm unsure of what constant to use.. I need Help in sending Boolean readings wirelessly using TCP/IP.. Thanks...
0 Kudos
Message 1 of 7
(4,031 Views)
Since TCP/IP transmits strings, you could use a case structure to convert a boolean to a string.  Another solution would be to convert the boolean value to a 0,1 and then convert this number to a string.  This screenshot should give you an idea of what I am talking about:




Message Edited by B O B on 10-31-2007 05:08 PM

0 Kudos
Message 2 of 7
(4,012 Views)
Thanks for the reply.. the diagram u are showing is on my server side which is connected with a joystick rite, i need help on the client side too.. My CLient side is a laptop attached with a NI-6009 and 6008 to needed to suppl the 5v voltage upon pressing on the buttons of the joystick..
0 Kudos
Message 3 of 7
(4,006 Views)
Hello Scott,

What issue do you need me to help with? I don't have a joystick at the moment to test your application. Is there something specific you need help with? Is there a specific error code?

Have a wonderful afternoon.

-Bob
0 Kudos
Message 4 of 7
(3,994 Views)
Hi.. Thanks.. Let me attached the file i'm using.. THe main problem i am facing is i am unable to combine the buttons and x and y-axis readings together and send it over wirelessly to my client side..  the attached file is on my BUttons side.. When i working on it indvidually , buttons wirelss.VI with joystick server button wireless.VI, its works well... COntinue to next post...
Download All
0 Kudos
Message 5 of 7
(3,986 Views)
Continue from previous post.. x and y-axis wireless ok.VI and joystick server with x and y-axis. VI which i attached below.. WOrks well too.. However the moment i combine.. It could not works.. PLease me on how to combine boolean readings from the buttons and numeric readings from the axis... THanks alot..
0 Kudos
Message 6 of 7
(3,984 Views)
Hi Scott,
I'm assuming what you are doing is connecting your robot and your controling machine via a wireless router/transmitter and you are just doing TCP/IP communication.
When you mentioned about combining the two pieces of code and that the code stopped working, could you please describe the detailed symptom of the code "not working"? Such as, is it a networking time out? Do you receive any specific errors? Do you get the data, but it's not the data you are expecting to see?
It's always helpful to put some indicators to see what's the data you are receiving for debugging purposes.
Also, up on inspecting your code, it looks like you are doing quite a few Type Cast operations.  For example, for your button information from the joystick, you are getting a cluster of booleans. The better way to transmit the data is probably easier to convert it to an array of booleans (Array->Cluster to Array), and go from there.

Yi Y.
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 7 of 7
(3,963 Views)