Please select To the mobile version | Continue to access the desktop computer version

Electronic Engineer Discuss

View: 8208|Reply: 0

示波器 dsoHTGetData 使用问题

[Copy link]

3

Threads

10

Posts

10

Credits

新手上路

Rank: 1

Credits
10
Post time 2016-10-17 13:22:04 | Show all posts |Read mode
dsoHTGetData(m_nDeviceIndex,pReadData[CH1],pReadData[CH2],pReadData[CH3],pReadData[CH4],&m_stControl);

1 程序执行dsoHTGetData函数正常。2 实测中(调试过程中),发现pReadData[CH1]中的数是一个8位>0的整数,显示出来非常大。


问题:
1,如果我要显示pReadData[CH1]通道中的数,是不是还要对该值进行一个校正?


2,DEMO中有这样一段注释:pReadData[CH1]每通道i第j个点的实际电压值=(pReadData[i][j]-m_nLeverPos[i])*8*电压值/255
是不是说,我在显示波形时,要用用公式pReadData[i][j]-m_nLeverPos[i])*8*电压值/255进行读数校正?公式中的电压值又应该取多少呢?是个常量还是什么别的变量?


3,DEMO中执行dsoHTGetData后,调用下面的函数对pReadData中的读数进行了校正,这个SourceToDisplay是什么意思?
void CHard::SourceToDisplay(USHORT* pData,ULONG nDataLen,USHORT nCH)
{
        for(ULONG i=0;i<nDataLen;i++)
        {
                *(m_pSrcData[nCH]+i) = *(pData+i)-(MAX_DATA - m_nLeverPos[nCH]);
        }
}




Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Dark room|Mobile|Archiver|Electronic Engineer Discuss

2024-3-29 17:41 GMT+8 , Processed in 0.175133 second(s), 21 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

Quick Reply To Top Return to the list