Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

PCIe-6323 installation not registered with VISA 16.0

Solved!
Go to solution

I'm new at this and would like to make a good start.
My NI PCIe-6323 multifunction card seemed to install just fine per NI MAX, and it works well with that tool, as it passes all self-tests, and it will toggle digital output bits.
However, when I run the NI VISA Interactive Control Utility, it doesn't show the device in its list.
The Driver Wizard also shows no indication of recognizing the card.
The Windows driver (Windows 7, 64 bit) is up to date.

We want to run PyVisa with NI-VISA, so we don't have LabView. When I run PyVisa, it too is aware of the card, but after a few preliminaries, the first "write" call (actually, query('*IDN?')) to the device fails and says that the device "has no write attribute."

Can someone please help me get past this roadblock, so I can start making progress?

Thanks very much,
-Peter

0 Kudos
Message 1 of 9
(4,562 Views)

Check on these 2 links

https://www.ni.com/getting-started/set-up-hardware/instrument-control/pci-gpib

http://www.ni.com/tutorial/4713/en/

 

 

What device are you connecting to the PCIe card?

0 Kudos
Message 2 of 9
(4,513 Views)

Thank you for your reply, niarena.
I'm attaching the PCIe card to the digital and analog I/O of the medical device my company is developing.

I had assumed that since this is an NI product that has been around for a while, that VISA and its Driver Wizard would recognize it, since it appears to be installed correctly.

Otherwise, the tutorial you suggested says "The steps and sequences required to detect if your PXI/PCI device is generating an interrupt should be in the register documentation for your device."
If necessary, I'm certainly willing to input that data to the Driver Wizard, but I can't find the required information for the board in any NI document.

(I should mention that the Windows device manager shows the device, its memory range and IRQ, and location on the PCI bus.)

Suggestions?

 

 

0 Kudos
Message 3 of 9
(4,493 Views)

This card is a NI data acquisition card and it is supported with the NI-DAQmx driver, not NI-VISA. Please see the 'Data Acquision Software' section in the 'Overview' tab of this page: http://sine.ni.com/nips/cds/view/p/lang/en/nid/207406

0 Kudos
Message 4 of 9
(4,489 Views)

Hi element0

If you want to use the card with Python, there is this package, I haven't used it before but it seems to do what you want

https://pythonhosted.org/PyDAQmx/index.html

And yes, as pankaj says, you will need DAQmx with the C API (installed by default).

0 Kudos
Message 5 of 9
(4,483 Views)

None of this is news except the statement that NI-VISA has no support for the card.
In that case, I need to register it with VISA via the NI-VISA Driver Wizard.
Where can I find the register and interrupt (sequence) information for the card that's necessary for registration?
I've already looked at many NI documents and have found nothing.

Suggestions?

 

Thanks,

-Peter

0 Kudos
Message 6 of 9
(4,478 Views)

Thanks, niarena and pankaj.

Yes, I'm aware of PyDAQmx and also PyVisa.

I'd hoped to use PyVisa (and VISA), since I thought (or imagined 🙂 there
might be advantages over PyDAQmx.

I tried using PyVisa. It can see the card, but the *IDN? request, which
does a write and then a read, fails.
I ran the NI IO Trace tool during the session, but I'm not completely sure what the results mean. (It's my understanding that the tool records calls to VISA, not DAQmx.)
The trace below appears to show: asking for a list of resources, parsing the results, and opening the resource that represents the card.

1. viFindRsrc (0x00001001, "?*::INSTR", 0x00002001, 2, "PXI10::0::INSTR")
Process ID: 0x00001CD4 Thread ID: 0x000006DC
Start Time: 09:24:33.305 Call Duration 00:00:00.365
Status: 0 (VI_SUCCESS)

2. viFindNext (0x00002001, "ASRL1::INSTR")
Process ID: 0x00001CD4 Thread ID: 0x000006DC
Start Time: 09:24:33.670 Call Duration 00:00:00.000
Status: 0 (VI_SUCCESS)

3. viClose (0x00002001)
Process ID: 0x00001CD4 Thread ID: 0x000006DC
Start Time: 09:24:33.671 Call Duration 00:00:00.000
Status: 0 (VI_SUCCESS)

4. viParseRsrcEx (0x00001001, "PXI10::0::INSTR", 5, 10, "INSTR", "PXI10::0::0::INSTR", "")
Process ID: 0x00001CD4 Thread ID: 0x000006DC
Start Time: 09:24:33.671 Call Duration 00:00:00.000
Status: 0 (VI_SUCCESS)

5. viParseRsrcEx (0x00001001, "ASRL1::INSTR", 4, 1, "INSTR", "ASRL1::INSTR", "COM1")
Process ID: 0x00001CD4 Thread ID: 0x000006DC
Start Time: 09:24:33.671 Call Duration 00:00:00.001
Status: 0 (VI_SUCCESS)

6. viParseRsrcEx (0x00001001, "PXI10::0::INSTR", 5, 10, "INSTR", "PXI10::0::0::INSTR", "")
Process ID: 0x00001CD4 Thread ID: 0x000006DC
Start Time: 09:24:40.614 Call Duration 00:00:00.001
Status: 0 (VI_SUCCESS)

7. viOpen (0x00001001, "PXI10::0::INSTR", 0, 0, 0x00000001)
Process ID: 0x00001CD4 Thread ID: 0x000006DC
Start Time: 09:24:40.615 Call Duration 00:00:00.001
Status: 0 (VI_SUCCESS)

8. viParseRsrcEx (0x00001001, "PXI10::0::INSTR", 5, 10, "INSTR", NULL, NULL)
Process ID: 0x00001CD4 Thread ID: 0x000006DC
Start Time: 09:24:40.616 Call Duration 00:00:00.001
Status: 0 (VI_SUCCESS)

However, it seems odd that there is no indication of the *IDN? query (write and then read).
I supposed that this means either a) PyVisa thought there was something wrong with the resource and wouldn't talk to it anymore or b) there's a bug in PyVisa.

But when I go to NI MAX, under Tools/NI-VISA/VISA Options, select "Show all devices accessible to VISA" (instead of "Show only devices registered with Visa") and save the new selection, then I get entirely different results when I run VISA Interactive Control. That's why I thought the card might not be registered with VISA, instead of there being a bug in PyVisa.

 

VISA Interactive Control shows two new resource, "PXI MIscellaneous Resources, PXIIO::MEMACC" and "PXI Instrument Resources, PXI10::0::INSTR".
Clearly, the later resouce is the PCIe card in my system.
Furthermore, when I open it, there is a lot of detailed information about the card's settings, Register Based Setting and Attributes.
Would this be the information I need to register the card with VISA? (I can post all the data, if that's helpful.)

Thanks,
-Peter

0 Kudos
Message 7 of 9
(4,461 Views)
Solution
Accepted by element0

Hi Peter,

 

As I wrote in my previous message, NI-VISA is the wrong API to access this device. NI-VISA provides you with a generic API to access registers on a PCI(e) device but to use NI-VISA to use a specific device, you would need to know all the details about the registers and how the device is programmed. NI-DAQmx is the right API for all of NI's DAQ devices because they already provide you with higher-level data acquisition functions and are able to correctly program the device to do what you want to do. I am not sure why you think NI-VISA would be easier for this purpose.

 

Also, the *IDN? is usually a command that is recognized by a SCPI based instruments (such as benchtop USB or TCPIP instruments). Usually, these commands don't make sense for a VISA PCI(e) device because the viWrite/viRead functions are not possible for these kinds of (register based) resources. To access a PCI(e) device from VISA, you would be using viIn/viOut (or viPeek/viPoke) functions to program specific registers.

Message 8 of 9
(4,439 Views)

Thanks very much, pankaj!

 

I get it now. 🙂  So I'll move on to DAQmx and PyDAQmx.

Surely there will be other challenges there, but now the field is much narrower, and that's good.

(I had thought VISA would be better because it's an industry consortium standard, it's more general purpose, and it appeared that PyVisa is used somewhat more than PyDAQmx.  This was evidently the wrong conclusion -- for my PCIe board.)

 

 

Cheers,

-Peter

0 Kudos
Message 9 of 9
(4,428 Views)