Dear VB mania, especially VB6 specialist
I have a problem with my GPS. So far, I have a GPS-M1zz from Pioneer Navicom company. It has 2 type of data format, i.e. Pioneer Format and NMEA data standard. I have already retrieved and parsed the NMEA one using VB6 properly. I could display all NMEA data concisely. I could understand weell this standard.
But, now, I have a problem with the Pioneer format standard. It is very different format with special HEX data format rather than NMEA with ASCII character.
I`ve already tested a small routine program to retrieve Pioneer data format. Below is the example:
case I : I used the function:
varBuffer = mscPort.Input
txtRecieveData. Text = txtRecieveData. Text & varBuffer:
output:
u イC &О& ( ! 64・ u イC &О& ( ! 64・ u イC &О& ( ! 64・ u イC &О& ( ! 64
Case II:
But, when I wrote
varBuffer = Asc(mscPort.Inp ut), the output becomes:
161781617830161 783016178301617 830161783016178 301617830161783 016178301617830 161783016178301 617830161783016 178301617830161 783016178301617 830161783
In order to understand the Pioneer packet format, here they are:
<DLE> <ID> <data type> <CS> <DLE> <ETX>
in case of checksum byte is exist.
DLE(Data Link Escape) is 2 byte with HEX number 10h
ID = 1 byte
ETX (End of Text) with HEX number 03h
The questions are:
1. How to recognize the beginning of Data, ID etc, when I use CASE II retrieved data? Is there a mistake with my routine? If yes, how to revise it?
2. This format is no delimiter like NMEA format with "comma". It is sequently the data is retrieved. How to parse it into each of their sentence part?
I need helps.
Thanks alot.
ps: I am using VB6 version.
Regards,
basyarie
I have a problem with my GPS. So far, I have a GPS-M1zz from Pioneer Navicom company. It has 2 type of data format, i.e. Pioneer Format and NMEA data standard. I have already retrieved and parsed the NMEA one using VB6 properly. I could display all NMEA data concisely. I could understand weell this standard.
But, now, I have a problem with the Pioneer format standard. It is very different format with special HEX data format rather than NMEA with ASCII character.
I`ve already tested a small routine program to retrieve Pioneer data format. Below is the example:
case I : I used the function:
varBuffer = mscPort.Input
txtRecieveData. Text = txtRecieveData. Text & varBuffer:
output:
u イC &О& ( ! 64・ u イC &О& ( ! 64・ u イC &О& ( ! 64・ u イC &О& ( ! 64
Case II:
But, when I wrote
varBuffer = Asc(mscPort.Inp ut), the output becomes:
161781617830161 783016178301617 830161783016178 301617830161783 016178301617830 161783016178301 617830161783016 178301617830161 783016178301617 830161783
In order to understand the Pioneer packet format, here they are:
<DLE> <ID> <data type> <CS> <DLE> <ETX>
in case of checksum byte is exist.
DLE(Data Link Escape) is 2 byte with HEX number 10h
ID = 1 byte
ETX (End of Text) with HEX number 03h
The questions are:
1. How to recognize the beginning of Data, ID etc, when I use CASE II retrieved data? Is there a mistake with my routine? If yes, how to revise it?
2. This format is no delimiter like NMEA format with "comma". It is sequently the data is retrieved. How to parse it into each of their sentence part?
I need helps.
Thanks alot.
ps: I am using VB6 version.
Regards,
basyarie
Comment