关闭

关闭

关闭

封号提示

内容

首页 使用Matla实现泰克示波器的硬拷贝功能

使用Matla实现泰克示波器的硬拷贝功能.doc

使用Matla实现泰克示波器的硬拷贝功能

那些该死的温柔
2017-09-20 0人阅读 0 0 0 暂无简介 举报

简介:本文档为《使用Matla实现泰克示波器的硬拷贝功能doc》,可适用于IT/计算机领域

使用Matla实现泰克示波器的硬拷贝功能使用Matlab实现泰克示波器的硬拷贝功能DemonstrateshowtoreceiveadatainPNGformatfromaTDSseriesoscilloscopeusingRSandwriteittoafileTDSMATLABICTGetScreenGetacopyofthescreeninPNGformatvariablesserialport='com'buffer=*targetpath='c:'targetname='tdsscreenpng'lf=ASCIIlinefeed,usedtoterminatecommandsinstrumentcommunicationtds=serial(serialport,'InputBufferSize',buffer,'OutputBufferSize',buffer)fopen(tds)Becausenohandshakingtakesplace(),RequestToSendmustbesetmanuallyafteropeningTheinstrumentwillnotreplyotherwiseset(tds,'RequestToSend','on')configureinstrumentforscreencapturefwrite(tds,':hardc:formpnginksportrs'lf)initializedatavariablebinary=uint('')begindatatransferfwrite(tds,':hardcstar'lf)pause()readloopwhileget(tds,'BytesAvailable')>,a=get(tds,'BytesAvailable')binary=binaryfread(tds,a)pause()endcloseconnectionwithinstrumentfclose(tds)delete(tds)cleartdssaveimagedatatofilecreate(oroverwrite)filemyfile=fopen(targetpathtargetname,'w')writetofilefwrite(myfile,binary)closefilefclose(myfile)notes{Variable"binary"isofdynamicsizebecausetheimagedatatransferbeginswithoutanymetadataofthesizeMATLABcomplainsaboutdynamicvariablesbutthereisn'treallymuchyoucandoaboutitIt'ssmallenoughthatIdonotnoticeanyperformancedegradationVariable"buffer"canalsobeincreasedtoaccommodateimagedatawithinonereadaswell}

用户评价(0)

关闭

新课改视野下建构高中语文教学实验成果报告(32KB)

抱歉,积分不足下载失败,请稍后再试!

提示

试读已结束,如需要继续阅读或者下载,敬请购买!

评分:

/3

意见
反馈

立即扫码关注

爱问共享资料微信公众号

返回
顶部

举报
资料