Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-VISA in Open Suse 12.1 and USB

I need the control of an instrument of measurement in C programming in Open suse with USB cable, i installed NI_VISA in /usr/src/linux-version, the installation was done correctly. i ask to known if i need to configure this lib. no more info exist on the NI website, could someone help me for that?

0 Kudos
Message 1 of 15
(6,864 Views)

Hi Marjekbir1,

 

Are you controlling a third party device or National Instruments device? There should be no need to augment the lib to work. If a problem does arise there are troubleshooting programs you can use.

This resource goes through the resources that are provided.

 

Have you tried to use it yet? If there are any errors thrown, please include those.

Paolo F.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 15
(6,792 Views)

Hi Peolo,

 

Thanks for your response,

I finish with installation of NI-visa on my system, when i plug the instrument to PC via USB cable, i found the /dev/usbTMC0 like fs, but nothing in /proc/bus/usb as mentionned on the website of NI-visa instructions.

 

Now , i try to execute <<visaconf or NIvisaic>> , this step give this error:

<<libnipalu.so failed to initialize, Perhaps you need to run updateNIDrivers>>. When i execute in root :  updateNIDrivers, I  have  the summary below:

------------------------------------------------------------

Configuring for linux kernel version 3.1.0-1.2-desktop.

********************************* NOTE *********************************
Using kernel headers found in /lib/modules/3.1.0-1.2-desktop/source.
If this does not correspond to the location of the 3.1.0-1.2-desktop headers,
then define KERNELHEADERS in your environment to point to the location
of the kernel headers, define KERNELTARGET as the version of the
kernel for which to compile, and then rerun ./configure.
********************************* NOTE *********************************

Kernel has reparent_to_init(): no
Number of arguments for do_munmap(): 3
pte_offset function: pte_offset_kernel()
Levels in page table: 4
Kernel has remap_pfn_range: yes
Kernel has kzalloc: yes
Kernel has chained SGL support: yes
USB altsetting name: cur_altsetting
Kernel has usb_get_intf(): yes
Kernel has intf_cache member in usb_host_config: yes
Kernel has ep[] members in usb_device: yes
Kernel exports usb_set_configuration(): no
Units of USB_CTRL_GET_TIMEOUT: msec
Kernel has owner member in usb_driver: no
Kernel has put_page_testzero(): yes
Kernel has mutex method: yes
Kernel has wait_for_completion_interruptible: yes
Kernel has config.h: no
Kernel has ioctl32.h: no
IRQ handlers have pt_regs: no
Kernel has work_struct and delayed_work: yes
Kernel supports fault method in vm_operations_struct: yes
Kernel has ioremap_wc: yes
Kernel has pgprot_writecombine: yes

Storing configuration in Makefile.in
If the values stored are incorrect they can be changed before running make.

Installing NI-KAL:
NI-KAL successfully updated.
Updating client modules:
nipalk.ko successfully updated.
NiViPciK.ko successfully updated.
niorbk.ko successfully updated.
nimdbgk.ko successfully updated.
nidimk.ko successfully updated.
NiViPxiK.ko successfully updated.
nipxirmk.ko successfully updated.
nimxdfk.ko successfully updated.
nipxigpk.ko successfully updated.
Rebooting is required to ensure that National Instruments drivers
have been successfully updated.
Would you like to reboot now? [yes|no]

 

 

-------------------------------------------------------------

 

after this step , i confirm to reboot the computer.

 

After that, in command line i execute <<visaconf or NIvisaic>> , then i have the same error << libnipalu.so failed to initialize, Perhaps you need to run updateNIDrivers>>

 

Do you have any suggestion for me? and, in my summary,  could you tell me why the line in bleu is without succes.

 

Thanks a lot

0 Kudos
Message 3 of 15
(6,778 Views)

Hi marjekbir1,

 

Here is another forum that was getting the same libnipalu fail to initialize message as you. The solution in that case was to run ./UNINSTALL ./INSTALL. but I would recommend reading through for his explanation as well.

The lines in blue seem to be normal. Here is a resource that compares two types of installs and both have the same message.

Hope that these help.

Paolo F.
National Instruments
Applications Engineer
0 Kudos
Message 4 of 15
(6,753 Views)

Hi Paolo F.,

 

I execute your last recommandations, but i have the same  error.

 

Here i send you the summary of issue with all directory generated in my linux distribution:

 

linux-ktk9:/usr/local # ls
bin games include lib man natinst sbin share src vxipnp

linux-ktk9:/usr/local/include #
dns_sd.h visa.h visatype.h vpptype.h

linux-ktk9:/usr/local/natinst #
.nicore niiotrace nikal nimdnsresponder nipal nipxi nisvcloc share

linux-ktk9:/usr/local/natinst/nipal # ls
bin etc lib sbin src

linux-ktk9:/usr/local/natinst/nipal/lib # ls // important
libnipalu.so.2.9.1

linux-ktk9:/usr/local/natinst/nipal/bin # ls

nipalerriInstallerUtility.sh nipalkiInstallerUtility.sh palModuleMgr.sh
nipaliInstallerUtility.sh nipalps readInfFiles

linux-ktk9:/usr/local # ls
bin games include lib man natinst sbin share src vxipnp


linux-ktk9:/usr/local/vxipnp # ls
bin etc lib linux src

linux-ktk9:/usr/local/vxipnp/lib # ls
libnixerces.so.2 libnixerces.so.2.7.0

linux-ktk9:/usr/local/vxipnp/src # ls
objects

linux-ktk9:/usr/local/vxipnp/bin # ls
niLxiDiscovery nivisaInstallerUtility.sh nivisakInstallerUtility.sh

linux-ktk9:/usr/local/vxipnp/linux # ls
bin include lib NIserial NIvisa

linux-ktk9:/usr/local/vxipnp/linux/include # ls
visa.h visatype.h vpptype.h

linux-ktk9:/usr/local/vxipnp/linux/lib # ls
libnivi488.so libnivienetasrl.so libnivipxi.so libniviusb.so libvisa.so
libniviasrl.so libnivienet.so libnivirpc.so libnivivxi.so libvisa.so.7

linux-ktk9:/usr/local/vxipnp/linux/lib # ls
libnivi488.so libnivienetasrl.so libnivipxi.so libniviusb.so libvisa.so
libniviasrl.so libnivienet.so libnivirpc.so libnivivxi.so libvisa.so.7

linux-ktk9:/usr/local/vxipnp/linux/NIserial # ls
Enet

linux-ktk9:/usr/local/vxipnp/linux/NIvisa # ls
driverwizard libLvEnetconf.so nivisaserver USB VXI
driverwizard.conf libLvIniconf.so Passport viclean
Examples license PxiPlugins visaconf
Help NIvisaic readme.txt visaconf.conf
.LabVIEW NIvisaic.conf UNINSTALL visaconf.ini

linux-ktk9:/usr/local/vxipnp/linux/NIvisa # ./NIvisaic
libnipalu.so failed to initialize
Perhaps you need to run updateNIDrivers
Aborted

linux-ktk9:/usr/local/bin # ./updateNIDrivers

Configuring for linux kernel version 3.1.0-1.2-desktop.

********************************* NOTE *********************************
Using kernel headers found in /lib/modules/3.1.0-1.2-desktop/source.
If this does not correspond to the location of the 3.1.0-1.2-desktop headers,
then define KERNELHEADERS in your environment to point to the location
of the kernel headers, define KERNELTARGET as the version of the
kernel for which to compile, and then rerun ./configure.
********************************* NOTE *********************************

Kernel has reparent_to_init(): no
Number of arguments for do_munmap(): 3
pte_offset function: pte_offset_kernel()
Levels in page table: 4
Kernel has remap_pfn_range: yes
Kernel has kzalloc: yes
Kernel has chained SGL support: yes
USB altsetting name: cur_altsetting
Kernel has usb_get_intf(): yes
Kernel has intf_cache member in usb_host_config: yes
Kernel has ep[] members in usb_device: yes
Kernel exports usb_set_configuration(): no
Units of USB_CTRL_GET_TIMEOUT: msec
Kernel has owner member in usb_driver: no
Kernel has put_page_testzero(): yes
Kernel has mutex method: yes
Kernel has wait_for_completion_interruptible: yes
Kernel has config.h: no
Kernel has ioctl32.h: no
IRQ handlers have pt_regs: no
Kernel has work_struct and delayed_work: yes
Kernel supports fault method in vm_operations_struct: yes
Kernel has ioremap_wc: yes
Kernel has pgprot_writecombine: yes

Storing configuration in Makefile.in
If the values stored are incorrect they can be changed before running make.

Installing NI-KAL:
NI-KAL successfully updated.
Updating client modules:
nipalk.ko successfully updated.
NiViPciK.ko successfully updated.
niorbk.ko successfully updated.
nimdbgk.ko successfully updated.
nidimk.ko successfully updated.
NiViPxiK.ko successfully updated.
nipxirmk.ko successfully updated.
nimxdfk.ko successfully updated.
nipxigpk.ko successfully updated.
Rebooting is required to ensure that National Instruments drivers
have been successfully updated.
Would you like to reboot now? [yes|no]

After reboot:

linux-ktk9:/usr/local/bin # ./NIvisaic
libnipalu.so failed to initialize
Perhaps you need to run updateNIDrivers
Aborted


// Usb available

Lsusb -v:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 03f0:0024 Hewlett-Packard KU-0316 Keyboard
Bus 002 Device 003: ID 04ca:0062 Lite-On Technology Corp.
Bus 002 Device 004: ID 0957:0e0b Agilent Technologies, Inc.


permissions:
ls -l /dev/usbtmc0

Result: crw-rw-rw- 1 root root 180, 176 Jan 28 09:56 /dev/usbtmc0

 

Questions:
1- Now, if i need to to fixe the error of execution ./NIvisaic or not important before start developpement?

2- I try to add my project 'USB' with the Example that exist in the lib NI_VISA:

drwxrwxrwx 2 root 4096 Jan 28 10:24 General
drwxrwxrwx 2 root 4096 Jan 28 10:24 GPIB
-rwxrwxrwx 1 users 3764 Jan 28 11:25 Makefile
drwxrwxrwx 2 root 4096 Jan 28 10:24 PXI
drwxrwxrwx 2 root 4096 Jan 28 10:24 Serial
drwxrwxrwx 2 root 4096 Jan 28 11:24 TCPIP
drwxrwxrwx 2 root 4096 Jan 28 10:24 VXI-VME
drwxrwxrwx 2 users 4096 Jan 28 11:25 USB

 

 

I generate the object file in USB project, but when i execute it:./usb,
i have the error: libnipalu.so failed to initialize
Perhaps you need to run updateNIDrivers

I dit the same in the TCPIP project , and i have the same error?.

I checked on the web, i found the same error, i did the same step without succes. PLease, can help me to fix this issue?

I you need any others print result from command line , i can send it to you?

 

0 Kudos
Message 5 of 15
(6,717 Views)

Hi marjekbir1,

 

Are you using the supported drivers according to this knowledgebase? It seems you need VISA 5.4

 

If you are using the correct version could you provide the output of:

 

rpm -qa | grep ^ni

Paolo F.
National Instruments
Applications Engineer
0 Kudos
Message 6 of 15
(6,693 Views)

Hello marjekbir1,

 

What version of VISA are you trying to install on your system? Currently, VISA 5.4 supports OpenSuse 12.1. The following documentation will give you step by step information for downloading VISA and installing it on your system:

 

http://download.ni.com/support/softlib//visa/NI-VISA/5.4/linux/README.txt

 

There are also further details linked in that readme document that discusses USB issues when using Linux however we won't need to consider those details until you have installed VISA correctly and can verify that using the VISA utilities.

Ian M.
National Instruments
0 Kudos
Message 7 of 15
(6,692 Views)

Hi lan,

 

Thank you for your response.

 

What version of VISA are you trying to install on your system?

NI-VISA 5.4

 

Operating system is:

openSUSE 12.1 ,

kennel version  : linux-3.1.0-1.2-desktop

 

I did all steps that mentionned in README file, but never i get a success, and i have the same error.

This error is : libnipalu.so failed to initializee. after investigation, i found  some thing: nipalk.ko not found on opensuse 12.1.

 

after my reseach on the web, i found a recommandation for use the ''nidaqmxbase-3.6.0'' this libriairie come with API C and NI-VISA 5.2 and it's supported for opensuse 12.1.

I  UNINSTALLED NI-VISA 5.4 and i INSTALL ''nidaqmxbase-3.6.0', with application of all step in README that come with this lib. After that i never get a good result, when a start ./lsdaq from /usr/local/bin:, i have

linux-ktk9:/home/abdelhaq # lsdaq
--------------------------------
Detecting National Instruments DAQ Devices
Found the following DAQ Devices:
libnipalu.so failed to initialize
Perhaps you need to run updateNIDrivers
/usr/local/bin/lsdaq: line 7:  5615 Aborted                 /etc/natinst/nidaqmxbase/bin/daqmxbase_listdevices

 

after execute the updateNIDrivers, i have the same error.

 

What i can do for next investigation? I need to fix this error as soon as possible, thank you for your help.

 

a.s

T&B

 

0 Kudos
Message 8 of 15
(6,672 Views)

Hi Paolo F.,

 

 

Lib VISA:

 

NI-VISA 5.4

 

Operating system is:

openSUSE 12.1 ,

kennel version  : linux-3.1.0-1.2-desktop

 

I will send you the output that you asking for.

 

THank you for your help. I need to call someone in your support departement  to go throught on this issue.

 

a.s

T&B

 

 

0 Kudos
Message 9 of 15
(6,671 Views)

Hi Poelo,

 

I send you in the text file attached, the summary of installation nivisa and the result of OutPut of rpm -qa | grep ^ni.

 

Thank you Please let me know if you have any addition.

 

a.s

T&B

0 Kudos
Message 10 of 15
(6,648 Views)