10-14-2013 02:10 PM
Hi All
I am using VB.NET 2005 and VisaNS
I am trying to check for SRQ and do a serial poll.
How do I do that any help (with some code) in this regard is appreciated.
Thanks in advance
Cheers
10-15-2013 11:32 AM
Greetings master9991
I did a quick Google search on this issue.
Have you checked the following document?
http://www.ni.com/support/visa/vevents.pdf (around page 😎
And the following example?
http://zone.ni.com/devzone/cda/epd/p/id/3089
Let us know if they are of any help to you.
Have a good day.
10-15-2013 03:39 PM
Thank you for the reply Luis J.
Option # 1
I am trying to look and understand the c code in page 8 (in vevents.pdf file) and try to convert/get an equivalent vb.net code
http://www.ni.com/support/visa/vevents.pdf (around page 😎
Option # 2
The under given example is in LabView and can't read the vi file nor do we use labview.
And the following example?
http://zone.ni.com/devzone/cda/epd/p/id/3089
So I am gone try option # 1 and see if it works for me (am sure it would take some time).
Thank you once again.
10-16-2013 11:00 AM
Greetings master9991
Oh, I'm sorry, I didn't realize that the last example was for LabVIEW.
The syntax change between VB and C, but the structure of the program itself shouldn't be that different.
Let us know how it goes. Have a good day.
03-13-2014 07:02 AM
I need to switch off the autopolling.
How to use the setAttribute function (it should correspond to ibconfig according to NI documentation) when there is no Attribute Type related to Autopolling?
03-14-2014 07:44 AM
Hi wolfgang7753
I found a couple of documents that might come in handy for you
Serial Polling and SRQ Servicing with NI-488.2 Software and Basic
http://www.ni.com/white-paper/4054/en/
"To be active, Autopolling must be enabled and allowed. Whether Autopolling is enabled is determined by the driver configuration program or by the ibconfig function. Note that all NI drivers are shipped with Autopolling enabled by default by the driver configuration program. Autopolling is allowed following the execution of any NI-488 device-level function. Autopolling is disallowed following the execution of any NI-488 board-level function or NI-488.2 routine."
How Can One Tell when the Autopolling Feature of National Instruments GPIB Boards Will Function?
http://digital.ni.com/public.nsf/allkb/9C25D443B106B30F862562870079AFE8
Cheers!
03-17-2014 03:14 AM
Thanks for your answer but unfortunately I know these documents and they dont help in resolving my problem.
I need to switch off Autopolling!
1. with ibconfig it is possible to set several parameters on the GPIB board (like Timeout, Autopolling, ...)
2. in the visaNS system the command that represents ibconfig is SetAttribute
3. I can't find the AttributeType for Autopolling in the documentation (there are all the other Attribute Types for Timeout, ...)
4. How to switch off Autopolling using only visaNS?
Best regards
Wolfgang
03-17-2014 08:23 PM
Hi wolfgang7753,
The only way I could locate to disable Autopolling would be through NI-MAX which is a free to download utility that should have been installed when you installed NI-VISA.
Below in figure 6 you can see that Autopolling is a setting: http://www.ni.com/gettingstarted/setuphardware/instrumentcontrol/gpibenet.htm
Please note that this option will be grayed out if you are on Windows 7. In order to change these settings, you will need to run Measurement and Automation Explorer as an administrator.
Let us know if this helps.
03-18-2014 02:18 AM
Thanks, the answer does not help.
I was asking how to disable Autopolling by my software. The manual solution is insufficient as everytime I connect an other GPIB card on the bus I have to remember to go into the settings...
Is there anybody from NI who knows the solution?
Best Regards
Wolfgang
03-18-2014 04:20 PM
With a little more research, I found this below article that mentions how to turn off Autopolling by making a NI-488.2 call just before your application exits.
http://digital.ni.com/public.nsf/allkb/627380484246D46E862573B4008332D2
I think this is the solution you are looking for.