LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

MQTT in LabWindows CVI

Solved!
Go to solution

hi everyone, i'm trying to do a MQTT client in LabWindows and found somethings on internet like paho project, the prebuild bynaries can be downloaded from this page Eclipse Paho Downloads

 

i've tryed to import the code in CVI and worked correctly, attached the project that works, but i have to build my application in 64 bit and no 32 bit because the .lib and .dll where compiled in 64 bit i suppose.

 

this give me a problem because in my software i use the SQL Toolkit with this provider "Microsoft.Jet.OLEDB.4.0" that works only in 32 bit, i've tryed to use the "Microsoft.ACE.OLEDB.12.0" without success because give me the error in picture 

 

Errore.png

 

do you have any idea about how i can get this works? i have already tryed to install this Microsoft Access Database Engine 2010 Redistributable but the x64 tells me that i already have the x86 installed and can't install another one.

 

in my target PC i have installed the x64 and my software doesn't work for the same problem.

 

i have thinked to try this way Calling a DLL in LabWindows™/CVI™: Explicit Linking vs. Implicit Linking (Dynamic vs. Static) call the .dll explicit and not implicit, can be a good way?

 

 

Davide Vittorio G. - TLGB S.R.L.
Italian SW Developer
0 Kudos
Message 1 of 11
(4,730 Views)

also with external linking to dll work only in 64 bit application, attached my test... i'm thinking to do it with 2 separated application and pass variable with the network shared variable library, i don't like it because i prefer to have an all in one source code and don't use the NSV.

maybe you know some other trick

Davide Vittorio G. - TLGB S.R.L.
Italian SW Developer
0 Kudos
Message 2 of 11
(4,718 Views)

The type of linking doesn't matter! An application can only load DLLs that have the same bitness than the application itself. This is by design from Microsoft, who likely tried to avoid the whole disaster of code thunking when going from 16 bit to 32 bit. It may have looked like a good idea back then, but was an immense effort which still had many problems and troubles, for something that got obsolete within a few years.

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 11
(4,697 Views)

next step will be testing mosquitto that seems to have a 32 bit dll. i will update this thread when i will do this work

 

Davide Vittorio G. - TLGB S.R.L.
Italian SW Developer
0 Kudos
Message 4 of 11
(4,663 Views)
Solution
Accepted by topic author holly7787

good news, paho release a 32 bit dll that work in CVI with IMPLICIT linking.

i think this thread can be closed

Davide Vittorio G. - TLGB S.R.L.
Italian SW Developer
0 Kudos
Message 5 of 11
(4,603 Views)

Hi,I have the same problem as you had. I have now implemented the paho Libraries Implicit in my CVI project. Unfortunately, it still doesn't work. Could you possibly send me your example project?

0 Kudos
Message 6 of 11
(2,981 Views)

This is my command line example program, after i've developed also a software with GUI but it's our company knowledge and i cannot give outside

Davide Vittorio G. - TLGB S.R.L.
Italian SW Developer
0 Kudos
Message 7 of 11
(2,962 Views)
Thank you for the example program. It helps me a lot as I can see why my application isn't working. I'll be happy to reply as soon as I've fixed my problem.

 

0 Kudos
Message 8 of 11
(2,948 Views)

thank you also by me.

I'm trying to read, on remote by internet, my photovoltaic system (totalVBatt, TotalCurrent,and singleCellVolt), using an ESP8266 (SonOff TH16). And i would like to use labwindowsCvi to build my GUI. Your example is very usefull for me.

Do you think is enought to use this server "tcp://test.mosquitto.org:1883" for my purpose ? (more or less 20 data update each 5 second)

 

ManyThanks.

0 Kudos
Message 9 of 11
(1,400 Views)

Mosquito is a good option . i just performed a system that use MQTT By Mosquitto

0 Kudos
Message 10 of 11
(1,306 Views)