|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Weird Output from Dashboard Port
A bit of an update...
After playing around with the program a bit, I managed to get it to read in correct streams. There's some weird glitches though. 1) It doesn't seem to read in every packet, it likes to just completely ignore the third packet, like it never existed. According to my Dashboard (which I hope is reporting incorrectly), the first packet is received almost three times as much as the second, and the third is only received 79 times before it just stops coming up. Another test resulted in similar figures for the first two packets, but only 9 hits on the third. 2) The dashboard program does not read in the packets correctly until after I hit the "Pause/Break" button on the computer, and then the carriage return key. After pressing that, it usually seems to work fine, but there's no logic behind when it fails. 3) This is the part that makes me think the packets are not being read correctly, which should help solve problem #1. I tried to read individual bytes, and output their data, but it makes no sense and it's simply garbage. I wish I had the 2003 controls so I could test and see what was wrong, but I have no idea as this same program worked perfectly fine last year . |
|
#2
|
|||||
|
|||||
|
Re: Weird Output from Dashboard Port
DID YOU READ THE DOC? The bytes aren't ASCII, That's for the Prog port on the bot. I would try outputting the bytes (Translate to Hex string) as which # in the packet. That may solve problems. And what language are you using?
|
|
#3
|
|||||
|
|||||
|
Re: Weird Output from Dashboard Port
Something else: How do we know OI packets from RC packets? Or the beggining from 2 high user bytes? (Frame 2)
And I belive that you only get frame 3 20 times a second; the info is unlikely to change that quickly (Except pwm 15 & 16, but those are covered by frame 2). |
|
#4
|
||||
|
||||
|
Re: Weird Output from Dashboard Port
Quote:
Page 2, under notes... "1. The IFI Dashboard Viewer now interprets the incoming data and changes the display window depending on the OI/RC jumper setting (located on the OI)." Says right there how you know what packet (or packets) you're receiving, I'm sure you can find something in the packet stream to do it in software, but why bother when you can see it with your own eyes right on the OI? You can tell the start of each frame by the two "flag" bytes. The first two bytes of each packet is 0xff,0xff while no where else in a packet can two consecutive bytes reach 0xff. That makes it very simple to find the beginning of a packet and keep yourself synchronized. Infomation in Frame 3 is very important, actually. Two PWMs, the User Byte, the Battery Voltages (main and backup), and all the error codes (mostly in the Aux_Byte). Those are all pretty important, even if some is redundant. Plus, if I did infact create a bug that didn't display Frame 3 as much as the others, there'd be a problem, because what if next year Frame 3 was important? Just because something works now, doesn't mean you should leave it, make it work right. Also, if you get about 40 packets a second from the OI, it'd be more around 13 times a second to receive Frame 3, but that's a minor technical detail. Although, you receive Frame 3 just as many times as you receive the other frames in the stream, which I'm not sure you understood from the documentation that you obviously read. |
|
#5
|
||||
|
||||
|
Re: Weird Output from Dashboard Port
Quote:
I'm using C/C++ with VS.net. As for the problems I was having, I actually found the solution by accident. Apparently I had done something bad with the serial port, forgot to close it, I think, or closed the program incorrectly so it didn't get a chance to close. Due to this, I was unable to correctly reopen it, and that created garbage data. A simple reboot, while 5 minutes long (I'm using an old PII laptop trying to run Win2k), fixed the problem. If anyone knows how to close an opened serial port after the program that opened it has aborted, can you please share? That would save me, and probably plenty of others, a bunch of time in the pits .And, as a message of help to everyone, if you ever have strange problems with your serial port, just reboot, don't waste an entire day on it . |
|
#6
|
|||||
|
|||||
|
Re: Weird Output from Dashboard Port
Oh, I use the MSCOMM control with VB6. Very, very useful. And I know comps don't use ASCII. That's why IO asked (If you were outputting like it was, it would be garbage)
Do have answers to my other questions? |
|
#7
|
||||
|
||||
|
Re: Weird Output from Dashboard Port
Quote:
Quote:
|
|
#8
|
|||||
|
|||||
|
Re: Weird Output from Dashboard Port
Quote:
Quote:
2. If you set user bytes 2 and 3 to 0xFF, some software might confuse this with a beggining of a new packet. So quoting yourself did not answer my questions/concerns. Again, I am suggesting posibilities which may (Or may not) need to be acounted for. |
|
#9
|
||||
|
||||
|
Re: Weird Output from Dashboard Port
Quote:
For the first, I already answered, there's the jumper on the OI, use that, manually switch the program to reflect the jumper being switched, it's not that hard. Otherwise, you can do what I suspect IFI has done and try to reverse engineer their Checksum Bytes, but seeing as I have no need to see what I'm sending to the RC, and if I did I'd do it the easy way, I can't answer this question with any more detail. Try contacting IFI if you feel you absolutely need to do that automatically in software, but don't expect a response, they don't have the manpower. Two I already alluded to this answer as well, although I'll now make myself as clear as I can. To do this, you have two choices. The smart way, don't let the bytes both be 0xff. There is a reason they're called user bytes, the user controls them, IFI has taken the assumption that the user is smart enough to read the documentation and read between the lines and realize that they cannot use those two user bytes for 0xff as well as have a working dashboard. The stupid way is to let the two user bytes be 255 at some points, and hope you designed you dashboard to skip that "flag" (as it has now become a flag). If you take the stupid way, please don't come crying to anyone on CD that your RC/OI/dashboard program exploded. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| New dashboard packet spec | Ameya | Programming | 2 | 08-01-2004 19:59 |
| Dashreader.dll: A Visual Basic .NET user control to read the dashboard port | Ameya | Programming | 4 | 12-01-2003 23:40 |
| Change to Initializing Inputs and Outputs | Jferrante | Programming | 4 | 07-01-2003 11:36 |
| Dashboard Protocol Library | archiver | 2000 | 9 | 23-06-2002 22:24 |
| New Innovation FIRST control system and the dashboard | archiver | 2000 | 0 | 23-06-2002 22:15 |