Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Dashboard Robot Controller Packet Info?? (http://www.chiefdelphi.com/forums/showthread.php?t=29557)

cbolin 16-07-2004 14:50

Dashboard Robot Controller Packet Info??
 
1 Attachment(s)
Hi,
Writing a simple VB6 program to read the 26 byte data from the OI/RC view the Dashboard port. OI is easy to read and works well. RC uses three interlaced data packets.

How do I differentiate between the three data packets for the RC?

My attachment shows three packets. Depending upon when I open and close and open again, the packets move around.

Thanks,
Chuck

Astronouth7303 16-07-2004 17:29

Re: Dashboard Robot Controller Packet Info??
 
Have you read IFI's Doc yet? it tells you everything but how to differentiate between RC and OI packets.

If you want, I'll send you a VB control to read and interprete the data.

[edit]here[/edit]

cbolin 19-07-2004 08:21

RESOLVED! Dashboard Robot Controller Packet Info??
 
Hi,
I read the spec last Friday however the means to differentiate between the frames was not explicit. However, after posting this message last Friday, I reread it a few times and finally understood the stuff that read [CTRL_C Bit 7=0, ...]. Did some bit operations first thing this morning and everything is working fine now. :-)

So, it is necessary to read two specific bits in order to figure out which of the 3 frames are being viewed.

Byte 8, bit 4 and Byte 12, bit 7. The frames are then recognized by the following pattern respectively.
Frame 1 = 0,0
Frame 2 = 1,0
Frame 3 = 1,1

The code to read the values went like this. sRec stores the string of 26 characters.

nA4 = Asc(Mid(sRec, 8, 1)) And &H10 'byte 8, bit 4
nC7 = Asc(Mid(sRec, 12, 1)) And &H80 'byte 12, bit 7

Astronouth...I appreciate the offer for the 'control' to do this for me, but the fun in all of this programming is to write the code myself.

Thanks,
Chuck

Astronouth7303 22-07-2004 15:07

Re: RESOLVED! Dashboard Robot Controller Packet Info??
 
it's open source. An ActiveX control. I can almost garentee you're already using one. The MSCOMM control.


All times are GMT -5. The time now is 17:32.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi