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?