tags:

views:

60

answers:

1

Hi,

Could anyone tell me how to format the serialport.write method in c# for the following get memory command of a digital multimeter?

DLE STX Command arg1 arg2 arg3 DLE ETX

10h 02h 4Eh 00h 00h 00h 10h 03h

Many thanks

A: 

Try creating a byte array, and writing this to the port.

byte[] data = new byte[] {0x10, 0x02, 0x4E, 0x0, 0x0, 0x0, 0x10, 0x03};

port.Write(data, 0, data.Length);
Andy
Thanks for the help Andy - did the trick, much appreciated.
No probs, glad it worked!
Andy