LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to separate two GPS signal in one COM Port

I am using a GPS Receiver to receive a serial data (NMEA). I am only connected to one COM Port. At present I am only getting the sentence data of $GPGGA............ But I also want to receive simultaneously the $GPRMC........... NMEA data.
I tried to get both data using Labview but I am getting alternate data every second. I want to separate the $GPGGA and $GPRMC data field.
How can I do this in LABView?
 
0 Kudos
Message 1 of 60
(6,185 Views)
You can try this.  I don't remember if it worked correctly, as I ended up using a different GPS for my project.  I do remember there being as issue with what you are talking about, but can't recall if I solved it with this version of the VI
Message 2 of 60
(6,165 Views)
Dear Mr Brian Beal,
 
I am sorry for this late reply.
I test the VI you sent me and its working fine. I can get both the GPRMC and GPGGA data.
Thank you very much.
This is very helpful for my application.
 
Best regards,
0 Kudos
Message 3 of 60
(6,138 Views)
Hi Brian,
 
I tried to test this VI again and I am having problem (maybe I overlooked it before when i first test it). I want to get two gps data simulateously (GPRMC and GPGGA) but what happens is I can get the GPGGA and GPRMC data on the GGA and RMC cluster fields respectively. The GPGGA comes every second (as I requested) but the GPRMC is delayed. The update delay is random, sometimes it will took 5 seconds and sometimes 10 seconds and more.
 
On the read buffer it will show the alternate GPGGA and GPRMC data. But the GPRMC data shows strange characters!
 
I think this strange character is causing the delay on the gprmc data. I checked and made the baud rate of my pc, VISA Serial, and GPS all the same as 57600.
 
Did you encounter the same problem as before? Am I missing something on the application? Kindly advise.
 
p.s. On your last post on my other thread, I will reply to you shortly.
0 Kudos
Message 4 of 60
(6,065 Views)
I don't have an answer for you right now, but I will hook up my GPS and see what happens.  I will let you know what I find out.
Message 5 of 60
(6,057 Views)

Dear Mr Beal,

Sorry for the trouble. I made some test again today and I found what is making the delay. I changed the request timing of data from the GPS Receiver. Before, I requested an every second update data for both GPRMC and GPGGA, but today I tried to change to 0.2 second and 0.5 second update rate for GPRMC and GPGGA respectively. The result is I am now getting continuous data, and the timing have improved a lot.

Thank you always for your kind help.

0 Kudos
Message 6 of 60
(6,046 Views)
I have a couple more suggestions.  When the GPS is set up to output data, unless that data is read continously, the messages build up in the com port buffer.  Whenever you run the VI you should clear the serial buffer, otherwise you are not assured that the data you are reading is the most current.  You may also be able to set up a custom message in your GPS and the poll it when you need it.
0 Kudos
Message 7 of 60
(6,040 Views)
Make sure  your recieve buffer is large enough !! Else you will overwrite  recieved data !
If I remember correctly the NMEA protocol is set at 9600baud rate. Which means that even though you set your
com port at 57600 baud your GPS reciever only recieves data at 9600 !!. But you transfer data between the reciever and
Com port at the higher rate. So if the GPS reciever buffer has not been flushed before then you could actually be transferring 'old' data.

chow  xseadog

0 Kudos
Message 8 of 60
(6,035 Views)
Correction to previous mail!
NMEA -0183
Baud rate is 4800 not 9600 as previously stated.
Which limits total throughput at port to ~450 characters per second.

Xseadog
0 Kudos
Message 9 of 60
(6,030 Views)
I configured the GPS receiver to output data whenever the VI runs. On the start of the day, someone will turn ON the controller and the GPS receiver, and in a few seconds it will get GPS data. Also, at the end of the day, someone will turn OFF and will stop receiving GPS data. I want to understand how can I clear the serial buffer. Do I need to do "clearing of serial buffer" since my operation is ON and sudden OFF?  
 
"I have a couple more suggestions.  When the GPS is set up to output data, unless that data is read continously, the messages build up in the com port buffer.  Whenever you run the VI you should clear the serial buffer, otherwise you are not assured that the data you are reading is the most current.  You may also be able to set up a custom message in your GPS and the poll it when you need it."
0 Kudos
Message 10 of 60
(6,024 Views)