日本特级淫片免费看-日本特级黄色-日本特级黄录像片-日本视频中文字幕-成年偏黄网站站免费-成年人福利

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


****
控件有很多






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

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

    wenluderen
    人人為我我為人人
    級別: 略有小成
    精華主題: 0
    發帖數量: 186 個
    工控威望: 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
    發帖數量: 186 個
    工控威望: 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
    發帖數量: 186 個
    工控威望: 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
    發帖數量: 186 個
    工控威望: 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



    主站蜘蛛池模板: 伊人久久狼人| 一区二区精品视频| www.毛片com| 最新亚洲情黄在线网站| 亚洲国产成人99精品激情在线| 四虎永久免费观看| 91大奶| 在线观看免费毛片| 欧美日韩国产亚洲一区二区| 亚洲三级毛片| 老司机在线视频网站| 黄污视频| 色视频在线观看免费| 日韩 欧美 亚洲 国产| 一区二区亚洲视频| 欧美伊人影院| 成人免费看片网站| 欧洲在线免费视频| 国产高清视频在线播放www色| 亚洲欧美性视频| 亚洲黄色在线网站| 久久久91精品国产一区二区三区| 美女黄视频网站| 大香交伊人| 欧美影院| 在线成人免费观看国产精品| 天天干天天干天天| 黄色美女免费| a级毛片在线观看| 午夜h片| 国产精品高清视亚洲一区二区| 图片区 日韩 欧美 亚洲| 影音先锋加勒比| 唐人社电亚洲一区二区三区| 国产精品久久免费观看| 成人一a毛片免费视频| 香蕉在线影院| 国产精品99久久久久久www| 欧美综合国产精品日韩一| 在线亚洲精品中文字幕美乳| 五月激情天|