PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx.DaqSystem.GetPhysicalChannels() System.InvalidOperationException

Hello,

I´m trying to set and read the digital inputs and outputs of a PXI-6514 using TestStand.

During the initialisation I´m using NationalInstruments.DAQmx.DaqSystem.GetPhysicalChannels() to get the list of the available channels.

When I start the process the first time, everything works fine. But, if i 'unload all modules' in TestStand and try to start it again, i get the following error:

An exception occurred inside the call to .NET member 'init_IOcards':
System.InvalidOperationException: You may only create one instance of a type of Query List once during the lifetime of your application.
bei NationalInstruments.DAQmx.Internal.QueryList..ctor(QueryListID id)
bei NationalInstruments.DAQmx.Internal.QueryList.GetOtherQuery(QueryListType type, Int32 filters)
bei NationalInstruments.DAQmx.DaqSystem.GetPhysicalChannels(PhysicalChannelTypes physicalChannelTypes, PhysicalChannelAccess physicalChannelAccess)
bei NI_PXI_drv.IO_Card.init_IOcards() in C:\SVN\trunk\MATS_2\Driver\DMM-NI\NI_PXI_drv\NI_PXI_drv\IO_Card.vb:Zeile 19.

The called functions are located in a DLL written in VB.Net.

To get rid of this error, i have to restart TestStand every time I unload all modules.

 

Is there a method to release or dispose these Lists?

 

Thanks for your help.

0 Kudos
Message 1 of 3
(1,268 Views)

Hi,

It sounds like the permissions on the report folder are the most likely root cause. Even if you're logged in as Administrator, Windows can restrict your ability to access protected directories. I'm not an expert in Windows permissions, but if there was a difference in permissions between this system and another system, and changing those permissions seems ot have fixed the issue, then everything seems to point at that as the reason reporting wasn't working. TestStand just wasn't allowed to write files to the location it was told to write to.

 

You can find your report file path in TestStand by clicking Configure >> Result Processing >> Options (hammer and wrench icon) >> Report File Pathname. If TestStand is writing to a protected path, it will need to be run by a user with permissions to access that path. In some cases, this will also require running TestStand as administrator (even if the user has an administrator account).

0 Kudos
Message 2 of 3
(1,143 Views)

this error happens to me as well, only that in my case it is PXI-6363 that throws that error.

have you managed to find any solution?

0 Kudos
Message 3 of 3
(21 Views)