请教VC6.0的串行通讯问题,使用的是MSComm控件,发送控制数据,但从机(变频器)总是收不到,希望高手指点
发布网友
发布时间:2022-04-23 09:49
我来回答
共2个回答
热心网友
时间:2023-10-10 02:36
m_ctrlComm.SetCommPort(2);
m_ctrlComm.SetInputMode(1);
m_ctrlComm.SetInBufferSize(1024);//
m_ctrlComm.SetOutBufferSize(512);//
m_ctrlComm.SetSettings("9600,n,8,1");
if(!m_ctrlComm.GetPortOpen())
m_ctrlComm.SetPortOpen(TRUE);
m_ctrlComm.SetRThreshold(1);
m_ctrlComm.SetInputLen(0);
m_ctrlComm.GetInput();
热心网友
时间:2023-10-10 02:37
0.0