Part of it is logic. Dennis is correct that the GPIB will terminate the
transmission with an EOI, which will in turn cause your VISA Read to
return the status VI_SUCCESS (or in LabVIEW, the error number will be 0
coming out of the error cluster). If the data is not terminated by EOI,
the VISA Read should return a warning about the maximum size that was
requested was returned. If you don't know how big the file is, you will
just loop on the VISA read until you get en error or success. For each
read, you would concatonate the new response to the old response to
make the complete response.
Does this make sense?
The best thing, like Dennis said, is to read much more than you
anticipate and you will only have to read once and you can skip all of
this logic.