I am trying to communicate with a serial device (via a virtual COM port). My problem is that I do not know how to turn the commands given in the reference (e.g. the one in the image below) into the correct message to be sent via fwrite(). The simple code as I have it is
o = serial('COM4','BaudRate',115200,'DataBits',8,'Stopbits',1)
o.FlowControl = 'hardware';
I have tried this with different destination (d) bytes corresponding to the different possibilities that make sense, but nothing works - no response from the hardware. I am sure that the COMport is the correct one. I have also done this with the tmtool and changed through the different formats (binary or ASCII). I feel like most likely, the message I am sending is not what I think it is - how do I convert the "TX 23,02,00,00,21,01" into something to send to the serial port? Do I need to send the bytes individually, or as a string, or...?