High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

Latest Software - NI 5102 Cant Autosetup in c++

I recently upgraded my software to the latest package loaded with NI-Scope. After the load, the Soft Front Panel works ok. However, my C++ software that worked previously now fails on a autosetup function. The board doesnt seem to recognize the signal on either channel and returns a warning that no channels are availble. Did anything change in autosetup?
0 Kudos
Message 1 of 6
(6,977 Views)
I did some further testing. If I bypass the autosetup function in my code, the rest of the niScope functions appear to work correctly. Therefore, I conclude that the problem is with the library object code associated with the autosetup function. The .lib file that is linked carries a file date of 9/2007. Is this the latest?
0 Kudos
Message 2 of 6
(6,975 Views)
It sounds like the new version of NI-Scope you are using is 3.4.  Can you tell us what version you were using before you upgraded?

Also, can you attach some of the code that is failing?
0 Kudos
Message 3 of 6
(6,966 Views)

I am not sure of the old version. I think it may have been 1.51 from memory. The installation of the new version blew away all traces of the old.

 

The pertitent steps in the code are the following


   sprintf(resourceName,"DAQ::%i",resource);
   // Open the NI-SCOPE instrument handle
   handleErr (niScope_init (resourceName, NISCOPE_VAL_FALSE,
     NISCOPE_VAL_FALSE, &vi));
   if(vi == VI_NULL) GetDataEditCntl->MessageStr = "DAQ Not Available";
  niScope_reset(vi);
error = VI_SUCCESS; // Initialize

   // Call auto setup, finds a signal and configures all necessary parameters
error = niScope_AutoSetup (vi);
if(error < 0 ) {
 GetDataEditCntl->MessageStr = "Autosetup Fail";
   return -1; }
if(error > 0){
 niScope_error_message(vi,error,errormessage);
 GetDataEditCntl->MessageStr = errormessage;   }

The message that is returned from AutoSetup is a warning that it could not find any signals. Previously, this message was only returned if both channels did not have signals. They both do have a wideband noise signal applied for the testing. For applications like mine, (Radio Astronomy) wideband noise is a valid signal.

0 Kudos
Message 4 of 6
(6,963 Views)

I looked into how our autosetup algorithm has changed over time.  The original algorithm was purely based on the min and max voltage on a channel.  This algorithm worked well for configuring the vertical settings of the device; however, the algorithm didn't perform well for other types of signals.  Autosetup was then changed to use a FFT based algorithm which works very well for many signals.  Unfortunately, the FFT algorithm doesn't work well for your wide band signal.  I'm making modifications to the algorithm to include both the FFT and min/max power as a selection criteria.   The changes will probably be available in NIScope 3.5 or 3.6 which will be released later this year.

 

In the mean time you could modify your code to take a dummy acquisition on each channel.  Niscope has measurement functions for min and max voltage.  Using those values you could set the vertical range of the digitizer appropriately.

 

Sorry for the trouble, but thanks for the feedback.

0 Kudos
Message 5 of 6
(6,956 Views)
Thanks for your help. I will try the method you suggested since I do need to know what is on each channel. My bypass used for testing makes an assumption that each channel is enabled and the range is 0.1 V p-p. The method you suggested should get me back to actually adjusting the board for the signal that is applied.
0 Kudos
Message 6 of 6
(6,952 Views)