Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Gathering the device IDs of all installed PXI components

Hey all,

at the moment I'm developing a test application in C# which makes use of the following hardware components:

3x PXI-2532 (512 Crosspoint-Matrix)
1x PXI-6259 (Multi I/O Daq)
2x PXI-4072 (DMM)

All cards are installed in an external chassis of the type PXI-1045.

To access the matrix cards and the I/O-Daq card (all DAQmx devices) I have to use the NationalInstruments class library. The DAQmx namespace supplies a method returning all installed DAQmx cards an their corresponding device IDs as configured in Measurement & Automation Explorer. This was the easy part.

Concerning the DMM cards I'm having problems gathering this device ID.

In contrast to the DAQmx device class, acquiring the DMM card in C# makes use of a wrapper class created by Measurement Studio's Instrument Driver Wizzard.
The constructor of this wrapper class wants a "logical name" as parameter to initialize the DMM e.g.:

                niDMM dmm = new niDMM("PXI11::15::INSTR". false, false);

Unfortunately this does not work. It only works using the device ID like shown in MAX: niDMM dmm = new niDMM("Dev2". false, false);

My problem is, I've absolutely no clue how to get this device ID programmaticly. I tried to use the VisaNS namespace and its ResourceManager, this gave me all unique VISA resource names like PXI11::15::INSTR at last. But this does not help me so far.


Greets

Michael Long
0 Kudos
Message 1 of 3
(3,357 Views)
Hi Michael Long,

I'm sorry, but this is a little bit inconsistent.
You cannont access the device by calling the VISA resource name.
You have to use the device ID you found in the Measurement & Automation Explorer.

There is no other way.

best regrads
Dippi

0 Kudos
Message 2 of 3
(3,340 Views)
Hi Dippi,

thx for your answer. Mabye I was a bit unclear about how to get this device ID. I don't necessarily have to use the VISA-system. It was just a desperate attempt to get a proper resource name niDMM accepts.

You have to use the device ID you found in the Measurement & Automation Explorer.

Hence I appreciate _any_ way to get this device ID as shown in the Measurement & Automation Explorer programmatically in the .NET way.

Greets

Michael


Message Edited by MichaelLong on 01-08-2008 03:14 AM
0 Kudos
Message 3 of 3
(3,249 Views)