Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
他们是什么意思
port.DtrEnable = true,
https://support.cognex.com/docs/dmst_616SR1/web/EN/Comms_Prog_Manual/Content/Topics/PDF/DMCAP/DMCCApplicationDevelopment.htm
我在哪里把这段代码放在示例代码上?
您可能正在使用 COM 端口。
你需要进口
using System.IO.Ports;
当你创建一个SerialPort你应该设置属性
var serialPort = new SerialPort(); serialPort.DtrEnable = true;