Any feedback, Negative or Otherwise on the Vex On-Line Controller Code v2.x (Available Source Version 0.80 Beta) ??
I am revamping the I/O Block setup. I think you will like the flexibility. You will set it up like EasyC does for the 'C' Compiler, and the Output Data will be changed Automatically.
But I have a Quandary.. It is a limitation of the formatting of the I/O Block data. The Format does not lend itself to being flexible in the number and Types of Data, By Its Self.
IF you are going to only have ONLY ONE I/O Block format for the duration of your Program, and you don't mind having ALL the DATA, ALL the TIME, this won't be an issue. But I would like to see some options.
-------------------------------------------------------------------------
First, as you change the Data Types, the amount of Bytes will vary. It won't be an issue if you use the Spaces (0x20) as delimiters, but the Overall Receive Buffer Length requirements will vary (make sure you plan for the Worst Case), plus you can have the potential to mis-interpret the incoming data if your PC program is looking for a Different Format than the Vex Program is providing (There is no DATA VALIDATION).
=========================================================================
The "default format" of the I/O Block is 54 Bytes, in ASCII:
"BOARDDATA 1018 1022 1022 1022 1 1 1 1 1 1 1 1 1 1 1 1\r"
This data represents 4 Analog Inputs, 6 Digital Inputs and 6 Interrupts (Inputs) which is broken down like this:
"BOARDDATA " // Header
"1018 1022 1022 1022 " // Analog Inputs
"1 1 1 1 1 1 " // Digital Inputs
"1 1 1 1 1 1\r" // Interrupt Inputs
There are 16 Data Items.
This is the ONLY DATA FORMAT the IFI/intelitek Loader On-Line Window supports.
=========================================================================
IF YOU needed 8 Analogs Inputs and 2 Digital Inputs (and the same 6 Interrupts), it would look like this:
"BOARDDATA 1018 1022 1022 1022 1022 1022 1022 1022 1 1 1 1 1 1 1 1\r"
Which is broken down like this:
"BOARDDATA " // Header
"1018 1022 1022 1022 1022 1022 1022 1022 " // Analog Inputs
"1 1 " // Digital Inputs
"1 1 1 1 1 1\r" // Interrupt Inputs
And the I/O Block is now 66 Bytes, in ASCII, but the number of Data Items is the same, 16.
=========================================================================
Running a PC Program looking for the DATA from the first Vex Program, with the Second Vex Program will most likely get you no actual Digital Input Data for Inputs 5-8.
-------------------------------------------------------------------------
Second, if the DATA for a given Input has not changed, its Value is still transmitted to the PC Program, because the ASCII format above is Positional and needs to have all Data Elements to be Parsed (Processed) correctly.
-------------------------------------------------------------------------
Third, the ASCII format is easy to read in the Terminal Program, and easy to work with in your PC Program, but is Wasteful in the number of Data Bytes used to transmit from the Vex Controller to the PC.
=========================================================================
Example Same Data in ASCII and then BINARY:
"BOARDDATA 1018 1022 1022 1022 1 1 1 1 1 1 1 1 1 1 1 1\r" 54 Bytes in ASCII.
0x42 0x4F 0x41 0x12 0x44 0x44 0x41 0x14 0x41 0x03 0xFA 0x03 0xFE 0x03 0xFE 0x03 0xFE 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 33 Bytes in Binary.
Note that in the Binary, "BOARDDATA" is still the same, but there are no Spaces, because each Analog Value is 2 Bytes (High Order Byte first), and each Digital Input has its own Byte.
-------------------------------------------------------------------------
A final note about the Binary Format, if an Identifier Byte was added to each Data Element, they could be sent in Any Order, or even skipped, further reducing the amount of Traffic on the Serial Lines.
I am partial to reporting the I/O Block data in Binary verses in ASCII, but YOU are the ones that are using the Program, so I solicit your Input. ;)
In case you did not know, my Day Job is all about working with different Computer Devices, communicating with different Hardware Standards (RS-232, RS-485, and CAN), and Software Standards (SAE J1708/J1587, SAE J1939, RV-C, and Proprietary) . I live this stuff everyday!! And I love it!!!