新聞中心

        EEPW首頁 > 測試測量 > 設計應用 > 示波器遠程控制方法在瑞薩集成開發環境CubeSuite+中的應用

        示波器遠程控制方法在瑞薩集成開發環境CubeSuite+中的應用

        作者:張娜 王志東 許柯萍 時間:2014-10-28 來源:電子產品世界 收藏
        編者按:  摘要:在瑞薩單片機集成開發環境CubeSuite+下,使用IronPython語言在Python Console平臺中控制橫河DL9000系列示波器的參數設置,并接收測試波形,從而簡化單片機功能驗證操作,為單片機功能驗證的自動化實施提供了保證。   前言   在單片機功能驗證過程中,需要利用示波器采集驗證結果的波形,而示波器參數的設置一般是通過手動設置前端面板按鍵完成。功能驗證的結果需要手動保存到U盤中,由工程師再拷貝到電腦上。圖1為橫河DL9000系列示波器的前面板示意圖,從圖中可以看出,示波器

          #Add Class
          import clr
          clr.AddReferenceToFile("TmctlAPINet.dll")
          from TmctlAPINet import *
          #New Object
          h=TMCTL()
          ykosid =0
          #Initializes and opens a connection to the specified devices:DL9040 serial number=91FC36537
          ret=h.Initialize(h.TM_CTL_USBTMC,"91FC36537", ykosid)
          #Sets the terminator for sending or receiving a message to LF
          ret=h.SetTerm(ykosid,2,1)
          #sets the timeout time for communications.
          ret=h.SetTimeout(ykosid,100)
          #Sets remote on
          ret=h.Send(ykosid, "COMMUNICATE:REMOTE ON")
          #Sets the display format
          ret=h.Send(ykosid,"DISPLAY:FORMAT QUAD")
          #Sets the graticule
          ret=h.Send(ykosid, "DISPLAY:GRATICULE GRID")
          #Turns on the cursor
          ret=h.Send(ykosid,"CURSOR:DISPLAY 1")
          #Turns on the display of the channel
          ret=h.Send(ykosid," CHANNEL1: DISPLAY ON")
          #Sets the vertical position of the channel
          ret=h.Send(ykosid," CHANNEL4: POSITION -2")
          #Turns ON the waveform label display of the channel
          ret=h.Send(ykosid,"CHANNEL4:LABEL:MODE 1")
          #Sets the waveform label of channel
          ret=h.Send(ykosid,"CHANNEL4:LABEL:DEFINE 'TRDIOD0'")
          #Sets the vertical sensitivity (V/div) of the channel
          ret=h.Send(ykosid,"CHANNEL4:VDIV 2")
          #Sets the T/div value
          ret=h.Send(ykosid,"TIMEBASE:TDIV 1.000E-03")
          #Sets the file output image format
          ret=yktmc.Send(ykosid," HCOPY:FILE:FORMAT PNG")
          # Queries the screen image data
          ret=yktmc.Send(ykosid," IMAGe:SEND?")
          # Receives the header portion of the Block Data sent from the device, and
          # returns the number of bytes of the data after the header.
          ret,c=yktmc.ReceiveBlockHeader(ykosid, 0)
          temp=0
          ImageName1='d:/'+ImageName+'.png'
          output = open(ImageName1,'wb')
          for i in range(c+1) :
          # Receives the data portion of the Block Data sent from a device into an Short array.
          ret,temp,rlen,rend=yktmc.ReceiveBlockData(ykosid,temp,1,0,0)
          output.write(chr(temp))
          output.close()

        本文引用地址:http://www.104case.com/article/264533.htm

          3 結論

          的遠程自動配置和波形文件的上傳處理,簡化了操作和波形文件整理,降低因操作和整理波形產生的勞動負荷,有助于逐步實現功能驗證自動化。

          參考文獻:
          [1]Renesas IDE [R/OL].http://cn.renesas.com/products/tools/ide/ide_cubesuite_plus/index.jsp
          [2]IronPython in Action, Michael J. Foord, Christian Muirhead, Manning Publications Co.,2009
          [3]Yokogawa Releases New DL9000 Series of Compact Digital Oscilloscopes with GHz Bandwidth[R/OL].(2005-4-1).http://www.yokogawa.com/pr/Corporate/News/2005/pr-news-2005-09-en.htm
          [4]DL9040/DL9140/DL9240 Series Digital Oscilloscope User’s Manua.2009
          [5]DL9040/DL9140/DL9240 Series Digital Oscilloscope Communication Interface User’s Manual.Yokogawa Electric Corporation,2009


        上一頁 1 2 3 下一頁

        評論


        相關推薦

        技術專區

        關閉
        主站蜘蛛池模板: 鄱阳县| 新巴尔虎右旗| 峨眉山市| 巫溪县| 马鞍山市| 云龙县| 永泰县| 开封市| 治县。| 长宁县| 兴业县| 读书| 旅游| 三穗县| 崇左市| 百色市| 浦县| 峡江县| 浦东新区| 湟中县| 精河县| 防城港市| 广昌县| 固安县| 什邡市| 天祝| 宿州市| 色达县| 沈阳市| 日照市| 广元市| 海南省| 都江堰市| 叶城县| 洪泽县| 新郑市| 安远县| 凤城市| 新疆| 南京市| 绥芬河市|