|
Re: Help - Selfish library functions... (Won't share)
I'm still not 100% sure, but I'll throw out a couple things you can do.
Since this is offseason, and there are no rules, you can write a VI for the PC which reads the joysticks and keyboard directly. This is most easily done using the VIs in the Connectivity palette -- Connectivity>>Input Device Control. The VIs are a little bit old and all three devices are combined, but they work fine. You init the joystick and/or keyboard, and Query for the current state. Now you can do what you want with this info, essentially build your own DS or a supplement to the DS.
To get data to the robot, your low level approach is to use TCP or UDP. Until you have performance problems, start with TCP from Data Connectivity>>Protocols. You'll want one device to do a TCP Listen and the other device to Open a connection. Think about what you want to happen before both devices are booted.
Do you want the loop on the PC to block until the robot boots?
Do you want the loop on the robot to block until the PC boots?
There are some subtleties about which does the Open and which does the Listen, but it is pretty easy to switch later and I don't think you'll care in your application. Once the Open and Create succeed, you'll then want to enter a loop to Write your data on the PC and a loop to read it on the robot.
If you have difficulties with TCP, be sure to use the Help>>Find Examples to look at TCP usage. And if this is way off the mark, post a simple explanation of the problem you are trying to solve.
Greg McKaskle
|