Serial Communication command with carriage return and newline

4 visualizaciones (últimos 30 días)
Randy Tan
Randy Tan el 13 de Mzo. de 2019
How to write the below statement that send command to serial port in visualbasic to MatLab?
Visual Basic: MSComm1.output = "POWER, OFF" & vbCrLf
below ways are tried but it seems not working (serial port had set up bfr this statement)
1) fwrite(ComHandle, 'POWER, ON')
2) fwrite(ComHandle, 'POWER, ON \r\n')
3) sc = strcat('POWER, ON' , char(13), char(10))
fwrite(ComHandle, sc)
none of them is working
what's going wrong on the above statement

Respuestas (0)

Categorías

Más información sobre Language Fundamentals en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by