LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial communications Linux

Solved!
Go to solution

Greetings;

 I have installed Labview 2010 on Fedora 13 along with NI VISA. Although, I am not able to access the any of my USB ports via LabVIEW. I have read the article on Troubleshooting Serial Communication in Linux. I have tried running LabVIEW and visaconf (from the command line) as a root user in case I did not have sufficient privileges for the directories vxipnp and natinst, I do (lock symbol was not on either of the directories). My end goal is to communicate with Arduinio Duemilanove Atmega328 board. This question seems more and more suitable for a LINUX forum as to LabVIEW. In any event, help would be greatly appreciated.visaconf.jpg

0 Kudos
Message 1 of 7
(6,298 Views)

Hey fchandur,

We do not have much literature on communicating with the Arduinio Duemilanove Atmega 328 board if any. Just to confirm, you are doing Serial to USB? Is there another device that is similar to yours, perhaps we have seen it before and can therefore go through similar steps.

Thanks,

 

Ricky V.

National Instruments
Applications Engineer
0 Kudos
Message 2 of 7
(6,266 Views)

I am not using a special serial to USB cable, both nodes have the USB symbol on it. I am able to communicate with Arduino via LabVIEW 2010 on a Windows 7 machine. My problem, I fear, is native to LabVIEW on a Linux machine (Fedora 13). It is on Linux OS that I am unable to access any of the common serial ports. However, Arduino 0022 software comes with a "serial monitor" and using that I may communicate with the board.

 In windows I am able to write a simple VISA read/write program with resource name already available to me, in Linux however I receive no resource names.

To summarize:

LabVIEW, on Linux, can't access the port to which Arduino board is attached to(I am quite sure it is /dev/ttyUSB0). 

LabVIEW, on Windows 7, can access the port to which Arduino board is attached to (COM6).

Arduino(Alpha 0022) software, on Linux (so far, only as a sudo user), can talk to the board using "Tools>>Serial Monitor"

I am attaching an image of the cable that I am using, if that is of any assistance. Thank you so much for the help.

USB-2.0.jpg

 

0 Kudos
Message 3 of 7
(6,263 Views)

Hi fchandur,

 

Can you connect to the port using a tool like minicom, putty or C-Kermit? That will be the first step in troubleshooting what is going on. Also Fedora 13 is not a supported Linux Platform by NI, so it is possible that it may not work. For reference the supported Linux platorms are:

 

Red Hat Enterprise Linux WS 4
Red Hat Enterprise Linux Desktop + Workstation 5
Red Hat Enterprise Linux Desktop + Workstation 5 x64 32-bit User-Mode
openSUSE 11.1
openSUSE 11.2
Scientific Linux 5.x

Joe Daily
National Instruments
Applications Engineer

may the G be with you ....
Message 4 of 7
(6,241 Views)

Your MCU board use a FT232R chip that is the latest device to be added to FTDI’s range of USB UART interface Integrated Circuit Devices. So you will need a linux driver for that chip. Take a look here http://www.ftdichip.com/Products/ICs/FT232R.htm

With a proper driver your MCU board should be seen as RS232 port on your linux system. I think. I am not into Linux. so I can not tell for sure



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 5 of 7
(6,230 Views)

Thanks Joe for providing me with the idea of installing putty. I had installed minicom but interface was not as intuitive. After installing putty there was some success. I initiated the program as a sudo user and the serial port to which my Arduino board was attached was able to receive signals from putty. So the OS is okay with the communications.

Now I have tried starting LabVIEW as a root user from the command line, and receive this particular warning which may very well be, or so I hope,  the reason why LabVIEW is unable to  access my serial ports.

 

 

(labview:2177): GnomeUI-WARNING **: While connecting to session manager:
None of the authentication protocols specified are supported.
I have constantly been reminded by NI Engineers (Engineer D and Engineer Z so far) that Fedora is not supported. I like LabVIEW and I like Fedora, please may I have both.

 

0 Kudos
Message 6 of 7
(6,201 Views)
Solution
Accepted by topic author fchandur

Finally, I have been successful in fixing my problem. Though it is no better than duct taping it. Go to Visa Configuration GUI, double click on ASRL1::INSTR. This will open up the Resource Editor window, under Binding change the path from /dev/ttyS0 to /dev/ttyUSB0; save the changes. Now, that path is fixed: you want to start LabVIEW 2010 under sudo. Once the LabVIEW is all fired up and a blank VI is ready to be written on, its time to test if the changing of binding path has done the trick. Put in a VISA configure serial port sub VI in the block digram and link the constant "ASRL1::INSTR" as the resource name, and check if any errors have risen.

I still do not know why I can not access serial ports as a normal users I made myself part of all groups under System>>Administration>>Users and Groups. Anyways that a question need be explored in Fedora forum. Just hoping against hope that it is a simple fix.

resource_editor.jpg

0 Kudos
Message 7 of 7
(6,163 Views)