伊人激情av一区二区三区,亚洲乱亚洲乱妇,女逼穴穴抽插下载上厕所,国产呦系列视频在线观看

tangfeng
學(xué)海無(wú)涯
級(jí)別: 探索解密
精華主題: 0
發(fā)帖數(shù)量: 44 個(gè)
工控威望: 143 點(diǎn)
下載積分: 922 分
在線(xiàn)時(shí)間: 96(小時(shí))
注冊(cè)時(shí)間: 2010-01-24
最后登錄: 2025-05-12
查看tangfeng的 主題 / 回貼
樓主  發(fā)表于: 2017-09-02 16:50
'在窗體的Load事件中加入下列代碼對(duì)串口進(jìn)行初始化:
Private Sub Form_Load()
  MSComm1.CommPort = 1                  ' 設(shè)置通信端口號(hào)為COM1
  MSComm1.InputMode = 1                 ' 接收二進(jìn)制型數(shù)據(jù)
  MSComm1.RThreshold = 1                ' 設(shè)置并返回要接收的字符數(shù)
  MSComm1.SThreshold = 1                ' 設(shè)置并返回發(fā)送緩沖區(qū)中允許的最小字符數(shù)
  MSComm1.Settings = "9600,E,7,1"       ' 設(shè)置串口1通信參數(shù)
  MSComm1.PortOpen = True               ' 打開(kāi)通信端口1
  Timer1.Enabled = False
End Sub
'向PLC發(fā)送指令:02 30 31 30 30 30 32 30 03 35 36,功能是從D0開(kāi)始讀取32個(gè)字節(jié)數(shù)據(jù)
Private Sub Cmdsend_Click()
  MSComm1.Output = Chr(&H2) & Chr(&H30) & Chr(&H31) & Chr(&H30) & Chr(&H30) & Chr(&H30) & Chr(&H32) & Chr(&H30) & Chr(&H3) & Chr(&H35) & Chr(&H38)
  Timer1.Enabled = True
End Sub
'獲得各輸入端口狀態(tài)
Private Sub Timer1_Timer()
  Dim Inbyte() As Byte
  Dim buffer As String
  ReDim Inbyte(100)
  Inbyte = MSComm1.Input                         '返回的數(shù)據(jù)串
  For i = LBound(Inbyte) To UBound(Inbyte)
     buffer = buffer + Hex(Inbyte(i)) + Chr(32)
  Next i
  'Text1.Text = buffer                            '顯示返回的數(shù)據(jù)串,需自己添加TextBox
  If Hex(Inbyte(2)) = "31" Then                  '31表示觸點(diǎn)閉合
    Shape1(0).FillColor = QBColor(12)
  Else                                           '30表示觸點(diǎn)斷開(kāi)
    Shape1(0).FillColor = QBColor(10)
  End If
  If Hex(Inbyte(6)) = "31" Then
    Shape1(1).FillColor = QBColor(12)
  Else
    Shape1(1).FillColor = QBColor(10)
  End If
  If Hex(Inbyte(10)) = "31" Then
    Shape1(2).FillColor = QBColor(12)
  Else
    Shape1(2).FillColor = QBColor(10)
  End If
  If Hex(Inbyte(14)) = "31" Then
    Shape1(3).FillColor = QBColor(12)
  Else
    Shape1(3).FillColor = QBColor(10)
  End If
  If Hex(Inbyte(18)) = "31" Then
    Shape1(4).FillColor = QBColor(12)
  Else
    Shape1(4).FillColor = QBColor(10)
  End If
  If Hex(Inbyte(22)) = "31" Then
    Shape1(5).FillColor = QBColor(12)
  Else
    Shape1(5).FillColor = QBColor(10)
  End If
  If Hex(Inbyte(26)) = "31" Then
    Shape1(6).FillColor = QBColor(12)
  Else
    Shape1(6).FillColor = QBColor(10)
  End If
  If Hex(Inbyte(30)) = "31" Then
    Shape1(7).FillColor = QBColor(12)
  Else
    Shape1(7).FillColor = QBColor(10)
  End If
  If Hex(Inbyte(34)) = "31" Then
    Shape1(8).FillColor = QBColor(12)
  Else
    Shape1(8).FillColor = QBColor(10)
  End If
  If Hex(Inbyte(38)) = "31" Then
    Shape1(9).FillColor = QBColor(12)
  Else
    Shape1(9).FillColor = QBColor(10)
  End If
  If Hex(Inbyte(42)) = "31" Then
    Shape1(10).FillColor = QBColor(12)
  Else
    Shape1(10).FillColor = QBColor(10)
  End If
  If Hex(Inbyte(46)) = "31" Then
    Shape1(11).FillColor = QBColor(12)
  Else
    Shape1(11).FillColor = QBColor(10)
  End If
  If Hex(Inbyte(50)) = "31" Then
    Shape1(12).FillColor = QBColor(12)
  Else
    Shape1(12).FillColor = QBColor(10)
  End If
  If Hex(Inbyte(54)) = "31" Then
    Shape1(13).FillColor = QBColor(12)
  Else
    Shape1(13).FillColor = QBColor(10)
  End If
  If Hex(Inbyte(58)) = "31" Then
    Shape1(14).FillColor = QBColor(12)
  Else
    Shape1(14).FillColor = QBColor(10)
  End If
  If Hex(Inbyte(62)) = "31" Then
    Shape1(15).FillColor = QBColor(12)
  Else
    Shape1(15).FillColor = QBColor(10)
  End If
  Timer1.Enabled = False
End Sub
'當(dāng)退出程序時(shí),關(guān)閉串行口
Private Sub Cmdquit_Click()
  MSComm1.PortOpen = False           '關(guān)閉串口
  Unload Me
End Sub
// 讀不到PLC 輸入點(diǎn),下標(biāo)越界,望高手指點(diǎn)修改
duquanplc
DDD
級(jí)別: 略有小成
精華主題: 0
發(fā)帖數(shù)量: 260 個(gè)
工控威望: 404 點(diǎn)
下載積分: 703 分
在線(xiàn)時(shí)間: 220(小時(shí))
注冊(cè)時(shí)間: 2008-08-25
最后登錄: 2025-05-01
查看duquanplc的 主題 / 回貼
1樓  發(fā)表于: 2017-09-08 21:57
為什么不用專(zhuān)用協(xié)議做呢?格式一或格式四都可。

大鸡巴强奸处女裸体视频| 日韩欧美亚洲精品高清国产| 欧美一区二区三区精品免费| 重口味av无码在线观看| 久久久久久久久23台二民| 国产在线观看网站你懂得| 天天干天天操狠狠天天做| 国产精品伦理一区二区三区| 爆操美女大骚逼| 国产精品国产自线拍免费| 鸡鸡插逼逼视频| 中文字字幕在线38乱码| 欧美va亚洲va日韩va| hentai在线视频国产| 亚洲熟伦熟女新五十路熟| 十二以下岁女子毛片免费| 99精品欧美国产一区二区| 能看女生被艹的视频网站| 精品视频99| 我要操美女那个大白嫩逼| 色婷婷久久综合久色综合| 性生片30分钟| 午夜大乳房视频在线播放| 欧美伊人久久大香线蕉综合| 日本人爱一级一区二区三区 | 国内精品国产三级国产av| 亚洲精品二三区伊人久久| 24小时日本高清在线播放| 嗯啊不要app| 一出一进一爽一粗一大视频 | 女教师の爆乳bd在线观看| 久久精品无码专区东京热| 老司机午夜福利免费视频| 少妇高潮毛片免费看| 国产av巨作搭讪美女8| 日本有码在线看| 99国产精品99久久久久久| av永久免费网站在线观看| 日韩精品无码毛片免费看| 亚洲大尺度一区二区av| 大黑逼电影网站|