Can U tell me how to read GPIB buffer on asynchronous events using ibrd and the EOS termination. When I program my application and when no EOS is reveived the CPU is tied up, blocking the rest on the threads of my application.
What I want to do is to wait the EOS termination buffer but not tied up the CPU. Is it possible easily or do I need implementing interrupt and catch signal? How can I configure the bus for no polling at all?
Please reply to the other thread which you started on this topic. What programming language are you using? Is this in Linux? What driver version? How do you know that the CPU is tied up? How many other threads does your application have? Are these threads doing GPIB communication or something else?
If so, I would recommend rearchitechting your code. If you are continually calling ibrd() then it doesn't necessarily tie up the CPU but it will tie up the GPIB Driver. Only one thread can have a pending GPIB operation at a time. The driver will make sure that it doesn't mix or combine the two calls. This may be what you are seeing.
The recommended way of doing this is to call ibwrt() and then only call ibrd() when you have data available to be read from the device. You should know which strings will return data from your instrument. If you don't, consider using the RQS bit or the SRQ line (or both) to know when you should read. Please see the documentation for an explanation of these lines.
Yes, that's true; newer versions of the driver include "ThreadIberr()" and "ThreadIbsta()" for thread-safe status. Check out our latest linux beta driver at www.ni.com/beta. You can sign up to receive it there. It has these thread-safe calls, and with what we discussed above, you should be all set.
Please submit bug/support requests through the beta website so that we can track them. Be sure to provide all the details of your problem including linux distribution and a full output of the install script (if applicable).