文件名称:VB与OMRON PLC通讯源码
-
所属分类:
- 标签属性:
- 上传时间:2018-10-12
-
文件大小:3kb
-
已下载:2次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
这是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(This is a VB to omron 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)
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(This is a VB to omron 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)
相关搜索: VB与欧姆龙PLC通讯源码
(系统自动生成,下载前可以参看下载内容)
下载文件列表
文件名 | 大小 | 更新时间 |
---|---|---|
OMRON PLC通讯源码\MSSCCPRJ.SCC | 190 | 2007-05-09 |
OMRON PLC通讯源码\Omron.bas | 2446 | 1999-04-08 |
OMRON PLC通讯源码\Omron.frm | 6071 | 1999-04-08 |
OMRON PLC通讯源码\Omron.vbp | 592 | 1999-04-08 |
OMRON PLC通讯源码\Omron.vbw | 86 | 2007-05-09 |
OMRON PLC通讯源码 | 0 | 2007-05-09 |
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.