05-28-2014 01:41 AM
I use this code line:
gpibDevice.Wait(GpibStatusFlags.DeviceServiceRequest | GpibStatusFlags.Timeout);
I want to wait for a Service Request or a Timeout.
The IOTimeout is set to 1s, but the Wait function does not return after 1s.
What is the problem? Do I have to set any other timeout?
05-30-2014 07:41 AM
Hi,
pleasy refer to this documentation:
Beste Regards
06-02-2014 01:59 AM
Hi Gregor,
I am sorry but this link that you send, did not help me. I am using this code within a c# application. This is a bit
different to LabView. Here is my full code:
gpibAddress = 1;
timeoutValue = TimeoutValue.T1s;
gpibDevice = newDevice( 0, gpibAddress , 0 , timeoutValue );
gpibDevice.IOTimeout = timeoutValue;
gpibDevice.Clear();
gpibDevice.DefaultBufferSize = receiveBufferSize;
gpibDevice.SerialPollResponseTimeout = timeoutValue;
gpibDevice.Wait(GpibStatusFlags.DeviceServiceRequest | GpibStatusFlags.Timeout);
And I still have the Problem, that this Wait Function does not return after the
timeout value - here 1s. Do I have to configure anything else from the GPIB device?
06-03-2014 02:41 AM
hi,
what is the state you get back from the gpibdevice.wait function? Is it 0? If not, what is it?
06-03-2014 04:22 AM
Hi Gregor,
the problem that I have is that this device.wait function does not return because of a timeout. It is like a blocking call.
So I can not say what the result is.
Another problem that I have is when a device is connected and this device sends a SRQ, then
the wait function only returns when the timout value is larger than 1s.
Are this two problems connected?
When I set the timeout to 10s and a device sends a SRQ then I get
GpibStatusFlags.DeviceServiceRequest
and
GpibStatusFlags.IOComplete
What can be the problem???????????????????
06-10-2014 09:29 AM
Hi OnkiDonki,
If you use an OR operator in a condition, you should use the conditionnal Operator "||"
You can try :
gpibDevice.Wait(GpibStatusFlags.DeviceServiceRequest || GpibStatusFlags.Timeout);
Marc