04-10-2011 01:51 PM
Hi,
is it possible to install a callback function for srq call's? For example:
When a Powersupply set the Over Current bit in the Status Register the ivi driver call automatic a userdefined function...
thanks for any suggestion
Solved! Go to Solution.
04-12-2011 09:35 AM
Hi Sebastian,
I did not completly understand what hardware and software you are using. Please specify.
Maybe these documents are of any use for you:
How Is a Service Request Used on the VXI Bus?
http://digital.ni.com/public.nsf/allkb/22AEC7B4D479294086256BF4005B7C8C?OpenDocument
Understanding the VXI/VME Interrupt and Signal Acknowledge Cycle
http://www.ni.com/support/vxi/iack/iack.htm
How to Programmatically Check the Status of Your GPIB Board
http://zone.ni.com/devzone/cda/tut/p/id/4314
How to Use Asynchronous Callback Functions with GPIB Events in Windows NT/98/95
http://zone.ni.com/devzone/cda/tut/p/id/3458
Regards, Topp
04-13-2011 09:24 AM
Hi,
If you want your driver to be IVI Compliant you should try checking the specifications on the IVI foundation website
04-13-2011 12:01 PM
Hello,
I want to use the default IVI IviDCPwr Class to control varius Powersupplys,
and I search a methode to detect overcurrent situations any time of the program flow -> Callback function which inform the user and disable all supplys...
I search a default way to do, and don't won't to write a custom IVI driver.
Best regards
04-13-2011 08:32 PM
I have never seen IVI drivers having such callback feature.
But you will still able to access VISA COM interface if the driver is IVI-COM.
Then invoke IEventManager::InstallHandler and EnableEvent methods.
04-15-2011 01:07 AM
Hi Sebastian,
As for I know, function cannot be called automatically with the change of Status Bit.
I have two suggestions:
1) Busy waiting for the change of Status Bit, using while loop. This method consumes a lot of CPU.
2) If you do not demand very accurate response to the change of Status Bit, you may detect the change of Status Bit at beginning of every function.
04-15-2011 02:56 PM
Good evening,
I found the solution (-:
when I get the VISA Session from the IVI Driver with GetAttributeViSession -> IVI_ATTR_IO_SESSION I can install an event handler like this:
http://www.ni.com/support/visa/vevents.pdf and now I can catch all STATUS REGISTER changes.
thanks for your suggestion and
best regards Sebastian
04-18-2011 04:29 AM
Sebastian, thank you for sharing the solution with us.