High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

niscope_self_test vs NI MAX self test

Earlier, I had a problem with a red ACTIVE LED on my ni 5122 digitizer.We figured out the problem but discovered another.

http://forums.ni.com/t5/High-Speed-Digitizers/Active-LED-Red/td-p/2449204

 

We're controlling the device using the NISCOPE CVI driver. In this particular case when I'd call the niscope_self_test() function the message I'd get back was "Scope self test FAILED" (see attached). Not very illuminating. However, when I'd switch to NI MAX and run the self test from  there using the button, I'd get a meaningful message (see attached). My question is why the difference and what is NI MAX calling that the CVI driver isn't. 

Download All
Message 1 of 6
(6,518 Views)

I'm also interested in a detailed answer!

Background: It looks like that during self calibration (at least of the 5122) the actual clock setup is used. 

Is this true?

Only for the 5122?

How about the 5922?

 

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 6
(6,503 Views)

Hello MarcBAE,

 

The functional difference in the self test function in CVI and doing a self-test in MAX is very minimal.  Both are sending a basic command (like *IDN) to verify whether or not they can communicate with the device in question, and both are determining that they cannot.  The only difference I have been able to ascertain is the way the message is handled and delivered to the user.

 

In MAX, the error handling determines the most likely cause for the error and delivers the message to the user.  Note that, in some cases, the error message does not actually determine the exact problem.  You might receive the message shown in your screen shot, then find the cause of the error is something different.  In any case, MAX automatically provides a possible explanation.

 

In the niScope_self_test function, a Boolean and a string are returned.  Note from the niScope_selt_test help page states that the string returned is limited by the size of the buffer allocated for the string.  If this function were to return the message shown in MAX, it would take a much larger chunk of memory to be displayed.  This may not present a problem if you properly allocated the space for the message, and certainly shouldn't limit the ability of the function call to return useful data to the user.  There is a DAQmx function call that converts an error message into a more useful piece of information, and I thought there might be an equivalent function for niScope, and found the niScope_error_query function.  However, the niScope_self_test does not return an actual error code, only a pass/fail and a string, so I haven't been able to determine if there is a useful way to combine these functions.

 

In any case, I would say the difference in the self-tests lies only in the amount of information returned to the user, and not in how the tests are executed.  There is certainly room for more discussion here.  Have you found that the error query function is useful in conjunction with the self test?

Patrick
CLA
0 Kudos
Message 3 of 6
(6,479 Views)

@PatJamSim wrote:

In MAX, the error handling determines the most likely cause for the error and delivers the message to the user.  Note that, in some cases, the error message does not actually determine the exact problem.  You might receive the message shown in your screen shot, then find the cause of the error is something different.  In any case, MAX automatically provides a possible explanation.

 


Granted, however a numerical value &/or a meaningful message is much more informative than simply, "Self Test FAILED". Particularly in my recent case where the failure was clock related.

 


In the niScope_self_test function, a Boolean and a string are returned.  Note from the niScope_selt_test help page states that the string returned is limited by the size of the buffer allocated for the string.  If this function were to return the message shown in MAX, it would take a much larger chunk of memory to be displayed.  This may not present a problem if you properly allocated the space for the message, and certainly shouldn't limit the ability of the function call to return useful data to the user.  There is a DAQmx function call that converts an error message into a more useful piece of information, and I thought there might be an equivalent function for niScope, and found the niScope_error_query function.  However, the niScope_self_test does not return an actual error code, only a pass/fail and a string, so I haven't been able to determine if there is a useful way to combine these functions.

 

In any case, I would say the difference in the self-tests lies only in the amount of information returned to the user, and not in how the tests are executed.  There is certainly room for more discussion here.  Have you found that the error query function is useful in conjunction with the self test?


It seems to me that this is a void in the self test function of niscope. Having worked with IVI drivers for close to a decade now, this is the first time I have seen a failure message like this. Since MAX returns a meaningful numeric indicator & message, the information is apparently being provided by the instrument, i.e. the information is available, just not being passed to the user. I'm not asking for a detailed message as shown by MAX, a simple -12345, "Clock Error occurred" would be sufficient. And since this is an automated system, asking them to run MAX to get the "real" error code/message is problematic and not standard to our system. So the real problem I forsee is, if there is a failure, the procedure would be to pull the card and return it to the vendor for repair. It would be nice to be able to pass the actual failure with the failing instrument, something more informative than "Self Test FAILED".

I have not tried the error_query function.

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

Hello MarcBAE,

 

I just noticed some information that I wish I had caught during my last post!  Taken from the niScope_self_test help page:

 

niscopehelp.PNG

 

Following up the niScope_self_test with the niScopeGetErrorMessage, niScope_GetError, and potentially niScope_error_query should provide you with the additional information that comes from MAX.

 

Patrick
CLA
Message 5 of 6
(6,452 Views)

Sorry it took me so long to reply...I've been out of the office.

 

I believe the return value you're referring to is for the call to niScope_self_test and indicates the status of the VISA call (timeout, comm error, etc) not the status of the self test. The section above details the results of the self test test:

Output
Name Type Description
selfTestResult ViInt16* This control contains the value returned from the instrument self-test.

Self-Test Code Description

0—Self-test passed

1—Self-test failed

selfTestMessage ViChar[] Returns the self-test response string from the instrument. Refer to the device-specific help topics for an explanation of the string contents; you must pass a ViChar array at leastIVI_MAX_MESSAGE_BUF_SIZE bytes in length.

 

While we're on the subject, I feel that the online description for selfTestMessage is misleading as it just returns PASS or FAIL with zero indication of what the actual problem is. The way it's currently stated gives the impression that we'll be able to get additional information from the returned string. The way it currently operates, it might be more accurate to state that we need to run the same test in MAX to get the true error.

0 Kudos
Message 6 of 6
(6,398 Views)