03-14-2006 10:13 AM
03-14-2006 10:28 AM
03-14-2006 10:33 AM
What hardware interface are you using? GPIB, Serial, or any others? GPIB has a special termination condition - EOI, which does not exist in Serial interface, therefore there is some difference between them.
VISA Read function (viRead, viScanf) can successfully and rapidly return only when:
(1) Explicit termination character (0x0A default) is encountered on viRead/viScanf call, or
(2) Number of bytes specified on viRead() call has been transfered.
In your case, it seems like the response string does not contain the CR(0x0D) or LF(0x0A) as a termination character, therefore the VISA Read call is timed out. If any other character byte is constantly expected as string termination, you can avoid the timeout problem by changing VI_ATTR_TERMCHAR attribute using viSetAttribute() function. Otherwise, you must use viRead function explicitly specifying number of bytes expected.
03-16-2006 06:13 AM
Thank you.
Definiton of number of bytes expected solves the problem.
Thanks a lot.