05-14-2012 12:13 AM
Is the GPIB timeout established with ibdev implemented on a byte basis or on a message basis?
If timeout is 10sec and I make an ibwrt call to send 10 byte message to a device that's been turned off, how long until I get a timeout return? 10 sec? 100 sec?
The gpib lib help implies that it's on a message basis but it's not perfectly clear to me. I know rs-232 library timeout is on a character basis, not a message basis.
Thanks.
05-14-2012 04:28 PM
According to the NI-488.2 Help, the ibdev command uses the input IbcTMO, which uses a v constant that specifies predefined timeout values. So if you make an ibwrt call to send 10 bytes to a disconnected or turned off device, you will wait whatever the v value of IbcTMO is.
05-14-2012 05:23 PM
Thanks.
Yes, it uses a set of constants (apparently an enumeration of some kind, 13 => 10 seconds) for the timeout.
I know what the help says, it's just that it gave no examples, and I know that the NI serial library in a similar situation enforces the timeout on a character basis. And it seems somehow counterintuitive that you'd want a timeout to fire if you're in fact successfully sending / receving bytes at the time.
Thanks again.