From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA via Python... can't get my usb address recognised? Insufficient location information or the requested device or resource is not present in the system.

Does anyone have experience working with a DAQ usb-6255 or the like using Python? 

I am trying to talk to it using Python but don't seem able to get my command string established; My code...

 

from pyvisa.vpp43 import visa_library
visa_library.load_library("c://Windows//system32//visa32.dll")
import visa
print visa.get_instruments_list()                                                                       #1

MyInstrument = visa.instrument("USB0::0x3923::0x732D::017EB4E2::INSTR")   #2
MyCommand = "*IDN?"
print MyInstrument.ask("*IDN?")

 

At #1 I get a list of instruments but none of them are the DAQ box. MAX shows it as Dev1 I get 

At #2 I get ... "VisaIOError: VI_ERROR_RSRC_NFOUND: Insufficient location information or the requested device or resource is not present in the system."

 

Any ideas as I'm stumped?

0 Kudos
Message 1 of 3
(4,911 Views)

Hi Paddy,

 

Could you post the list of instruments you are returned in #1?

 

Thanks,

0 Kudos
Message 2 of 3
(4,893 Views)

Hi Paddy,

 

Actually, I don't think this is easily possible. The USB DAQ device is not a high-level VISA device, so will not show using the command you specified, and NI does not publish the low-level VISA commands that DAQmx uses to communicate. The post in the forum below outlines the issues you will face and shows some workarounds.

 

http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/USB-600x-under-linux-using-NI-VISA-in-TMC-mod...

 

The only way to interface to the device will be to use the DAQmx driver (or DAQmx Base on linux). A good way to use this through Python is by utlising ctypes and numpy as outlined below:

 

http://www.scipy.org/Cookbook/Data_Acquisition_with_NIDAQmx

 

I hope this helps,

0 Kudos
Message 3 of 3
(4,887 Views)