cetee
级别: 略有小成
精华主题: 0
发帖数量: 73 个
工控威望: 218 点
下载积分: 10544 分
在线时间: 580(小时)
注册时间: 2010-08-05
最后登录: 2024-11-10
查看cetee的 主题 / 回贴
楼主  发表于: 2018-08-20 09:32
初学vb.net编程,请各位帮帮忙 vb.net报错

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim iRet As Integer
        Dim szDeviceName As String = "d0"         'List data for 'DeviceName'
        Dim iNumberOfDeviceName As Integer = 2  'Data for 'DeviceSize'
        Dim sharrBufferForDeviceValue() As Integer
        DotUtlType1.ActLogicalStationNumber = CInt(1)
        'The Open method is executed.
        iRet = DotUtlType1.Open()

        iRet = DotUtlType1.ReadDeviceBlock(szDeviceName,
                                                           iNumberOfDeviceName,
                                                                           sharrBufferForDeviceValue(0))


    End Sub
End Class