Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Maximum bytes for a VISA read?

I'm using LV 7.1 to communicate with my hardware over RS-422 (an NI PCI card).  I was wondering what the maximum number of bytes is that I can request at one time.  I get an error message (which I did not write down verbatim) that indicates that I cannot read more than 64k 16-bit words at once.  Is 64k 16-bit words the limit for a VISA read?  Is there any difference in the maximum number of bytes that can be read between LV 7.1 and LV 8.x?
 
Thank you for your help!
 
Regards,
mlloyd
0 Kudos
Message 1 of 6
(4,213 Views)
VISA has no problems with 64k or more. But maybe the rs422 card has a max buffer.
greetings from the Netherlands
Message 2 of 6
(4,210 Views)
Good point.  I'll check the specific card I'm using.
0 Kudos
Message 3 of 6
(4,207 Views)

I have checked my RS422 card.  It has a 128 byte transmit / receive buffer.  I can transmit much more than 128 bytes; therefore, I don't think the hardware is causing a problem.

I did not mention it before, but I am communicating with my hardware using an executable I build in LV 7.1.  I had NI-VISA 3.3.1 installed when I built the exectuable and installer.  I need to confirm that this is the version of the drivers that are installed on the lab machine that is communicating with the hardware.

Could it be that with NI-VISA 3.3.1, it is only possible to receive 64k data at a time?

 

Thanks for your help,

mlloyd

0 Kudos
Message 4 of 6
(4,155 Views)
Hi mlloyd,

You may be seeing this issue because you have a different version of VISA then you created the exe with. Sometimes different driver versions will work but  most of the time you will encounter issues. Basically make sure that your lab machine has NI-VISA 3.3.1 because this could be causing an issue. The issue is not because other versions of VISA cannot receive 64k but because you built the exe with that driver.


Regards
Krista S.
Applications Engineering
National Instruments
Message 5 of 6
(4,141 Views)

I think I have finally isolated my problem to my initial settings for the VISA buffer.  I had forgotten that I configured my buffer for 64k data but noticed it when reviewing my code the other day.  Everyone was right all along -- VISA has no problems or limits with 64k data.  It's only users that cause the problems!

Thanks for your help.

 

Regards,

mlloyd

0 Kudos
Message 6 of 6
(4,020 Views)