ActiveX EDRE uDAQ from Eagle Technologies
-
Hi All
I'm trying to get my uDAQlite from Eagle technologies going.
I have installed the EDRE drivers and ActiveX components on my machine (win 7 pro)
I can see and add the ActiveX controls to my form. So I know QT can see the ActiveX control. I have not added to the form.
I have done the following
in my .pro```
QT += core gui
axcontainergreaterThan(QT_MAJOR_VERSION, 4): QT += widgets
LIBS += -LD:\Projects\Trewfit\AVP_TEST_BENCH\AVP_TEST_BENCH\Include
LIBS += -ledrapiINCLUDEPATH += $$PWD/../Include/
DEPENDPATH += $$PWD/../Include/TARGET = TestBench
TEMPLATE = appSOURCES += main.cpp
mainwindow.cpp
channeloutputsettings.cpp
channeloutput.cpp
udaq.cppHEADERS += mainwindow.h
channeloutputsettings.h
channeloutput.h
udaq.h
D:/Projects/Trewfit/AVP_TEST_BENCH/AVP_TEST_BENCH/Include/edrapi.h \D:/Projects/Trewfit/AVP_TEST_BENCH/AVP_TEST_BENCH/Include/errors.h \ D:/Projects/Trewfit/AVP_TEST_BENCH/AVP_TEST_BENCH/Include/query.h \ D:/Projects/Trewfit/AVP_TEST_BENCH/AVP_TEST_BENCH/build-TestBench2-Desktop_Qt_5_7_0_MinGW_32bit-Debug/ui_mainwindow.h
FORMS += mainwindow.ui
My class uDaq.c if have
uDAQ::uDAQ()
{
uDAQliteUTILS = new QAxWidget; //! \brief uDAQliteUTILS = {8AA34F85-95C9-11D3-8EB6-00C0DF2247CA}
uDAQliteAdX = new QAxWidget; //! \brief uDAQliteAdX = {450019E5-96C3-11D3-8EB6-00C0DF2247CA}
uDAQliteDaX = new QAxWidget; //! \brief uDAQliteDaX = {73E1B965-96BB-11D3-8EB6-00C0DF2247CA}uDAQliteUTILS->setControl("{8AA34F85-95C9-11D3-8EB6-00C0DF2247CA}"); uDAQliteAdX->setControl ("{450019E5-96C3-11D3-8EB6-00C0DF2247CA}"); uDAQliteDaX->setControl ("{73E1B965-96BB-11D3-8EB6-00C0DF2247CA}");
}
in my uDaq.h I have
class uDAQ
{
public:
QAxWidget* GetD2AOCX();
QAxWidget* GetA2DOCX();
QAxWidget* GetUtilsOCX();
static uDAQ* getInstance();
long getserial();private:
uDAQ();
static uDAQ* onlyInstance;
QAxWidget *uDAQliteUTILS;
QAxWidget *uDAQliteDaX;
QAxWidget *uDAQliteAdX;
long serialnumber;};
I'm trying to get the serial number of the device according to the documentation I can use this.
QVariant test;
test = uDAQliteUTILS->dynamicCall("EDRE_Query(int,int,int)",0,15,0);
but test is always invalid. What am I missing? Kind regards