Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-VISA 19.0 and MessageBasedSessions -?

I am writing a VB NET program for my Siglent spectrum analyzer.  Admittedly I am a VB Net newbie but I have communications working well.  Next I wanted to start playing with trace data.   For example I use a Siglent command for getting screen trace data:  

 

mbSession.RawIO.Write(":TRACe?")
str As String = mbSession.RawIO.ReadString()

 

I am only getting str lengths of 1024 bytes.  Using NI Max and checking by adjusting buffer size, the TRACe? command returns about 20,000 bytes of data and the size will vary depending on the spectrum analyzer function. Is there some method to use RawIO.ReadString() to read the entire  data string stream?  In VB Net declaring str as string should allow it to become any string length up to >1 Mbyte.   Is the 1024 byte limit a RawIO.ReadString() issue?? 

 

Any advice would be greatly appreciated.

 

0 Kudos
Message 1 of 2
(1,108 Views)

Hi

 

I am not a vb developer but in the web I found the function  ReadString Method (Int32) takes a number as a parameter to tell how many characters you want to read. can you do that?

0 Kudos
Message 2 of 2
(1,053 Views)