mikehu
學習就學習
級別: 略有小成
|
看和 什么通訊 要知道 協(xié)議 假如和變頻器 就要 設置端口參數(shù) 變頻器的 一些協(xié)議 好多變頻器上面有例子 |
---|---|
|
wangxiyan338
級別: 略有小成
|
假設與FX2N通訊rivate Sub CommSet() On Error GoTo err1 If CommFX.PortOpen = True Then CommFX.PortOpen = False End If If Not CommFX.PortOpen Then CommFX.CommPort = cboPort.ListIndex + 1 '通信口 CommFX.Settings = "9600,N,8,1" '固定值即可 CommFX.Handshaking = 0 CommFX.InputLen = 0 CommFX.OutBufferCount = 0 CommFX.InBufferCount = 0 CommFX.PortOpen = True End If Exit Sub err1: MsgBox Err.Description |
---|---|
|