I recently created a program to log GPS information from a Garmin GPS18 antenna. The GPS uses a serial port on the docking station of my laptop for communication and USB for power. In order to deploy this application to a field location, I need to use a USB to Serial converter since the laptop itself does not have a serial port. The program runs fine using the dockingstation and it's serial port, however, when trying to use the USB to Serial converter it routinely errors out. The typical error is -1073807523, "VISA Read in GPS18_read.vi". I have also seen an error that read something like "Property node (argument 8) in VISA configure Serial Port (Instr).via - > GPS18_read.vi".
For troubleshooting, I have used "PuTTYtel" and verified that I can read the GPS18 out via the USB to Serial converter, without problems. Serial settings used are 19200 baud, 8 data bits, 1 stop bit, no parity, and no flow control. But, when trying to read using the LabView vi, it throws the previously mentioned errors. Any suggestions would be appreciated!
Solved! Go to Solution.
Serial settings used are 19200 baud, 8 data bits, 1 stop bit, no parity, and no flow control.
(I know it's a silly question, but there goes)
What is the serial port number that you use with PuTTyTel? Is it the same in LabVIEW? Are you using COM(port#) thru a VISA control? or an integer which represents the port number?
Ultimately, I'm particularly interested in the $GPGGA string (for those familiar with NMEA messages) being output from the GPS. Here is an example of the string when it crashes;
Maybe a power issue? How are you connecting the two USB devices to the laptop? A USB device can be high power or low power. If you connect a passive style 'slim' laptop USB hub and connect the two devices to that, you may be power limited on the port.
Also, is the laptop running on battery? Power conservation modes may be trying to shut down your USB port...
Using two ports on the laptop. No, not running on the battery during dev. I do not believe it to be a power issue, because as I previously mentioned, the GPS messages (NMEA) are perfectly normal when I connect to the GPS device via PuTTYtel.
that string ain't right! GGA starts with Time, Lat, Long, so it looks garbled for the time and the first character of Latitude. Looks like the garbled characters add up: time is 8 chars, one for the comma, then the first d in the dddd.dddd of latitude.
are you sure the error is "-1073807523" ? that one is not in the VISA error list: http://zone.ni.com/reference/en-XX/help/371361F-01
but! "-1073807253" *is*, and that's a framing error (VISA got a frame that wasnt 8-n-1 as it expected, either because it wasn't sent or it read the HW incorrectly), which would account for the garbled text.
How are you reading from the serial buffer in LV?
Yes, my mistake, should be "-1073807253". And yes, I realize the $GPGGA message is incorrect. The "garbled" section is not always the same either.
Also, using the "VISA Read" function to read the buffer, which is then parsed.
post your code. if it works in a terminal emulator but not in your LV code, then it should be useful to take a look at how you string the VISA functions together.
Here is a section of the code. As I mentioned, when using the physical COM port on the laptop docking station it works just fine. It's only when I'm using the USB to Serial converter when I run into problems. Hope this helps.