Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

no standard baud rate value? Is it possible?

Hello everyone and thank you in advance.
This is my first question here as I am on my first labview steps, so.... sorry if the questions is to silly!
 
I need to make an application to capture a serial communication link at 10000 bauds.
 
I use the labview example code visa session as base for read/write operations, and I get no error as long as the baud rate is 9600 or n x 9600. But when I try values such as 10000, the value I need, I get an annoying confuguration error ( -1073807330)
 
Does labview accept any non standard baud rate value? If it doesn't, how can I get over this error?
 
Thank you!
 
 
 
0 Kudos
Message 1 of 8
(5,204 Views)
I suspect that it's the UART in your pc that doesn't support the non-standard baud rate. Can you you set it to 10000 baud in Hyperterminal? You might want to look at NI's PCI-8430 board. You can set it to any baud rate (with VISA) between 57 and 1M.
0 Kudos
Message 2 of 8
(5,194 Views)
Thank you!
 
Well, The pc is a NI embedded pc for a pxi chassis. I haven't tried it but I think it should be able to switch between different speeds. In fact the baud rate is fixeable by a register in the uart, either it is an microcontroller embedded or independent one. It would be the first uart not "fully configurable" in my life!
 
As for the software way, any idea of any problem source?
0 Kudos
Message 3 of 8
(5,168 Views)
As Dennis mentioned the UART on the PXI controller only supports the standard baud rate. This is the same for all built in COM ports on ANY computer and just about any 16C550 UART. The baud rates are limited by the ability of the UART to divide down a fixed crystal oscillator speed on the 16C550 UART.

The standard baud rates are:
110
300
600
1200
2400
4800
9600
14400
19200
28800
38400
56000
57600
115200

In order to hit a non-standard baud rate it requires having 16C950 compatible UART. National Instruments sells the high-performance PXI-843x line of serial boards that use a 16C950 compatible UART that are capable of hitting any baud rate, including 10000.

-Josh
0 Kudos
Message 4 of 8
(5,161 Views)
thank you for the answer, but i am not sure about what you say. I mean, you can use the divider you want on a 16c550. Usually they have three crystal oscillators (if I'm not mistaken), and one of the, the one that generates 9600 and 14400 baud rates, can be adjusted to any divisor between 0 and 2^16. That means that you can, if not the exact value, get a similar value, and, by all means, a non standard value, if not with one crystal, with another.
 
I have worked with 16c550 programming in C, and I haven't had any problem with "any" baud rate. That's why it seems extrange to me...
 
Maybe I am completely wrong, but that's my experiencie, and that's why I tend to find a software solution.
 
 
 
 
 
0 Kudos
Message 5 of 8
(5,150 Views)

A "little" mistake by myself...

You can divide by "any" number, but it must be an integer. And that's the limit! You can get 9600 and the next integer will give you 10400, but as Joshua said it cannot be adjusted at any baud rate. I was wrong.

The only point about Joshua's message is that there are a few more possible baud rates than the ones you listed, but not many.

So thanks to Jushua and Dennis. You've really helped me!!

LS

0 Kudos
Message 6 of 8
(5,129 Views)
Although I am a little late in discovering this dicussion, it is still relevant to me. 
I remember I had the same problem (wanting to use 5 and 10400 baud for automotive K/L-line).  In my case I was already using VIs (LV6.02) that worked well at both these speeds.  I tried to switch to LV7.1 and everything stopped working.  Some of the serial functions that were suppoted (and needed) under LV6.02 are just not supported anymore under LV7.1.
I remember working on the VIs when I developped them.  It was impossible to get to the required baud rates using the VISA drivers so I used the legacy serial port VIs.  As far as I can see, these have been raplaced by VISA versions in LV7.
In short : Legacy drivers support non standard baud rates (LV6), newer versions don't.
Up to now we used LV6 on an old computer to do our automotive comms.  It would be nice to migrate to a newer computer and LV.  Does anyone know how to solve this problem ?
Take a look at this strange situation :
life expectancy of human : 70 years and increasing
life expectancy of a car, including on-board computers and software : 10..15 years and increasing
life expectancy of a PC hardware : 5..10 years and stagnating
life expectancy of Labview, including VIs : less than 5 and decreasing
        
0 Kudos
Message 7 of 8
(4,758 Views)
Hi

VISA does test the exact baudrate available in windows. Not  all baudrates are supported and visa test the result.
The old serial card tried the closest in the neighbourhood. you can do this now yourself.
Some baudrates report an error, some don't.

good luck

greetings from the Netherlands
0 Kudos
Message 8 of 8
(4,750 Views)