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

tangfeng
學(xué)海無涯
級別: 探索解密
精華主題: 0
發(fā)帖數(shù)量: 44 個
工控威望: 143 點
下載積分: 922 分
在線時間: 96(小時)
注冊時間: 2010-01-24
最后登錄: 2025-05-15
查看tangfeng的 主題 / 回貼
樓主  發(fā)表于: 2017-09-02 16:50
'在窗體的Load事件中加入下列代碼對串口進行初始化:
Private Sub Form_Load()
  MSComm1.CommPort = 1                  ' 設(shè)置通信端口號為COM1
  MSComm1.InputMode = 1                 ' 接收二進制型數(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               ' 打開通信端口1
  Timer1.Enabled = False
End Sub
'向PLC發(fā)送指令:02 30 31 30 30 30 32 30 03 35 36,功能是從D0開始讀取32個字節(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表示觸點閉合
    Shape1(0).FillColor = QBColor(12)
  Else                                           '30表示觸點斷開
    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
'當退出程序時,關(guān)閉串行口
Private Sub Cmdquit_Click()
  MSComm1.PortOpen = False           '關(guān)閉串口
  Unload Me
End Sub
// 讀不到PLC 輸入點,下標越界,望高手指點修改
gafika
級別: 略有小成
精華主題: 0
發(fā)帖數(shù)量: 17 個
工控威望: 395 點
下載積分: 2341 分
在線時間: 41(小時)
注冊時間: 2018-02-16
最后登錄: 2025-05-02
查看gafika的 主題 / 回貼
1樓  發(fā)表于: 2018-03-10 18:26
ASCII 跟 HEX 要先搞清楚。

青草青草久视频免费观看| 中文字幕欧美日韩姑娘日b| 国产99久久久久久久久久| 肉动漫久久一区二区三区| 中文字幕欧美日韩姑娘日b| 噜噜色综合噜噜色噜噜色| 日本成人在线免费一二区| 大肉棒插入骚穴免费视频| 成人五月天黄色激情电影| 国产在线观看福利片官方| 男人操女人喷水免费视频| 亚洲丰满多毛的隂户| 污黄呻吟在线看| 又粗又大鸡视频在线观看| 老湿机午夜在线免费观看| 少妇人妻夹住了我的粗大| 精品国产久一区二区三区| 91一区二区三区久久久| 色呦呦中文字幕在线观看| 日本1V1一本中文字幕| 嫩草伊人久久久av少妇| 亚洲av乱码一区二区三区按摩| 美女粉嫩逼深夜被肏视频| 久久久无码精品国产一区| 在线手机av人| 日本不卡一区二区三区在线| 日韩最新视频一区二区三区| 啊哈连续操高潮好爽视频| 小处女逼逼视频| 欧美在线中文字幕高清的| 亚洲精品福利xxxxx| 日本免费一区二区三区高清视频| 巨屌干嫩穴视频| 牛牛色婷婷在线视频播放| 中文字幕人成人亚洲乱码| 97国产超碰女人任你爽| 大鸡巴在穴里抽插h视频| 99热丝袜诱惑中文字幕| 激情综合婷婷色五月蜜桃| 亚洲欧美中文日韩v在线| 国精产品一二三四线免费|