From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running VISA Serial at 460800

Solved!
Go to solution

I'm trying to run the Continuous Serial Write and Read Example at 460800 reading a series of NMEA data.  When I type the baud rate in directly I get garbled output that clearly is decoding since the delimiter is 0xA is being detected.  On Tera Term the data is decoding fine.  I looked through the forum but couldn't find exactly what I'm referring to.

 

ShotSimon_0-1599748636991.png

 

Very occasionally I will see a line get decoded correctly, usually the first line when the vi is run.

 

ShotSimon_2-1599751844438.png

Any suggestions?

 

Regards,

-SS



0 Kudos
Message 1 of 8
(1,852 Views)

What is the device you are getting this information from?  Could you share all of the Tera Term settings?

 

It may appear that a 0xA is being read, but that could easily be from random data in the read bits.  It really does look like you have some setting wrong.  Perhaps the number of stop bits, data bits, or parity?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 8
(1,842 Views)

Hi Crossrulz,

 

ShotSimon_0-1599754935382.png

ShotSimon_1-1599755012314.png

 

Termination is CR and LF so either char will decode in Teraterm

-SS



0 Kudos
Message 3 of 8
(1,829 Views)

I doubt the UTF setting is an issue.  Everything else looks fine.  The only other time I have seen something like this was when I had a device that just constantly spit out data (no breaks between messages).  It was kind of a luck of the draw for when I connected if the bits were lined up correctly to properly read the messages.  I had to program a seemingly massive number of retries to my initialization code in order for it to lock in properly.  But that also caused issues with Putty (I have very limited experience with TeraTerm).  Are you getting any errors from the LabVIEW code?  I'm specifically thinking framing errors from the VISA Read.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 8
(1,823 Views)

ShotSimon_0-1599757466181.png

When the vi exits. -SS



0 Kudos
Message 5 of 8
(1,818 Views)

I'm wondering if there is an issue with VISA and SiLabs CP2105 USB to UART at this baud rate.

ShotSimon_0-1599758336725.png

There are some posts on the SiLabs forum but I have not gone through them all.

-SS

 



0 Kudos
Message 6 of 8
(1,810 Views)

@ShotSimon wrote:

I'm wondering if there is an issue with VISA and SiLabs CP2105 USB to UART at this baud rate.

ShotSimon_0-1599758336725.png

There are some posts on the SiLabs forum but I have not gone through them all.

-SS

 


I'd go with that theory.  460800 baud sounds MUCH faster than any typical serial application I've heard of.

Message 7 of 8
(1,786 Views)
Solution
Accepted by topic author ShotSimon

Painfully simple error on my part.  I entered the 460800 into the baud rate field not realizing I was just changing the label.  The value was 9600 baud hence the garbage output.

 

The fix was to open the TypeDef and either add the higher baud rate or just use a constant.

Thanks for your help, I should have posted the code.

 

Regards,

-SS



0 Kudos
Message 8 of 8
(1,766 Views)