LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Warning 0x3FFF0006 during a binary file read

Hello,
 
  I would like to understand why I am getting the following warning during a binary file read, the warning is
 
VISA:  (Hex 0x3FFF0006) The number of bytes transferred is equal to the requested input count. More data might be available.
 
I have created the file in question with PERL code that reports the file size to be 4801, when I look at the file with windows explorer I get this for the size 4.68 KB (4,801 bytes) and this for the size on the disk 5.00 KB (5,120 bytes).  Why do I get a warning message when I am reading all of the bytes in the file, which is 4801?
 
 
Regards,


Kaspar
0 Kudos
Message 1 of 6
(5,498 Views)
No sure which VISA function you are using for a file read but the warning occurs because of the way VISA is typically used for instrument communication. Some sort of termination character is often present. With GPIB, there is the EOI character, serial might have a CR/LF, etc., and the presence of this will automatically terminate a VISA read. You can specify some large number of bytes to read and you will not get an error if the instrument has less bytes available. There might be a problem if the program specifies fewer bytes than what the instrument might have available so VISA will issue a warning if the number of received bytes is equal to the number of requested bytes. In the majority of cases, the warning can be simply ignored. I do a lot of serial communication with stuff that doesn't send a termination character. I use the VISA Bytes at Serial Port to determine how many bytes to read and wire this value to the VISA Read. In a situation like this, the warning is simply ignored. If I get this warning with a GPIB instrument Read, I know I have to increase the byte count in order to flush the instrument's transmit buffer.
0 Kudos
Message 2 of 6
(5,494 Views)

Hello,

  I can understand if I was reading from a instrument and/or device. But I am reading from a file, therefore the concept of termination characters should not apply, unless I am trying to read past the end of the file.

 So are there any other ideas about why I am getting this warning?

 

Regards,


Kaspar
0 Kudos
Message 3 of 6
(5,478 Views)

Read what I said again. You will always get this warning when you specify a byte count and the number received is exactly equal to it. The only time you will not get the warning is when you receive a termination character. Since it is only a warning, you can ignore it. If it for some reason it bothers you to even see the warning, you can easily check for this error code and remove it. The Clear Errors function will do this as well but then you might be removing legitimate errors.

I'd also like to know which VISA function you are using for a file read.

Message 4 of 6
(5,475 Views)
Hello,
 
  Sorry for not reading your response more carefully. I the function I am using is called "Read from a binary file".
Regards,


Kaspar
0 Kudos
Message 5 of 6
(5,465 Views)
You are getting a VISA error with Read From Binary File? That seems a bit strange. I've only got the eval version of 8.2 but a quick test doesn't show an error when I use this function. Is there a VISA read in your program? If there isn't, I would like to see your program. If there is a VISA error being generated by the read file, then that sounds like a bug.
0 Kudos
Message 6 of 6
(5,459 Views)