LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Baudrate setting with CVI runtime for Linux

Solved!
Go to solution

Hello folks,

 

I have a problem concerning the baudrate setting with the CVI runtime for Linux.

I want to communicate with a device which has a USB-to-serial chip from FTDI. The driver for this device is already included in the kernel (openSUSE 11.1, kernel 2.6.27.23-0.1-default i686).

I can use a terminal program (HTerm 0.8.1beta) to open the serial port at /dev/ttyUSB0 and can set all the baudrates the device supports (38400, 115200, 921600) and the communication is working perfectly.

 

Now I take the serial example from NI and run it under Windows. I expanded it to support 921600 baud, and it works fine. Then I try to run this sample under Linux (I expanded it to open /dev/ttyUSB0), but it only works for 38400 baud. If I try to set 115200 or 921600 baud then I get RS232 error -14 (invalid baud rate).

 

It would be nice if there is anybody who can give me a suggestion what I have to do to get 921600 baud working.

 

Best regards,

 

Martin

0 Kudos
Message 1 of 6
(4,724 Views)

Hi Martin,

 

are you running Linux and windows on the same machine with the same serial port?

Could it be that your serial port isn´t configured for 11520 in the Linux-distro you are using?

 

The usually supported baudrates of VISA for Linux are:

 

Standard baud rates supported by most serial ports:
 
  • 110
  • 300
  •  
  • 600
  • 1200
  •  
  • 2400
  • 4800
  •  
  • 9600
  • 14400
  •  
  • 19200
  • 28800
  •  
  • 38400
  • 56000
  •  
  • 57600
  • 115200
  •  

     

    On my end everything is working fine. I was running the "basic serial.vi" on both the Linux and the Windows System @ 115200Baud.

    So there should be something with your serial settings I guess.

     

     

    Marco Brauner NIG
    0 Kudos
    Message 2 of 6
    (4,689 Views)

    Hi,

     

    I think there was a little misunderstanding. I am not using LabVIEW but LabWindows/CVI with the Linux Run-Time Engine. And I'm not using VISA calls but the RS232 library with OpenComConfig, ComRd etc.

     

    Windows and Linux are on the same PC. And the serial port (which is a virtual serial port because it's a USB-device with FTDI-chip) must be able to communicate up to 921600 in the Linux-distro as I can use the Linux terminal program HTerm with this baudrate to successfully communicate with the device.

     

    Regards,

     

    Martin

    0 Kudos
    Message 3 of 6
    (4,674 Views)

    Hello Martin,

     

    Actually, you appear to have run into a known issue with the CVI Run-Time Module for Linux.  Attached below is a patch that should resolve the situation for you.  The readme file explains how to install the patch.  Please let me know if you have any questions or trouble with the patch.

     

    Thanks, and sorry for the inconvenience!

     

    NickB

    National Instruments  

    0 Kudos
    Message 4 of 6
    (4,673 Views)

    Hi Martin,

     

    yes, you are right. I was too fast going to the Linux-machine right beside my PC, connecting them with a serial cable and

    running the quick visa-test, which was working well. 

    Ok, thank you Nick for providing the patch. And I also would be available if there are further issues to test.

     

     

    regards

     

    Marco Brauner NIG

    0 Kudos
    Message 5 of 6
    (4,666 Views)
    Solution
    Accepted by topic author Martin_Manger

    Hi NickB,

     

    the patch did it!

     

    Thank you very much.

     

    Best regards,

     

    Martin

    0 Kudos
    Message 6 of 6
    (4,661 Views)