Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Need std and non-std baud rates on PXI-8420 (16 channel RS232)

I found a similar request on the knowledge base, and the resolution was possibly NI would make a card on a case-by-case basis.

I need the forementioned PXI card to support std and non-std baud rates (i.e. not a simple xtal change, and the software sets up for 57.6 Kbaud, and it is really 62.5 Kbaud) that is easily configured in LabVIEW/VISA.

The rates I need are as follows:

All std rates (i.e. 1200,2400,4800,9600,...)
10.4K (possible with std ports, but unsure about NI hardware and VISA).
62.5K

Thanks.
62.5K
0 Kudos
Message 1 of 8
(4,616 Views)
The golden rule in serial (UART) communication, is that if two communicating partners are within +-2% of each other, they'll happily communicate error-free. Since you often only know one side of the equation, the window narrows to +-1%.

Next, take a look at how baud rates are calculated. On most NI-Serial hardware, there is a 7.3728 MHz oscillator that is divided by 16 (to create the what I'll call the 'base' frequency), and then divided again by a divisor latch. A divisor latch value of 1 yields 460800, 2 = 230400, 3 = 153600, etc. This is where the 'standard' baud rates come from.

However, on some OS's, we divide the clock source again by 4 before it hits the divisor latch. This means 1 = 115200, 2 = 57600, etc. While this does creat
e a set of 'standard' baud rates, it also limits the number of possible baud rates. This is something that will be fixed in the future.

Now hopefully the following table will make sense. In systems that have a base of 460800, we support baud rates that are within +-1% of the following (baudrates marked with * are supported in 115200 base systems):

110-9216*, 9404, 9600*, 9804, 10017, 10240, 10472*, 10716, 10971, 11239, 11520*, 11815, 12126, 12454, 12800*, 13165, 13552, 13963, 14400*, 14864, 15360, 15889, 16457*, 17066, 17723, 18432, 19200*, 20034, 20945, 21942, 23040*, 24252, 25600, 27105, 28800*, 30720, 32914, 35446, 38400*, 41890, 46080, 51200, 57600*, 65828, 76800, 92160, 115200*, 153600, 230400, 460800.

10.4k is supported in both systems at the baud rate 10472.

If you're running at 62.5k when set to 57.6k, then you're likely using a 8 Mhz Oscillator. In this case, you have a base of 500000, and with a divisor latch value of 48 you'll be running at 10416. This cor
responds to a 'normal' baud rate setting of 9600. So if you set your modified card to 9600, you should get 10.416k.
Message 2 of 8
(4,616 Views)
I've gone back and taken a closer look at the baud rates you want. If you use a 22.1184Mhz Oscillator (legal with our UARTs), you can get all three things:

-'standard' baudrates (9600, 19200, 57600, etc) 0% error
-10.4k (10.473k) 0.7% error
-62.5k (62.836k) 0.5% error

I've attached a spreadsheet that gives details. To get the baudrates (column B), divide 460800 by the divisor latch value (column A) of the desired baudrate. Thus to get 62.5k (62.836k), divide 460800 by 22 and you'll get 20945 - which is the value that you would set the baud rate to in your program (column C)
0 Kudos
Message 3 of 8
(4,616 Views)
Can I order the PXI serial card from NI to do this (with the faster crystal)?

How do I change the divisor in LabVIEW (VISA)?

Thanks,

Todd
0 Kudos
Message 4 of 8
(4,616 Views)
Strange, my reply did not show - so I'm sending it again.

You can either replace the oscillator yourself, or have NI do a custom order. I can have someone contact you if you like.

In order to change the divisor in LabVIEW, simply set the baudrate to the rate that corresponds to your desired rate. For example, if you're using the fast oscillator (3x normal), and want to run at 115200, then you'll set the baudrate (in software) to 38400.
0 Kudos
Message 5 of 8
(4,616 Views)
The problem with replacing the xtal ourselves (we do this with USB to RS232 boxes) is that it will void the warrenty.

Has the problem with VISA been fixed, where it will allow non-std baud rates, such as 3465 to get 10394?

Thanks,

Todd
0 Kudos
Message 6 of 8
(4,616 Views)
The part about voiding the warranty is true with NI products as well. If you email me your contact info, I can have someone go over some possibilities with you (my email is Chris.Rake@ni.com).

With regards to VISA, if the driver supports the baud rate (which it will for the baud rates we're talking about) it'll let you set the baudrate.

Just to verify that the OS uses the higher (4x) base, what OS are you using?
0 Kudos
Message 7 of 8
(4,616 Views)
Update! The NI-843x High-Performance serial interface cards are now available. They will allow for custom baud rates from 57 bps up to 1 mBit/sec to within 1% WITHOUT changing the oscillator! For more info on the NI-843x hardware, you can check out the product page at http://sine.ni.com/apps/we/nioc.vp?cid=13692〈=US
0 Kudos
Message 8 of 8
(4,616 Views)