|
Re: Communicating With A PC
1. You could use the DashBoard data stream to feed data one-way to the PC, then setup the Classmate to feed to an external dashboard (it will do this), on your computer. I do not know what port this uses, but the IP is 10.xx.yy.2 where xx.yy is your team number (For me it would be 10.0.33.2). Dashboard will only send data to port 1, directly to the Classmate, which then relays the data to your program.
2. You could use sockets. In LabVIEW (after not using the front panel controls and Dashboard) I would go to sockets. Nothing wrong with them, you just need to know what you are doing.
3. If you do not understand the Dashboard, you should probably not go into sockets.
4. Read through some of the LabVIEW dashboard code to get a feel for how the Dashboard operates client-side. There are two VI's of significance:
There is one (I forgot it's name), that gives you your data. It gives you two strings: High and Low (priority). You then take the binary string and get a structure of data. You do not have to do it that way, but you get two strings whatever way you do it. Look inside this VI. It will tell you exactly how the Dashboard is getting its data. It uses a UDP socket and waits for new data (in it's own thread). You should *probably* create a new thread to run it in, so your other code dosen't have to wait for new data (and hang when there is no data coming in).
The other VI is Get Image from Controller. It does just that, it gets the latest camera image from the crio. Feed it the IP (which you know) and it will get it for you. Inside, it has a TCP or UDP socket (I think it's TCP but I am not quite sure) that gets a string, which it then converts to an image. I do not know the encoding on it, but it uses the LabVIEW image to string function to create it.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor
"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
|