亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? module1.vb

?? 進(jìn)行數(shù)據(jù)的通信
?? VB
字號:
'  This sample application is comprised of three basic parts:
'
'  1. Initialization
'  2. Main Body
'  3. Cleanup
'
'  The Initialization portion consists of initializing the bus and the
'  GPIB interface board so that the GPIB board is Controller-In-Charge
'  (CIC). Next it finds all the listeners and then clears all the
'  devices on the bus.
'
'  In the Main Body, this application queries a device for its
'  identification code by issuing the '*IDN?' command. Many
'  instruments respond to this command with an identification string.
'  Note, 488.2 compliant devices are required to respond to this
'  command.
'
'  The last step, Cleanup, takes the board offline.

Imports NationalInstruments.NI4882  'must be included to reference the LangInt assembly
Imports VB = Microsoft.VisualBasic  'included for string manipulation
Module Module1
    Const BDINDEX = 0                   ' Board Index
    Dim li As LangInt                   'declare li of type LangInt that has all GPIB functions
    Dim c As GpibConstants              'declare c of type GpibConstants that has all GPIB constants

    Sub Main()
        Dim k As Integer                'loop counter
        Dim num_listeners As Integer    'number of listeners on GPIB bus
        Dim DisplayStr As String
        Dim ReadBuffer As String         'contains the string returned from instrument
        Dim ARRAYSIZE = 100             ' size of ReadBuffer
        Dim result(30) As Short
        Dim instruments(31) As Short    ' array of primary addresses
        li = New LangInt()                  'declare an instance of li
        c = New GpibConstants()             'declare an instance of c

        '  ====================================================================
        '
        '  INITIALIZATION SECTION
        '
        ' ====================================================================

        '  Your board needs to be the Controller-In-Charge in order to find all
        '  listeners on the GPIB.  To accomplish this, the subroutine SendIFC
        '  is called.  If the error bit EERR is set in ibsta, call GPIBCleanup with
        '  an error message.

        li.SendIFC(BDINDEX)
        If (li.ibsta And c.ERR) Then Call GPIBCleanup("Error sending IFC.")

        '  Create an array containing all valid GPIB primary addresses, except
        '  for the primary address 0. Your GPIB interface board is at address 0
        '  by default.  This array (instruments) will be given to the subroutine
        '  FindLstn to find all listeners.  The constant NOADDR signifies the end
        '  of the array.

        For k = 0 To 29
            instruments(k) = k + 1
        Next k
        instruments(30) = c.NOADDR

        '  Print message to tell user that the program is searching for all active
        '  listeners.  Find all of the listeners on the bus.  Store the listen
        '  addresses in the array result.  If the error bit ERR is set in ibsta,
        '  call GPIBCleanup with an error message.

        Console.WriteLine("Finding all listeners on the bus...")
        li.FindLstn(BDINDEX, instruments, result, 31)
        If (li.ibsta And c.ERR) Then Call GPIBCleanup("Error finding all listeners.")

        '  ibcntl contains the actual number of addresses stored in the result
        '  array. Assign the value of ibcntl to the variable num_listeners.
        '  Print the number of listeners found.

        num_listeners = li.ibcntl

        DisplayStr = "Number of instruments found = " + Str$(num_listeners)
        Console.WriteLine(DisplayStr)

        '  Print a blank line.

        Console.WriteLine("")

        '  The result array contains the addresses of all listening devices
        '  found by FindLstn. Use the constant NOADDR
        '  to signify the end of the array.

        result(num_listeners) = c.NOADDR

        '  DevClearList will send the GPIB Selected Device Clear (SDC) command
        '  message to all the devices on the bus. If the error bit EERR is set in
        '  ibsta, call GPIBCleanup with an error message.

        li.DevClearList(BDINDEX, result)
        If (li.ibsta And c.ERR) Then Call GPIBCleanup("Error in clearing the devices. ")


        '  ====================================================================
        '
        '  MAIN BODY SECTION
        '
        '  In this application, the Main Body communicates with the instruments
        '  by writing a command to them and reading each response. This would be
        '  the right place to put other instrument communication.
        '
        ' ====================================================================

        '  Send the identification query to each listen address in the result
        '  array using SendList.  The constant NLend
        '  instructs the function SendList to append a linefeed character with
        '  EOI asserted to the end of the message.  If the error bit EERR is
        '  set in ibsta, call GPIBCleanup with an error message.

        li.SendList(BDINDEX, result, "*IDN?", 5, c.NLend)
        If (li.ibsta And c.ERR) Then Call GPIBCleanup("Error sending '*IDN?'. ")

        '  Read each device's identification code, one at a time.
        '
        '  Establish a FOR loop to read each one of the devices identification
        '  codes. The variable LOOP will serve as a counter for the FOR loop
        '  and as the index to the array RESULT.

        For k = 0 To (num_listeners - 1)

            '  Read the name identification response returned from each
            '  device. Store the response in the string ReadBuffer.  The
            '  constant STOPend instructs the
            '  function Receive to terminate the read when END is detected.
            '  If the error bit ERR is set in ibsta, call GPIBCleanup with an
            '  error message.

            'ReadBuffer = Space$(&H32)
            li.Receive(BDINDEX, result(k), ReadBuffer, ARRAYSIZE, c.STOPend)
            If (li.ibsta And c.ERR) Then Call GPIBCleanup("Error in receiving response to '*IDN?'.")


            '  The device returns a Line Feed character with the
            '  identification string. You could use the LEFT() function
            '  which returns a specified number of characters from the left
            '  side of a string to remove the Line Feed character. The code
            '  fragment below illustrates how to use the LEFT() function
            '  along with the GPIB global count variable, IBCNTL, to display
            '  the contents of ReadBuffer.
            '  Note, that you need one less character than the total number
            '  contained in IBCNTL.

            DisplayStr = Left$(ReadBuffer, li.ibcntl - 1)

            '   Display the list of readings.

            Console.WriteLine(DisplayStr)

        Next k         '  End of FOR loop

        ' ========================================================================
        '
        ' CLEANUP SECTION
        '
        ' ========================================================================

        '   Take the board offline

        li.ilonl(BDINDEX, 0)
        If (li.ibsta And c.ERR) Then Call GPIBCleanup("Error putting board offline.")


    End Sub
    Private Sub GPIBCleanup(ByRef msg As String)
        Dim ErrorMnemonic() As String = {"EDVR", "ECIC", "ENOL", "EADR", "EARG", "ESAC", "EABO", "ENEB", "EDMA", "", "EOIP", "ECAP", "EFSO", "", "EBUS", "ESTB", "ESRQ", "", "", "", "ETAB"}

        ' After each GPIB call, the application checks whether the call
        ' succeeded. If an NI-488.2 call fails, the GPIB driver sets the
        ' corresponding bit in the global status variable. If the call
        ' failed, this procedure prints an error message, takes the device
        ' offline and exits.
        MsgBox(msg & Chr(13) & "ibsta: 0x" & Hex(li.ibsta) & Chr(13) & "ERR: " & li.iberr & " <" & ErrorMnemonic(li.iberr) & ">", MsgBoxStyle.Critical, "Error")
        li.ibonl(BDINDEX, 0)                      'close BDINDEX
        End                                 'end program
    End Sub

End Module

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
综合激情成人伊人| 美腿丝袜亚洲三区| 另类小说图片综合网| 成人av在线网| 久久视频一区二区| 国产盗摄女厕一区二区三区| 日本道精品一区二区三区| 26uuu欧美| 亚洲国产成人av网| 99久久精品国产导航| 精品福利在线导航| 亚洲h在线观看| 日本韩国欧美在线| 国产午夜精品一区二区三区视频| 三级在线观看一区二区 | 欧美三级电影一区| 国产精品免费网站在线观看| 六月婷婷色综合| 欧美精品v国产精品v日韩精品 | 一区二区三区电影在线播| 免费成人在线视频观看| 欧美美女直播网站| 一区二区三区国产豹纹内裤在线| 国产a精品视频| 欧美精品一区二区三区四区| 免费在线观看视频一区| 欧美福利视频导航| 视频一区国产视频| 欧美日韩国产一级二级| 夜夜操天天操亚洲| 欧美亚洲国产怡红院影院| 亚洲免费在线看| 成人动漫在线一区| 亚洲麻豆国产自偷在线| 91蜜桃在线观看| 亚洲蜜臀av乱码久久精品| 在线视频欧美精品| 一二三四社区欧美黄| 国产清纯白嫩初高生在线观看91| 精品在线视频一区| 久久久久久免费网| 国产成人免费视| 国产精品网曝门| 色偷偷成人一区二区三区91| 玉米视频成人免费看| 欧美日韩中字一区| 日本三级亚洲精品| 2欧美一区二区三区在线观看视频| 国产剧情一区在线| 中文字幕亚洲在| 欧美色窝79yyyycom| 久久精品理论片| 国产午夜亚洲精品羞羞网站| 99久久婷婷国产综合精品电影 | 国产欧美一区二区三区在线老狼| 风间由美一区二区av101 | 亚洲国产成人私人影院tom| www.亚洲色图.com| 午夜电影网一区| 欧美精品一区二区久久久| 成人免费视频视频| 亚洲国产精品久久人人爱蜜臀 | 一区二区三区小说| 日韩视频123| 99亚偷拍自图区亚洲| 视频一区在线播放| 国产精品久久免费看| 777奇米四色成人影色区| 国产高清在线精品| 手机精品视频在线观看| 日本一区二区三区视频视频| 欧美三级电影一区| 9人人澡人人爽人人精品| 日本美女一区二区三区视频| 激情久久五月天| 亚洲视频一区二区在线| 日韩一级成人av| 色8久久精品久久久久久蜜| 国产一区三区三区| 日韩中文字幕亚洲一区二区va在线 | 久久综合九色综合欧美98| 色国产精品一区在线观看| 国产精品资源网站| 日韩av在线发布| 亚洲欧美另类久久久精品 | 国产又黄又大久久| 天堂精品中文字幕在线| 中文字幕亚洲区| 亚洲精品在线网站| 欧美乱妇一区二区三区不卡视频| 9色porny自拍视频一区二区| 国产一区二区91| 日本午夜精品一区二区三区电影| 一区二区三区四区av| 国产精品欧美久久久久一区二区| 日韩精品中文字幕在线不卡尤物 | 精品国产一区二区国模嫣然| 欧美色图天堂网| 色综合天天综合色综合av| 欧美三级电影在线看| 菠萝蜜视频在线观看一区| 国产一区二区导航在线播放| 日本强好片久久久久久aaa| 一区二区三区小说| 亚洲精品第一国产综合野| 中文字幕日韩一区二区| 国产精品福利一区二区| 中文字幕欧美国产| 国产精品天美传媒| 亚洲国产精品成人综合| 国产偷国产偷精品高清尤物| 亚洲va欧美va国产va天堂影院| 亚洲美女视频在线观看| 1024亚洲合集| 亚洲人成小说网站色在线| 亚洲欧美成aⅴ人在线观看| 中文字幕制服丝袜成人av| 亚洲欧洲精品一区二区三区| 最新日韩av在线| 一区二区三区美女| 亚洲福利视频三区| 日本欧美加勒比视频| 九一久久久久久| 粉嫩蜜臀av国产精品网站| 成人av在线电影| 在线亚洲欧美专区二区| 欧美日韩免费不卡视频一区二区三区| 欧美视频一二三区| 精品欧美黑人一区二区三区| 久久女同互慰一区二区三区| 中文字幕乱码久久午夜不卡| 亚洲欧美偷拍三级| 视频一区二区欧美| 黄色日韩网站视频| 91视频免费观看| 欧美高清激情brazzers| 久久先锋影音av鲁色资源网| 国产精品超碰97尤物18| 一区二区高清视频在线观看| 日韩国产高清影视| 国产精品亚洲午夜一区二区三区 | 国产成人av一区| 日本丰满少妇一区二区三区| 在线不卡中文字幕| 日本一区二区三区视频视频| 亚洲一区二区视频在线观看| 久久国产尿小便嘘嘘| av在线不卡观看免费观看| 欧美日本在线一区| 国产欧美一区视频| 日韩精品免费专区| 成人一区二区三区| 777久久久精品| 国产精品久线在线观看| 琪琪一区二区三区| 97精品久久久午夜一区二区三区 | 麻豆精品久久精品色综合| 成人丝袜18视频在线观看| 91精品在线免费| 1024成人网| 国产制服丝袜一区| 欧美三级一区二区| 国产精品理论在线观看| 久久爱www久久做| 欧美三区免费完整视频在线观看| 久久久久久亚洲综合影院红桃| 亚洲无线码一区二区三区| 成人h动漫精品| 亚洲欧美aⅴ...| 成人免费毛片aaaaa**| 91精品国产乱| 一级中文字幕一区二区| 成人国产精品免费网站| 日韩欧美专区在线| 午夜视频一区二区三区| 91美女片黄在线观看| 欧美激情一区二区三区蜜桃视频| 久久疯狂做爰流白浆xx| 欧美精三区欧美精三区| 一区二区在线看| 99在线热播精品免费| 国产精品丝袜黑色高跟| 国产精品中文字幕一区二区三区| 欧美一区二区三区视频在线 | 欧美在线观看18| 亚洲欧美影音先锋| 成人午夜在线播放| 国产女主播一区| 国产成人免费网站| 国产三级一区二区三区| 韩国精品在线观看| 26uuu亚洲综合色| 国产九色精品成人porny| 精品久久久久久久一区二区蜜臀| 免费成人美女在线观看.| 91精品蜜臀在线一区尤物| 日韩av电影免费观看高清完整版在线观看| 欧美视频中文一区二区三区在线观看| 亚洲人成网站色在线观看| 色婷婷综合久久久|