Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

per-thread NI-488.2 globals (ThreadIbsta, ThreadIberr, ThreadIbcnt)

in my application do include Ni488.2 library and program to make gpib call, such as Write("*IDN?"). Then check Ni Spy, there are ThreadIbsta, ThreadIberr and ThreadIbcntl. Is possible to remove these three by any setting?
0 Kudos
Message 1 of 7
(4,392 Views)
Do you mean to remove them from the NI Spy log, or remove them from your program?
0 Kudos
Message 2 of 7
(4,392 Views)
Dear GPIB Guru:
I would like remove them from the program.

Please advice. Thank you.
0 Kudos
Message 3 of 7
(4,392 Views)
By the way,
I used Measurement Studio 6.0 for VS C++ .NET library in my program.

Thank you.
0 Kudos
Message 4 of 7
(4,392 Views)
Why do you need to remove them from the program? It was added to the program to make sure that the status information you have is up to date. It should not adversly affect your program in any way.
0 Kudos
Message 5 of 7
(4,392 Views)
The reason to remove them because of time consuming issue. Our program is for semiconductor area 'high speed' test application. So our customer care "much" about the testing time. Our previous version software was developed with NI Measurement Studio 6.0 Ni ComponentWorks components on Microsoft VB, there is no these three status when do gpib call like cwGPIB.Write(); But now we upgrade software develop with new NI Measurement .NET for C++, we found the performace goes down about 50% based on same test conditions, same test equipments, its definite difference when comparing the GPIB log, we found three status time affect quite a lot. That's the purpose we try to find solution to sovle our customer testing speed issue.
0 Kudos
Message 6 of 7
(4,392 Views)
Hello

I doubt that these functions would cause such a difference in performance. Do you have any sample app I could use to test this out? Going from Vb 6 to C++ is quite a big change and I would like to see how you have set this up. Are you making use of multiple threads in your test application?

There really is no way to disable these functions in the C++ class libraries. In the VB ActiveX controls, we were going similar operations to check the status, but we were directly accessing the ib globals to check their status (which is why you dont see any status checking calls in NI Spy when you used the CWInstr ActiveX controls). VB 6 is pretty much single threaded and so you do not need thread specific status information.
But the C++ class libraries allow for more versatile use, since C++ applications can easily be multiple threaded. The libraries need to be able to provide the user with error information that might be specific with the thread in which the function is being called and so we use the thread specific status functions like ThreadIbsta after each function call.
Based on the benchmarking and testing we have done internally, you should not see such a significant difference in performance between the two APIs, especially if the tasks are the same.

You can turn off exceptions for the Cni4882 libraries by calling the static method CNiException::SetExceptionMode(). But again, this would not turn off the thread specific status checking built into the libraries.

I would like to test out your sample app on my system and see if I can reproduce the effects you are seeing. If you have a VB 6.0 app that I could compare it to, that would help as well.

Thanks

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 7 of 7
(4,392 Views)