Asynchronous DLL access in LabVIEW? -
I have a LabVIEW application, which currently sends data to a C + + application through a DLL Now I Need to send data back to a LabVIEW app from C ++. Is I able to trigger the code in LabVIEW with a DLL call or from time to time DLL needs to see if the new data is waiting ?
Am I going completely wrong about this? It is possible to create an event from C ++ to trigger a normal LabVIEW event.
#include #include "EventDLL.h" // Generate a LabVIEW event int GenerateLVEvent (LVUserEventRef * msg, int param) {PostLVUserEvent (* msg, (Zero *) and Ultimate); Return 0; }
And here the original source code is given as a PNG:
And here is the LabView code:
The following Loop LabVIEW The code is a LabUVE event handler to the DLL event. It should be kept inside your DLL. One of the input parameters should be in the form of U32 as the event pointer.
Good luck,
Ton
If you are going to dive into DLLs and LabVIEW, take note of everything in the interoperability, rollfac, in that area Is a guru
Comments
Post a Comment