An excellent Question!
For the following presentation, “Vex On-Line Controller Code” refers to the Vex Controller Program that is downloaded to the Vex Controller and is intended to communicate with the “IFI/intelitek Loader On-Line Window” of the IFI/intelitek Loader. There are at least 3 different Major Versions of the “IFI/intelitek Loader” program. I have them Labeled as Ver 1.x, Ver 2.x and Ver 3.x.
Reverse Engineering the Code (AKA Machine Language) would get me Assemble Language, that can possibly infer some of the ‘C’ code. But that is a lot of effort. (Yes, I am Lazy… I thought I was just a clever Engineer, but my boss says I am just Lazy )
So looking at the 50,000 Foot View (15,240 Meters for our Metric friends) the real goal here is to make a Vex Controller Program that works with the IFI/intelitek Loader On-Line Window, (since this is a good starting point of how to control the Vex Robot through the Serial Connection) but allows us to modify it to better suit our Mission Requirements.
Since the Vex Dynamic Debug Tool (DDT Code) has Source Code in the VEX Starter Code, And the Vex On-Line Code for Version 1.x of the IFI/intelitek Loader On-Line Window seems very simular to the DDT Code (See Thread Source Code for of the On-Line Code, What’s Up!!?), I Reverse Engineered the Data Stream between the Vex Controller and the IFI/intelitek Loader On-Line Window with a home made serial port sniffer.
I looked at the Data Stream in Version 1.x, 2.x and 3.x (Pro) of the IFI/intelitek Loaders, Plus I looked at the DDT in the IFI Loader. I will post the differences I find, for all of you. I admit I would not be able to find every possible feature of the Vex On-Line Controller code without a lot of Trial and Error, but at least I can see what the IFI/intelitek Loader sends to the Vex On-Line Control program and what the Vex On-Line Control program sends back to the IFI/intelitek Loader.
I can see from your above post that you have Version 2.x of the IFI/intelitek Loader program (Ver 1.x and 3.x have different Data formats). I discovered like you that the “SetMotor( 00-07, 00-FF)” has a command format of “C9 17 04 00 FF 00” and “SetDigitalOutput( 00-05, 00-01 )” has a command format of C9 17 06 00 01 00". So what happened to a command format of “C9 17 05 00 00 00”? Well, the IFI/intelitek Loader ver 3.x gives that answer… It is the Relay Control on the FRC Robot Controllers. There might be more Commands, but if you can not get the IFI/intelitek Loader On-Line Window to send them, you can not find out what they might do.
Here is my “low tech” response from the Vex On-Line Controller Code for IFI/intelitek Loader On-Line Window Ver 2.x:
printf("%04u ", Get_Analog_Value (rc_ana_in01));
printf("%04u ", Get_Analog_Value (rc_ana_in02));
printf("%04u ", Get_Analog_Value (rc_ana_in03));
printf("%04u ", Get_Analog_Value (rc_ana_in04));
printf("%1d %1d %1d %1d %1d %1d ", rc_dig_in05, rc_dig_in06, rc_dig_in07,
rc_dig_in08, rc_dig_in09, rc_dig_in10);
printf("%1d %1d %1d %1d %1d %1d\x0d", rc_dig_int1, rc_dig_int2, rc_dig_int1,
rc_dig_int4, rc_dig_int5, rc_dig_int6);
I setup the I/O block to match the Vex On-Line Controller Code 2.x (e.g. 4 Analog, 6 Digital Inputs, 6 Digital Outputs, and the 6 Digital Interrupts). One change that I made to the Analog Output was choosing a format of “%04u” verses “%4u”. For a number like One-Thousand-Twelve (1012) it make no difference, but for a number like Six-Hundred-Twelve (612), the difference is “0612” verses “612”. I chose this so that even if every Analog input was Zero (0), the line would be a consistent length (54 bytes including the Return [0x0d]).
For this project, sure… But first a word from my Conscience…
[Political Rant]MicroSoft S**ks!! My WinXP Desktop TODAY is as stable as my OS/2 Warp 3.0 Desktop of 1994, it only took MicroSoft 14 years to Get There!!! MicroSoft’s Proprietary Offerings are not to my liking, (e.g. .NET, C#, SilverLight, ect…) I have plenty more to say, but Enough Said, this is about Robotics!!
C# will be fine at this point, since visual studio 2008 or 2005 is available to download (for free) and everyone could be able to access both the Vex Controller Code and the PC Controller Code. For the Long Term, a Platform Neutral Language, Like ‘C’ or ‘C++’ or JAVA would be a much better choice.
You could start by mimicking the “IFI/intelitek Loader On-Line Window Ver 2.x”. By that I mean mimic the “Functionality”, not so much “Look and Feel”, you can if you want mimic the “Look and Feel”, but it the “real world” you might get a Copyright Infringement against you…
Get the Sliders and Check Boxes and of course the Status Displays for the Inputs. Leave it Flexible, program for Abstraction. I will get you the Commands, although you know most of them already, that you need to assign to the Sliders and Check Boxes.