07-25-2017 01:22 PM
I am trying to run a RS232 serial program that I developed on LabWindows/CVI 2013 Windows7, and I have installed the LabWindows CVI Linux Run Time Engine on LINUX RHEL 7 and it seems to run great in both configs Windows 7 and Linux.
On the Linux side I am unable to do any SENDS or READS but the Comm Config seems to work fine at least it doesn't complain. I first checked to ensure I had full access to R/W on dev/ttyS0 and I do but nothing ever seems to make in and out using a loop back serial cable.
With the same cable on the Windows side I have no problems what I send out NumofBYTES is always availble to READ and works great.
With the Windows config COM1 which is represented as an int = 1 doesn't necessarily mean that same int = 1 would map to dev/ttyS0 on the Linux side which could be one problem.
I also have never installed any additional NI Drivers on the LINUX machine such as NI VISA or NI SERIAL which are installed on the Windows side.
Any information would be appreciated I know this is a small group doing these kind of applications and deploying on Linux.
07-26-2017 07:16 AM
NI VISA and NI Serial are not responsible/necessary for the operation of the RS232 library.
So this is probably not the problem.
08-02-2017 07:35 PM
Does anyone know if the Open Com and Open Com Config function panels in the RS232 library for LabWindows/CVI 2013 have any capability on linux for example to access serial ports if you pass the "/dev/ttyS0" as second argument and if so then what do you pass in the first agrument?
The build on linux with the CVICC will fail if you don't pass something for the first argument but the behavior suggests it ignores "/dev/ttyS0" if you pass any int in argument 1.
Thanks for any help!
08-03-2017 09:42 AM
The OpenCom and OpenComConfig functions are listed under functions that behave slightly differently in Linux than in Windows:
http://zone.ni.com/reference/en-XX/help/370051K-01/cvi/differences/
From my understanding of the help documentation the first parameter is the port number that you want to map to the device name you put in. Here is a very similar forum post that gives a more in depth explanation than I have here:
https://forums.ni.com/t5/LabWindows-CVI/LabWindows-CVI-OpenComConfig-usage/td-p/1691120
08-03-2017 09:47 AM
I do a lot of serial port programming on CVI for Linux, but I use the Posix interface, not the CVI library.
Can you actually get your serial interface to work manually in minicom ?
08-03-2017 09:51 AM
Yeah serial port do work using Minicom on Linux. it is a little difficult to use minicom because it maybe an older version but I did get it to transmit bytes out both serial ports.
08-03-2017 11:58 AM
I should also say I wrote a quick and dirty C program and compiled it with the GCC and ran it and it worked fine on both serial ports.
08-08-2017 06:45 AM
So what I ended up doing was using the Linux serial libraries versus using the CVI sort of a hybrid solution thanks for this suggestion it was what ultimately ended up being my partial solution.
08-08-2017 07:10 AM
Just beware that Linux gives you a TON of options for serial port (the flags for open(), the ioctl() calls, the fcntl() options, the c_flag, l_flag, i_flag, o_flag...), many of which are poorly understood and rarely used, and some will depend on your hardware adapter (in other words, some options don't actually change anything).
08-28-2017 02:47 AM
How to transmit data by using RS232 from cvi2013 linux installed version (CVI is installed in Opensuse 12.1)?
All other operations are working fine, can able to access RS232 from opensuse, but could not transmit or receive data only when i run CVI linux version.
@jschafer10272 wrote:
I am trying to run a RS232 serial program that I developed on LabWindows/CVI 2013 Windows7, and I have installed the LabWindows CVI Linux Run Time Engine on LINUX RHEL 7 and it seems to run great in both configs Windows 7 and Linux.
On the Linux side I am unable to do any SENDS or READS but the Comm Config seems to work fine at least it doesn't complain. I first checked to ensure I had full access to R/W on dev/ttyS0 and I do but nothing ever seems to make in and out using a loop back serial cable.
With the same cable on the Windows side I have no problems what I send out NumofBYTES is always availble to READ and works great.
With the Windows config COM1 which is represented as an int = 1 doesn't necessarily mean that same int = 1 would map to dev/ttyS0 on the Linux side which could be one problem.
I also have never installed any additional NI Drivers on the LINUX machine such as NI VISA or NI SERIAL which are installed on the Windows side.
Any information would be appreciated I know this is a small group doing these kind of applications and deploying on Linux.