铭铭之中

积分:246
上传文件:1
下载次数:0
注册日期:2018-10-12 20:50:31

上传列表
VB与OMRON PLC通讯源码.rar - 这是VB和欧姆龙通讯源码经典的例子, Lettura_Dm = False ricez_ok = -1: timeout = False trasm = "@00RD" trasm = trasm + Right$(Str$(10000 + dm!), 4) trasm = trasm + "0001" trasm = trasm + bcc(trasm) + Chr$(42) + Chr$(13) Omron!Comm1.Output = trasm conta = 0 Do conta = conta + 1 If conta > 1200 Then timeout = True: Exit Do Loop Until Omron!Comm1.InBufferCount >= 15 a = Omron!Comm1.Input If Not timeout Then fcs = Mid$(a, (Len(a) - 3), 2) trasm = Left$(a, (Len(a) - 4)) If fcs <> bcc(trasm) Then timeout = -1 Exit Function End If valore = Mid$(a, 8, 4) V = Val("&H" + valore) Lettura_Dm = True End If ricez_ok = 0 Omron!Comm1.InBufferCount = 0 End Function,2018-10-12 20:58:36,下载9次

近期下载

收藏