超碰成人av-青青草97-天天做天天躁天天躁-久久精品国产亚洲一区二区-亚洲天堂狠狠干-在线观看欧美精品-国产精品美女一区二区视频-国产成人欧美日韩在线电影-一级片免费看视频-免费国产视频在线观看-伊人网久久久-无码人妻丰满熟妇啪啪网不卡-精品欧美乱码久久久久久-国产真实夫妇视频-中文久草

wenluderen
人人為我我為人人
級別: 略有小成
精華主題: 0
發帖數量: 185 個
工控威望: 322 點
下載積分: 6183 分
在線時間: 43(小時)
注冊時間: 2010-09-23
最后登錄: 2024-02-19
查看wenluderen的 主題 / 回貼
樓主  發表于: 2018-07-23 14:32
MX Component 使用控件通訊 就可以直接PLC內部地址的名字,不要在整個標簽。
標簽能了很久 還是不行。


****
控件有很多






感覺三菱每個可以通訊的硬件 都有一個對應的  控制可以使用

    
本帖最近評分記錄:
  • 下載積分:+5(木木2012) 感謝分享!
    wenluderen
    人人為我我為人人
    級別: 略有小成
    精華主題: 0
    發帖數量: 185 個
    工控威望: 322 點
    下載積分: 6183 分
    在線時間: 43(小時)
    注冊時間: 2010-09-23
    最后登錄: 2024-02-19
    查看wenluderen的 主題 / 回貼
    1樓  發表于: 2018-07-23 14:46
    驗證通過AxActUtlTypeLib.AxActUtlType訪問Q04UDV的CPU,硬件接口為以太網
    ***
    新建一個VB.net  ,窗口程序,在工具欄里面添加 控件
    如下圖:

    wenluderen
    人人為我我為人人
    級別: 略有小成
    精華主題: 0
    發帖數量: 185 個
    工控威望: 322 點
    下載積分: 6183 分
    在線時間: 43(小時)
    注冊時間: 2010-09-23
    最后登錄: 2024-02-19
    查看wenluderen的 主題 / 回貼
    2樓  發表于: 2018-07-23 15:00
    添加OPEN 和CLOSE函數

    #Region "打開鏈接"
        Private Sub btn_Open_Click(sender As Object, e As EventArgs) Handles btn_Open.Click
            Dim iReturnCode As Integer              'Return code
            Dim iLogicalStationNumber As Integer    'LogicalStationNumber for ActUtlType

            ClearDisplay()

            Try
                If GetIntValue(txt_LogicalStationNumber, iLogicalStationNumber) = False Then
                    'If failed, this process is end.
                    Exit Sub
                End If
                AxActUtlType1.ActLogicalStationNumber = iLogicalStationNumber

                iReturnCode = AxActUtlType1.Open()

                If iReturnCode = 0 Then
                    'When the Open method is succeeded, disable the TextBox of 'LogocalStationNumber'.
                    txt_LogicalStationNumber.Enabled = False
                End If
            Catch exception As Exception
                MessageBox.Show(exception.Message, Name, MessageBoxButtons.OK, MessageBoxIcon.Error)
                Exit Sub

            End Try
            txt_ReturnCode.Text = String.Format("0x{0:x8} [HEX]", iReturnCode)
        End Sub
    #End Region

    **************
    #Region "關閉鏈接"
        Private Sub btn_Close_Click(sender As Object, e As EventArgs) Handles btn_Close.Click
            Dim iReturnCode As Integer     'Return code
            ClearDisplay()


            Try
                iReturnCode = AxActUtlType1.Close()
                If iReturnCode = 0 Then
                    txt_LogicalStationNumber.Enabled = True
                End If

            Catch exception As Exception
                MessageBox.Show(exception.Message, Name, MessageBoxButtons.OK, MessageBoxIcon.Error)


            End Try
            txt_ReturnCode.Text = String.Format("0x{0:x8} [HEX]", iReturnCode)
        End Sub
    #End Region

    ****
    測試可以通過

    wenluderen
    人人為我我為人人
    級別: 略有小成
    精華主題: 0
    發帖數量: 185 個
    工控威望: 322 點
    下載積分: 6183 分
    在線時間: 43(小時)
    注冊時間: 2010-09-23
    最后登錄: 2024-02-19
    查看wenluderen的 主題 / 回貼
    3樓  發表于: 2018-07-23 15:05
    隨機讀取

    #Region "隨機寫入 PLC里面的地址"
        Private Sub btn_ReadDeviceRandom2_Click(sender As Object, e As EventArgs) Handles btn_ReadDeviceRandom2.Click
            Dim iReturnCode As Integer              'Return code
            Dim szDeviceName As String = ""         'List data for 'DeviceName'
            Dim iNumberOfDeviceName As Integer = 0  'Data for 'DeviceSize'
            Dim sharrDeviceValue() As Short         'Data for 'DeviceValue'
            Dim szarrData() As String               'Array for 'Data'
            Dim iNumber As Integer                  'Loop counter

            'Displayed output data is cleared.
            ClearDisplay()

            'Get the list of 'DeviceName'.
            '  Join each line(StringType array) of 'DeviceName' by the separator '\n',
            '  and create a joined string data.
            szDeviceName = String.Join(vbLf, txt_DeviceNameRandom.Lines)

            If GetIntValue(txt_DeviceSizeRandom, iNumberOfDeviceName) = False Then
                'If failed, this process is end.
                Exit Sub
            End If

            ReDim sharrDeviceValue(iNumberOfDeviceName - 1)

            Try
                iReturnCode = AxActUtlType1.ReadDeviceRandom2(szDeviceName,  iNumberOfDeviceName, sharrDeviceValue(0))
            Catch exException As Exception
                MessageBox.Show(exException.Message, Name, MessageBoxButtons.OK, MessageBoxIcon.Error)
                Exit Sub
            End Try
            txt_ReturnCode.Text = String.Format("0x{0:x8} [HEX]", iReturnCode)

            If iReturnCode = 0 Then

                'Assign the array for the read data.
                ReDim szarrData(iNumberOfDeviceName - 1)

                'Copy the read data to the 'lpszarrData'.
                For iNumber = 0 To iNumberOfDeviceName - 1
                    szarrData(iNumber) = sharrDeviceValue(iNumber).ToString()
                Next iNumber

                'Set the read data to the 'Data', and display it.
                txt_Data.Lines = szarrData
            End If

        End Sub

    #End Region


      
    wenluderen
    人人為我我為人人
    級別: 略有小成
    精華主題: 0
    發帖數量: 185 個
    工控威望: 322 點
    下載積分: 6183 分
    在線時間: 43(小時)
    注冊時間: 2010-09-23
    最后登錄: 2024-02-19
    查看wenluderen的 主題 / 回貼
    4樓  發表于: 2018-07-23 15:09
    測試隨機寫入
    #Region "隨機寫入 PLC里面的地址"
        Private Sub btn_WriteDeviceRandom2_Click(sender As Object, e As EventArgs) Handles btn_WriteDeviceRandom2.Click

            Dim iReturnCode As Integer              'Return code
            Dim szDeviceName As String = ""         'List data for 'DeviceName'
            Dim iNumberOfDeviceName As Integer = 0  'Data for 'DeviceSize'
            Dim sharrDeviceValue() As Short         'Data for 'DeviceValue'

            'Displayed output data is cleared.
            ClearDisplay()

            'Get the list of 'DeviceName'.
            'Join each line(StringType array) of 'DeviceName' by the separator '\n',
            'and create a joined string data.
            szDeviceName = String.Join(vbLf, txt_DeviceNameRandom.Lines)

            'Check the 'DeviceSize'.(If succeeded, the value is gotten.)
            If GetIntValue(txt_DeviceSizeRandom, iNumberOfDeviceName) = False Then
                'If failed, this process is end.
                Exit Sub
            End If

            'Check the 'DeviceValue'.(If succeeded, the value is gotten.)
            ReDim sharrDeviceValue(iNumberOfDeviceName - 1)
            If GetShortArray(txt_DeviceDataRandom, sharrDeviceValue) = False Then
                'If failed, this process is end.
                Exit Sub
            End If

            Try
                iReturnCode = AxActUtlType1.WriteDeviceRandom2(szDeviceName, iNumberOfDeviceName, sharrDeviceValue(0))
            Catch exception As Exception

                MessageBox.Show(exception.Message, Text, MessageBoxButtons.OK, MessageBoxIcon.Error)
                Exit Sub

            End Try
            txt_ReturnCode.Text = String.Format("0x{0:x8} [HEX]", iReturnCode)


        End Sub
    #End Region

    wenluderen
    人人為我我為人人
    級別: 略有小成
    精華主題: 0
    發帖數量: 185 個
    工控威望: 322 點
    下載積分: 6183 分
    在線時間: 43(小時)
    注冊時間: 2010-09-23
    最后登錄: 2024-02-19
    查看wenluderen的 主題 / 回貼
    5樓  發表于: 2018-07-23 15:24
    測試成塊的數據讀取
    #Region "測試成塊的數據讀取"
        Private Sub btn_ReadDeviceBlock2_Click(sender As Object, e As EventArgs) Handles btn_ReadDeviceBlock2.Click

          Dim iReturnCode As Integer              'Return code
            Dim szDeviceName As String = ""         'List data for 'DeviceName'
            Dim iNumberOfDeviceName As Integer = 0  'Data for 'DeviceSize'
            Dim sharrDeviceValue() As Short         'Data for 'DeviceValue'
            Dim szarrData() As String               'Array for 'Data'
            Dim iNumber As Integer                  'Loop counter


            'Displayed output data is cleared.
            ClearDisplay()

            'Get the list of 'DeviceName'.
            '  Join each line(StringType array) of 'DeviceName' by the separator '\n',
            '  and create a joined string data.
            szDeviceName = String.Join(vbLf, txt_DeviceNameBlock.Lines)

            'Check the 'DeviceSize'.(If succeeded, the value is gotten.)
            If GetIntValue(txt_DeviceSizeBlock, iNumberOfDeviceName) = False Then
                'If failed, this process is end.
                Exit Sub
            End If

            'Assign the array for 'DeviceValue'.
            ReDim sharrDeviceValue(iNumberOfDeviceName - 1)

            Try
                iReturnCode = AxActUtlType1.ReadDeviceBlock2(szDeviceName, iNumberOfDeviceName, sharrDeviceValue(0))
            Catch exException As Exception
                MessageBox.Show(exException.Message, Name, MessageBoxButtons.OK, MessageBoxIcon.Error)
                Exit Sub
            End Try


            txt_ReturnCode.Text = String.Format("0x{0:x8} [HEX]", iReturnCode)
            If iReturnCode = 0 Then

                'Assign array for the read data.
                ReDim szarrData(iNumberOfDeviceName - 1)

                'Copy the read data to the 'lpszarrData'.
                For iNumber = 0 To iNumberOfDeviceName - 1
                    szarrData(iNumber) = sharrDeviceValue(iNumber).ToString()
                Next iNumber

                'Set the read data to the 'Data', and display it.
                txt_Data.Lines = szarrData
            End If


        End Sub
    #End Region



    主站蜘蛛池模板: 无码人妻精品中文字幕 | 人妻丰满熟妇岳av无码区hd | h在线看| 黄色片免费在线 | 成人精品视频一区二区三区 | 国产男女猛烈无遮挡a片漫画 | 亚欧无线一线二线三线区别 | jizz在线免费观看 | 日韩不卡一区二区 | 欧美一级三级在线观看 | 一二三四在线视频社区3 | 开操网 | 一本色道久久综合亚洲精品 | 欧美老妇交乱视频在线观看 | 欧洲熟妇色xxxx欧美老妇 | 国产成人精品视频ⅴa片软件竹菊 | 无码人妻久久一区二区三区蜜桃 | 日本免费视频在线观看 | 色吊丝永久性观看网站 | 亚洲中文字幕无码一区二区三区 | 欧美一区二区三区久久精品视 | 国精产品一线二线三线av | 一出一进一爽一粗一大视频 | 丝袜人妻一区二区三区 | 一a一级片 | 四虎成人精品无码永久在线 | 国产偷录视频叫床高潮 | 国产免费又色又爽又黄的网站 | 国产成人亚洲影视在线 | 国产肉体xxxx裸体137大胆 | 国产精品一区二区久久精品涩爱 | 少妇被黑人到高潮喷出白浆 | 国产99在线 | 亚洲 | 国产精品高清一区二区三区 | 玖玖国产精品视频 | 国产第一亚洲 | 久久免费99精品久久久久久 | 无套熟女av呻吟在线观看 | 欧美日韩在线视频观看 | 国产免费av一区二区三区 | 国产精品扒开腿做爽爽爽视频 | 男女在线免费观看 | 9久热这里只有精品视频在线观看 | 国产又粗又猛又黄又爽无遮挡 | 丝袜美腿一区二区三区 | 熟妇人妻中文av无码 | 蜜臀av国产精品久久久久 | 日本特黄特黄刺激大片 | 欧美性生活久久久 | 人妻巨大乳一二三区 | 国产人妻大战黑人20p | 在线视频不卡国产在线视频不卡 | 狠狠躁夜夜躁人人爽超碰97香蕉 | 精品久久久久久无码国产 | 欧美国产第一页 | 麻豆网站入口 | 久久婷婷五月综合色国产香蕉 | 国产人妻黑人一区二区三区 | 娇喘在线| 欧美一级网 | 国产人妻大战黑人20p | 天堂а√8在线最新版在线 亚洲综合在线播放 | 国产拍拍拍三级费视频在线观看 | 97久久曰曰久久久 | 欧美亚洲日本国产综合在线 | 国产乱妇无码大片在线观看 | 国产日产一区二区三区久久久久久 | 精品在线 | 国产亚州精品女人久久久久久 | 国产精品美女 | 毛片免费全部无码播放 | 日日噜噜夜夜狠狠视频 | 韩日精品视频 | 午夜精品久久久久久99热7777 | 香蕉免费一区二区三区 | 国自产在线精品免费 | 久久99国产精品久久99无号码 | 伊人影视| 成人av在线播放 | 999久久久久久久久6666 | 成人性生活视频在线观看 | 里番本子纯肉侵犯肉全彩无码 | 日日麻批免费40分钟无码 | 国产台湾无码av片在线观看 | 亚洲综合一区无码精品 | 日产精品一卡2卡三卡4乱码 | 日韩欧美国产高清在线观看 | 国产精品乱码人妻一区二区三区 | 亚洲国产综合精品 在线 一区 | 欧美激情一区二区久久久 | 无码人妻精品一区二区三区夜夜嗨 | 99re视频在线播放 | 东北老女人高潮大叫对白 | 伦理三区 | av在线试看 | 狠狠色噜噜狠狠狠狠7777米奇 | 久久国产精品福利一区二区三区 | 精品国产青草久久久久福利 | 55夜色66夜色国产精品视频 |