Hello All,
I'm having tough time working with my Myo armband from labview.
I started with importing the myo's source dll functions, however it was too difficult to work with labview.
Next I decided to create a C++ dll project in Visual studio and to call the function from LV.
the functions by themselfs work fine as a win32 applicatiion console and the labview linker dll works for simple function and operations.
However, when starting to work with the myo libraries in the dll, the VI gets stucked and doesn't allows to stop the function in labview.
I attach part of the function that I tried to run when the myo::Hub doesn't executes in LV and casues the problem.
#include "extcode.h" #include <array> #include <iostream> #include <sstream> #include <stdexcept> #include <string> #include <myo/myo.hpp> extern "C" {_declspec(dllexport) void testDAQ(int32_t state, int32_t *data) { if(state == 1) { *data = 1; } else { *data = 0; } std::cout << "performed test" << std::endl; myo::Hub hub("com.example.emg-data-sample"); myo::Myo* myo = hub.waitForMyo(10000); }}
Again, these lines worked well in a win32 console app, does someone had a similar problem working with other instruments?
By the way, I am far from being a C++ expert so any comments on the programming methods are welcome.
Thanks
Noam