AnsweredAssumed Answered

Uploading/downloading files with 8712ET network analyzer

Question asked by bretth on Jun 3, 2015
Latest reply on Jun 8, 2015 by Dr_joel
I'm trying to transfer state files (.STA) to/from a host PC and the 8712ET using the IVI VISA-COM driver in C# over a socket LAN connection:

var resourceManager = new ResourceManager();
var visaIO = new FormattedIO488 { IO = (IMessage)resourceManager.Open('TCPIP0::") };
visaIO.IO.TerminationCharacterEnabled = true;


// Upload
byte[] data = // get binary data from a local file on the host PC
visaIO.WriteIEEEBlock("MMEM:TRAN:BDAT 'MEM:\STATE1.STA'," data);

// Download
visaIO.WriteString("MMEM:TRAN? 'MEM:\STATE1.STA'");
var bytes = (byte[])visaIO.ReadIEEEBlock(IEEEBinaryType.BinaryType_UI1);
// save bytes to local file on host PC


Uploading always crashes my app when it hits visaIO.WriteIEEEBlock() even if I have exception handlers.

Downloading always returns a null byte array from visaIO.ReadIEEEBlock().

I'm not sure what I'm doing wrong because the same code works for a PSA ("MMEM:TRAN" is switched to "MMEM:DATA")