LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Number of bytes read" warning on VISA Read

I'm communicating with a serial interfaced motor controller using LabView 8.2 and keep getting a warning that the number of bytes returned by the controller in response to a VISA Read is the same as the number expected.  When it issues the message, the program throws up a dialog box and suspends execution waiting for a response.  How can I turn off the warning so the program keeps running?
0 Kudos
Message 1 of 7
(2,632 Views)

You're probably using a property node to read how many bytes are at the port, then reading that number. All this warning means is that you're getting back the same amount that you asked for, so there could still be some data left at the port. If you don't want to receive this warning, simply wire a number to the VISA read that is bigger than you expect to get. The data will be read until there is a termination character.

If your device does not send a terminator, then you'll have to keep doing it the way you are. You can just check for that warning after the read and discard it.

I think something should be done about this topic in the help file, this question seems to come up more than anything else on the forum.

Message 2 of 7
(2,625 Views)

Marc,

Thanks for your suggestion.  I think you're exactly right.  I'm using a Property Node to tell the VISA Read how many bytes to expect, so it's always the same number as that received.  I wish there were a way to just turn it off (set it to "silent" or something), but I'll just feed it a big number as you suggested.

Thanks for the quick response.

Jay

 

0 Kudos
Message 3 of 7
(2,617 Views)
If you have automatic error dialogs turned off and if you wire up the error cluster, you won't get the pop-up. Also, do not wire a large number unless you actually do have a termination character received.
0 Kudos
Message 4 of 7
(2,614 Views)
Dennis,
 
Thanks for your reply.  I hate to ask such a stupid newbie question but am not a LabView expert.  Where/how do I turn off the automatic error dialogs?  That sounds like a better solution than the large number.
 
Thanks.
 
Jay
0 Kudos
Message 5 of 7
(2,606 Views)
In LabVIEW 8, go to the Tools>Options menu and then select the block diagram category.
Message 6 of 7
(2,601 Views)
Dennis,
 
OK, thanks very much.  I'll try it.
 
Jay
0 Kudos
Message 7 of 7
(2,591 Views)