I am having problems configuring a serial port in Linux. I use Redhat9.0 and am attempting to configure a serial port using the "Visa Configure Serial Port.vi" When I try to configure the VISA serial port, I always get the same error: "code: -1073807346, property node in VISA Configure Serial Port." That code isn't listed in the database. I think I have most all of the property nodes properly set (the baud rate, termination character etc.) But I am unsure about VISA resource name. I tried entering "COM1" "COM2" "ttya" "tty0" "ASRL2:INSTR" None of these worked. I tried changing the resource type to "Serial Instr" but that didn't seem to matter either. Any ideas on how to fix this? Is there some configuration of t he port I need to do before I can use it with Labview?
I've attached my Labview program (SerialInit.vi) with the configVI that's giving me troubles. Thanks for your help.
Have you tried with a program how hyperterminal in windows? If you find it in Linux, you can communicate with instrument serial without labview, when communication it's ok, you can bring right settings and tried with LV.If with hyperterminal you don't communicate then the problem is in the cable or in the port
I can run it with LV 7.0 on my slackware box. However, I always get a warning: "code: 1073676424, Visa Set I/O Buffer Size in SerialInit.vi"
To answer your question, looks like you don't have VISA configured properly. Try going to /usr/local/vxipnp/linux/NIvisa/ to run 'visaconf' and 'NIvisaic' for configuration and intereaction, respectively. You may have to do this as root. When done, the VISA resource name should magically appear in the control pull-down of your app. If you don't see it in the control, then it usually means that visaconf hasn't been run properly.
When using Linux there can be any number of gotchas. Like the other poster said, you may want to use a hyper terminal-like interface to validate port config. I use minicom.
The warning code in Set I/O Buffer Size is expected behavior on Unix platforms. The Win32 API allows the user to specify the size of a preallocated buffer that the kernel will keep inbound data in. This is not a feature that the Posix API supports, at least not that I am aware of.
The reason we give a warning rather than an error is that the OS buffer is usually large enough for most customer applications. The reason we give a warning at all is that we want users to realize that VISA can't satisfy the request completely by itself.
Hi again- I tried to run the visaconf and NIvisaic tools (as root, of course). But I could not run them . I get the following error message: /usr/local/vxipnp/linux/NIvisa/visaconf
./visaconf: error while loading shared libraries: libvisa.so: cannot open shared object file: No such file or directory
same happened for NIvisaic. what am i missing? Another discussion thread (http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/c9858cb0446896a786256bb800503692?OpenDocument) said something about linking linking libvisa.so to the user library--but I couldn't interpret this nebulous instruction. thanks again for your help 😃
In article <506500000005000000EF330100email@example.com>, "jonny e" wrote:
> Hi again- > I tried to run the visaconf and NIvisaic tools (as root, of course). But > I could not run them . I get the following error message: > /usr/local/vxipnp/linux/NIvisa/visaconf > > ./visaconf: error while loading shared libraries: libvisa.so: cannot > open shared object file: No such file or directory > > same happened for NIvisaic. > what am i missing?
Hey, you found another gotcha! This is good coz it's common with many app installations. Long story short, place the following in your /etc/ld.so.conf
Then run 'ldconfig' as root. This will configure the run-time bindings to the shared libraries. Look at the man page for details.
Some more details... Whenever you get an error message like that, try using 'ldd' against the executable. For example, 'ldd /usr/local/vxipnp/linux/NIvisa/visaconf' (as any user) will produce the following:
In your case some of the paths should show something like "not found". After running ldconfig with the new lib paths in your ld.so.conf file, they will appear. Then you should be able to run visaconf, unless there are more problems.
BTW, I assume that since I don't use Redhat the paths to ld.so.conf may be different. Perhaps they have a totally different mechanism. If you can't find the file, you can always test this method by passing the path of the library to the 'ldconfig' command directly with the -l option (see man page).
I would think the RPMs or the install script would handle this stuff but since I've never used them...
Let me know if it's still not working. I'll be around for a while tonight 🙂
In article <firstname.lastname@example.org>, "jonny e" wrote:
> Hi Methis- > You are a true champ! I did what you suggested above and everything > works now. > Thanks again for your help! > > ps. where did you learn all this stuff? i've been using linux for > almost a year and still have much to learn 😃
Oh please, you're making me blush. Really, I'm not as far along as I could be. I started working with Linux about a four years ago. Only for the past year have I completely submerged myself. Seriously though, windows is like crack. It's very hard to break free of it. What you need to do is commit yourself (at the minimum) to a dual boot system with windows and Linux. Then gradu ally you find that you never even use windows... for anything.
man pages and googling usenet are your best friends.
Good luck with the VISA stuff. Feel free to use my email (without 'killspam') for Linux specific questions.