Electronic Engineer Discuss

View: 3110|Reply: 0
Print Prev. thread Next thread

6254EU can not read the data

[Copy link]

2

Threads

4

Posts

4

Credits

新手上路

Rank: 1

Credits
4
Jump to specified page
1#
Post time 2022-7-6 18:12:38 | Show the author posts only Reply Awards |Descending |Read mode
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


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-4-20 14:28 GMT+8 , Processed in 0.154205 second(s), 20 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

Quick Reply To Top Return to the list