Electronic Engineer Discuss

Title: 6254EU can not read the data [Print this page]

Author: wsy892675781    Time: 2022-7-6 18:12
Title: 6254EU can not read the data
memset(m_pDeviceStatus, 0, 128);
        //cout << "m_pDeviceStatus: " << (int)m_pDeviceStatus[0] << endl;
        WORD state=dsoHTGetState(m_nDeviceIndex, m_pDeviceStatus);
        //cout << "m_pDeviceStatus: " << (int)m_pDeviceStatus[0] << endl;
        //cout << "dsoHTGetState: " << state << endl;

        if (!(m_pDeviceStatus[0] & 2))
        //if (!(state & 2))
        {        cout << "数据不可读取" << endl;
                return false;
        }
        cout << "数据可读取" << endl;

this is the code,the value of m_pDeviceStatus[0] =56,so m_pDeviceStatus[0] & 2 is zero,how does it happen,and how can i read data.

the code is from VCDEMO







Welcome to Electronic Engineer Discuss (https://www.eediscuss.com/) Powered by Discuz! X3.2