且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用SerialPort.Write()将命令发送到Com端口

更新时间:2023-10-17 14:38:16

01W#0001


0D


0A到rs232端口使用 SerialPort.Write



我试图通过Hercules Utility发送命令,只是为了检查命令是否正常,它运行正常。

但我的代码似乎根本不起作用。我做错了什么?

0A" to rs232 port using SerialPort.Write.

I've tried to send the command via Hercules Utility, just to check if the command is ok, and it works fine.
But my code doesn't seem to work at all. What am i doing wrong?
SerialPort.Write("##