02-08-2008 07:46 AM
02-08-2008 07:52 AM
Hi DAVE
if you change the read part in that way that you only read if there are signs, then you get no error.
See the attachment. hope it helps.
Mike
02-08-2008 08:04 AM
02-08-2008 08:21 AM
The amount of time you have wait after sending a query is instrument (and query) dependent. There are a couple of things you can do.
(1) If the instrument appends a termination character at the end of it's data, then you can enable this with the VISA Configure Serial Port. The VISA Read will automatically terminate when the term character is received so you don't need to specify much, if any wait and can specify some arbitrary number for the bytes to read. If you are using an instrument that responds to the *IDN? query, it probably sends a term character and you should be using it.
(2) You can put the VISA Bytes at Serial Port inside a while loop. Exit the while loop when byte count is greater than 0. Then, in another while loop, use VISA Bytes at Serial Port with a VISA Read. Exit this loop when the byte count is 0. You would use a shift register to build the string returned.
p.s. Your note in the VI about the code 1073676294 returned is not correct. This is not an error. It is a warning and you will get this warning whenever you disable the termination character and do a VISA Read. Because you have disabled the term character detection, it is just an alert that there may be more data available.
02-08-2008 09:12 AM
02-11-2008 05:05 AM
02-11-2008 05:41 AM