From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
01-04-2013 05:32 PM
I used the sample vb program included with NI4882 drivers and the maximun size of the read command is 1024 characters. How can I read more than 1024 characters?
Solved! Go to Solution.
01-07-2013 02:42 PM
Hello rjj5
According to this website and IEEE protocol. The expected buffersize of many serial devices in 1kByte of information. This means that you can only gurantee the safe transfer of that much data at any given time. You can break your data read and data write functions into smaller pieces in order to send more data than just 1kByte, but for one packet of information I would stay within the 1kByte regulation.
Dano D.
National Instruments
Applications Engineer
01-08-2013 11:21 AM
Thanks, Dano. The device I am trying to query returns 8K of data. I was able to make it work with the old vb6 software module by changing the size of the read buffer from 1k to 8k. How would you break the read data into 1kByte? I am using the following:
Dim Temp1 As String
GpibDevice.Write("caltgttable?")
Temp1 = InsertCommonEscapeSequences(GpibDevice.ReadString())
thanks,
RJJ
01-08-2013 01:36 PM
Hello RJJJ,
Please take a look at the following link, especially the answer from the wizard Albert Geven I think this might solve the issue at hand. I am looking into a way you can change the buffer size on your system.
http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/GPIB-read-multiple-data-from-instrument-buffe...
Dano D.
Applications Engineering
National Instruments
01-11-2013 10:11 AM
Hi,
Have you tried using ReadByteData
byte[] bytedata; double[] wavedata; bytedata = m_device.ReadByteArray(1010); m_device.Wait(gsf.IOComplete); wavedata = new double[1000]; for (int j = 10; j < 1010 ; j++) { wavedata[j-10] = Convert.ToDouble(bytedata[j]); Trace.WriteLine(j + " " + wavedata[j -10]); }
Curt
01-23-2013 01:38 PM
Thanks, Curt. That worked.
04-19-2013 09:57 AM
Hi,
The solved method I'm sure works, but an easier solution is to change the default buffer size.
For example use,
GPIBDevice.DefaultBufferSize = 2048
This increases from 1024 to 2048.
Enjoy,
Brad