Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-VISA Method to send a String followed by Binary Data

 

I would like to send a command in ASCII format, immediately followed by a byte array. The obvious way to send the binary data is using:

     MessageBasedSessionWriter writer = new MessageBasedSessionWriter(mbSession);               
     writer.BinaryEncoding = BinaryEncoding.RawLittleEndian;
     writer.WriteBinary(setupData);

where setupData is a byte array, already returned from the instrument. The command string has to be in the same Write() method as the byte array, but after some reading and a lot of trial and error I'm baffled. Is there no way to do this in .NET?

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