LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial to USB converter with GPS error

Solved!
Go to solution

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 😎 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!

0 Kudos
Message 1 of 27
(3,931 Views)

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?

 

 

0 Kudos
Message 2 of 27
(3,918 Views)

COM6 is used when using the USB to Serial converter.  I'm using a "VISA Resource Name" drop down select in the vi to select the COM port.

0 Kudos
Message 3 of 27
(3,913 Views)

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;

 

$GPGGA,Ó‚Ššr‚b¢650.29998,N,09212.09997,W,0,00,,,M,,M,,*57

0 Kudos
Message 4 of 27
(3,909 Views)

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...

 

 


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 5 of 27
(3,904 Views)

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.

0 Kudos
Message 6 of 27
(3,901 Views)

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/lverror/visa_error_codes/

 

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?

-Barrett
CLD
0 Kudos
Message 7 of 27
(3,886 Views)

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. 

 

0 Kudos
Message 8 of 27
(3,883 Views)

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.

-Barrett
CLD
0 Kudos
Message 9 of 27
(3,870 Views)

Barrett,

 

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.

 

Capture.JPG

0 Kudos
Message 10 of 27
(3,854 Views)