08-19-2012 07:05 PM
Hello all,
Is 9600 the max baud rate for LV? I'm currently using a LV RS232 cable in a loopback configuration to test...using 9600..and it works fine.
What I wil be hooking eventually, they said they'd want to run it at 62,500 due to the crystal on the hardware this will be eventually hooking too.
I just tried adjusting my baud rate on my loopback set up to 62,500....to see what would happen, and it error'd out.
I'm hoping this can run faster than 9600...and when searching through the forum posts here...I seem to see things saying that it can......
Any suggestions or links to info on this?
Thanks in advance,
cayenne
08-19-2012 07:15 PM
08-19-2012 07:17 PM
It depends entirely on the hardware port that is doing the RS-232 communications. Look to its specifications. If it can handle baud-rate X then LabVIEW can drive it at baud-rate X.
08-20-2012 05:49 AM
I'm using 115200 and it works fine. Maybe your Uart only supports specific speeds, as 57600? Try 1200, 2400, 4800, 9600, 19200, 38400, 57600 and 115200.
/Y
08-27-2012 08:08 AM
If it's a non-standard baud rate you will need special hardware. You might be able to make a special circuit with a UART using standard crystal and interface it to a second UART using their non-standard crystal.
Many years ago I had to communicate at 7812 baud to an automotive module. The module designer saved a lot of money by using a cheap 3.25 MHz crystal in his circuit instead of the standard 4 MHz. He made my test engineering life more difficult though. I programmed (assembly code) a 6805 series uP to accept I/O on the computer side at 9600 baud and "translate" it to 7812 baud on the other. It ran very well both directions.
Bottom line: Non-standard baud rates are nasty, but the easier solution is hardware.
08-28-2012 11:25 AM
It may be possible to do custom baud rates with standard hardware if you have the right hardware.
I'm doing some cRIO/EtherCAT programming for an NI-9870 RS-232 module and got to wondering about some configurable properties called "Baud Rate Divider" and "Baude Rate Scaler" and found the following information on this page: http://zone.ni.com/reference/en-XX/help/370984T-01/lvaddon11/crio-9870/
Property | Description | ||
---|---|---|---|
Baud Rate (write only) | Sets the target baud rate for the port. If you set the baud rate, the appropriate Baud Rate Prescaler and Baud Rate Divider are set automatically, and are calculated according to this formula:
BaudRate = 3.6864 Mbps / (Prescaler * Divider)
|
||
Baud Rate Divider (read/write) | Specifies the divider for the baud rate as defined by the baud rate equation above. This property is useful for setting a custom baud rate programmatically. Use the C Series Module Propertiesdialog box as a calculator to find the appropriate divider for the desired custom baud rate. This value is an unsigned 16-bit value within the range 4–65535.
|
||
Baud Rate Prescaler (read/write) | Specifies the prescaler for the baud rate as defined by the baud rate equation above. This property is useful for setting a custom baud rate programmatically. Use the C Series Module Properties dialog box as a calculator to find the appropriate prescaler for the desired custom baud rate. This value is defined as a type def, either 1 or 4. A value of 4 is normally used only for very low baud rates. |
I'm fairly certain that the NI-9870 will work in other non-cRIO backplanes (like the USB-based NI cDAQ-9174) but whether or not it will support these same options in an alternate backplane is unknown to me. If you are interested, contact your NI technical sales person and ask them to get you an answer.