I just bought a brand new USB-6225 with the SCB-68A 68-Pin Connector Block box. I have a question about how to use this device in Python with PyVISA. The problem is that the USB0 device does not enumerate and VISA Interactive Control cannot read responses from it.
I can view the USB-6225 in MAX - it shows up both as 'NI USB-6225 (Mass Termination) "Dev1" ' and as 'USB-6225 (Mass Termination)'.
In XP's Device Manager, it shows up under "Data Acqusition Devices" as "USB-6225 (Mass Termination)".
I can fire up the Test Panel for the USB-6225 and view the signal I am injecting into Dev1/ai1. It's a simple 1 Hz 10Vpp sine wave. RSE, On Demand. Runs great! The software displays the sinewave.
In order to use the USB-6225 with Python, I installed NI-VISA 5.4 and the NI-VISA Runtime 5.4. PyVISA 1.4 was also installed.
Then I used the NI-VISA Driver Wizard to create an XP .inf file. I used a prefix string of "usb6225". The Driver Wizard installed this XP driver. In MAX, the "NI USB-6225" and 'USB-6225 (Mass Termination)' entries were replaced by a new entry, "MSeries USB 6225 (Mass Termination) USB0::0x3923::0x7330::018C1F47::RAW'. I understand that the numbers represent the vendorID, Model, and Serial Number. A new item in XP's Device Manger shows up as, "MSeries USB 6225 (Mass Termination)" under "NI-VISA USB Devices".
In MAX, I left-click on the new item and the middle pane shows the properties of this device. Its status is "Present". So far so good, I think.
However, this USB device will not enumerate when used with PyVISA in a Python script. The computer's two COM and one printer port show up, but not the USB device.
I can fire up NI's VISA Interactive Control program. The USB0 device shows up under "USB RAW Resources" as "USB0::0x3923::0x7330::018C1F47::RAW". However, my Python script doesn't see it.
The output of the script to show the enumerations of the devices is as follows:
['ASRL1', 'ASRL2', 'ASRL10']
['COM1', 'COM2', 'LPT1']
So, as you can see, the PC's standard ports show up, but USB0 does not.
Here is the Python script ("enumerate.py") :
------
from visa import *
my_instrument = get_instruments_list(0)
print my_instrument
my_instrument = get_instruments_list(1)
print my_instrument
------
Is there something I'm missing?
In VISA Interactive Control, when I double-click the USB0 device a new window pops up. This new window allows me to 'talk' to the device and test it out, etc.
Under Input/Output, Basic I/O tab, I select the command, "*IDN?\n" and hit the "Write" button. The "Return Data" Window shows "Write Operation (*IDN?\n") No Error". The big window in this applet shows: "Return Count: 6 bytes".
Then I hit the "Read" button, the "Return Data" window shows "Read Operation Error VISA: (Hex 0xBFFF003E) Could not perform operation because of I/O error."
Then I hit the "Clear" button and it returns "Device Clear Operation No Error".
Then I hit the "Query" button and I get the same error as before.
I tried both 1024 bytes and 6 bytes in the "Bytes to Read" selection.
So, I'm wondering if this device isn't set up properly, PyVISA doesn't support this unit, or this brand-new unit is maybe broken.
Is there a step I'm not doing? Is there a problem with the device or the programming environment?
Thanks in Advance.