Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Get number of Channels from IVI configuration store

Hi,

I am trying to retrieve the number of channels and the physical channel names for an IVI Scope. I am using the IVI configuration store to get the Driver session and Software Module based on a Logical name. I can get access to the PhysicalNames property but it only returns two items (0,1) this would be fine but the driver session is set to use a PXI-5105, this is an 8 channel scope. I have set the Driver Setup of the IVI Driver Session to "Model:5105; BoardType:PXI;". The scope itself is actually simulated in DAQmx (as I don’t have access to the hardware), but I have tried simulating it with the IVI Specific Driver but I still get the same results.

I don't know whether this is a quirk of the device being simulated or a problem with the IVI driver itself. Has anyone accomplished this before or can test my code on a real device?

I have attached my code (LabVIEW 8.6) for getting the physical names.
Message Edited by Simplicity Jon on 12-02-2009 07:23 AM
Jon Bowers
LabVIEW Architect, TestStand Architect
0 Kudos
Message 1 of 5
(3,906 Views)

Hello  Jon,

       It is very probable that simulating the board is causing the difference.  When do you plan on having a board to test with?  Hopefully someone with a real device will run your code and let us know what they see.

 

Cheers,

 

NathanT

0 Kudos
Message 2 of 5
(3,878 Views)

Hi Jon,

 

Your VI gives the same behavior on a real 5105 module as well. The reason for this is that only channels 0 and 1 are listed in the niScope Software Module's Physical Names list and this is what you are querying. To add more channels to this list, you will need to go into Measurement & Automation Explorer (MAX), navigate under Configuration on the left side to My System »IVI Drivers »Advanced »Instrument Driver Software Modules »niScope, and select the Physical Names tab of the main section in the middle, as shown below.

 

ivi_scope.png

 

You can then add up to channel 7 for compatibility with the 5105. Out of curiosity, I am wondering what the overall goal of this program is, since you are simply getting information from the software module as to what physical names it contains. This is not something that will be dynamic based on the specific device selected for the driver session.

 

Hope this helps,
Daniel S.
National Instruments
0 Kudos
Message 3 of 5
(3,864 Views)

Sorry for the double post, I meant to mention at the end of my last post that you can change your software module to have 8 physical names for the channels, and then create different driver sessions with the appropriate virtual names. Then, instead of querying the physical names, you can get the virtual names for the driver session. I have shown an example of this below.

 

ivi2.png

 

Hope this helps,

Daniel S.
National Instruments
0 Kudos
Message 4 of 5
(3,863 Views)

Hi Daniel,

 

Thanks for that. So the physicals names are based on the Software Module itself and have no relation to the actual hardware. I did consider using virtual names but I thought by using physical names I could get round the user having to create the virtual names before the instrument can be used. I will just go back to using the virtual names then and have to ensure that the user always creates them.

 

In answer to what it is actually for I am creating an IVI-Scope LabVIEW module that allows run-time access to a pop up an interactive soft front panel for debug purposes.

 

Thanks for your help.

Jon Bowers
LabVIEW Architect, TestStand Architect
0 Kudos
Message 5 of 5
(3,851 Views)