High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

niscope_init does not recognise 5620

 

I am using NI-5620 digitizer and ran into a problem:

MAX recognises the board, but when I use niscope_init to get the session it returns

error 0xbfff0011 (Insufficient local information or the device or resource not present...


I am using the same instrument ID string I used before on another system. I also tried

the DAQ::1 and create/use alias. Still the same error.


HELP, please – mark@metrikos.com

0 Kudos
Message 1 of 10
(8,332 Views)

Hi Mark,

 

This error occurs when you either:

 

  • Do not specify the resourceName input
  • Use an invalid resourceName (i.e. one that is not present on your system)


In your case, it sounds like the second case is the problem.  The most likely cause I can think of is that the Device Number on your new system is different from that of your previous computer.  You can see what the number is in MAX under:

 

MySystem >> Devices and Interfaces >> Traditional NI-DAQ (Legacy) Devices

 

Make sure that when you are calling niscope_init, you use the proper resourceName for the device (on your new computer).  For example, if the scope is Device 1 you would use resource name DAQ::1 since this is a Traditional DAQ Device.  Thanks for posting, let me know if you have any further questions or if this does not fix the issue.

 

-John 

John Passiak
0 Kudos
Message 2 of 10
(8,318 Views)

I wish it was that simple.

 

No, my older app is using alias created in MAX and that works just fine.

 

I use the same technique (ran MAX and created alias) and that did not work. I also tried using DAQ::1 (1 being device number from MAX) and it did not recognise that one either.

 

Mark (mark@metrikos.com

0 Kudos
Message 3 of 10
(8,310 Views)

Could you please post your code (a small example that demonstrates the problem) and perhaps a screenshot of your configuration in MAX?

 

Sorry that I assumed that this would be simple.  Are you running this same code with the same hardware on another system successfully?

Message Edited by John P on 11-04-2008 01:04 PM
John Passiak
0 Kudos
Message 4 of 10
(8,306 Views)

It's convoluted - it is a dll and functions are executed via TestStand. It also involves a lot of system level libraries linked in. I'll cut it down in size and see if it works "bare bone". If it does not I'll post a short version.

 

The code itself is just:

 

if (niScope_init ("1", VI_FALSE, VI_FALSE, &vi) != 0)

        // post error message

 

Mark (mark@metrikos.com)

0 Kudos
Message 5 of 10
(8,301 Views)
Try using "DAQ::1" instead of just "1" for your resource name.
John Passiak
0 Kudos
Message 6 of 10
(8,296 Views)

OK, it's not good but finaly I got something:

1. The dll is created using LabWindows CVI 8.5 as "project from template" so it has DllMain and DllEntryPoint.

 

2. The only API in it is:
void __stdcall AppInitialize (void)
{
  ViStatus status = 0;

 status = niScope_init ("DAQ::1", VI_FALSE, VI_FALSE, &viDIG);

}

3. The test case 1 is a CVI executable which has the dll (lib) linked in and calls:

 

int CVICALLBACK Start (int panel, int control, int event,
  void *callbackData, int eventData1, int eventData2)
{
  switch (event)
 {
  case EVENT_COMMIT:
   AppInitialize ();

   break;
 }
 return 0;
}

4. There also is a sequence created using TestStand 4.0 with one entry calling AppInitialize (); 

 

Results:

 

Executable (#3) works fine, TestStand sequence gives me an error - 0xbffa4030 The specific niScopeDAQ or niScopeDMF dll could not be loaded.

 

As far as I know there should NOT be any difference between #3 and #4 calling a function from dll - what is going on?

 

Mark (mark@metrikos.com)

0 Kudos
Message 7 of 10
(8,291 Views)

I added a couple of zip files and seq file.

 

Mark

Download All
0 Kudos
Message 8 of 10
(8,287 Views)

Hello Metrikos,

 

The first compressed folder that you have attached was especially helpful.  However, when I ran the sequence file, TestStand successfully called the dll without error.  I ran the sequence file in TestStand 4.1 and explored the contents of the dll in CVI 8.5.  What versions of these products do you have?  Have you tried calling the dll in another environment?  I am curious because it appears on my end that this is a functional, error-free portion of your application.  Also, can you explain the nature of the other compressed folder you included (TestDllTest.zip)?  It appears to simply be a user-interface application instead of a dll.  Is this the case?  Thanks in advance for this additional information! 

0 Kudos
Message 9 of 10
(8,255 Views)

Hi Matt,

 

I just finished downloading/installing the latest DAQMX. After I rebuilt my dll the problem with TestStand went away!

 

The software installed originally was supplied with the digitizer and was at least one level back from the latest.

 

The second zip with the user-interface application is what I used to see if niScope_init works when called direct and also when called from the dll. Both cases worked.

There seems to be a problem between TestStand 4.0 and DAQMX when a version od DAQMX prior to the latest is used.

 

I appreciate your help - always good to have somebody you can "bounce" the problem off!

 

Thank You and Best Regards,

 

Mark

0 Kudos
Message 10 of 10
(8,245 Views)