LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

callbacks

Tried the search on how to use callbacks and it didn't help much.

Does anyone know how can I use callbacks in LV? I have a C DLL which takes ptr to callback function. How do I call it from LV.
0 Kudos
Message 1 of 3
(3,004 Views)
LabVIEW doesn't support callback.

You've to create your own dll or cin to use the callback
function.
George Zou
Message 2 of 3
(3,004 Views)
> Does anyone know how can I use callbacks in LV? I have a C DLL which
> takes ptr to callback function. How do I call it from LV.

To expand on the other post, LV doesn't normally use C calling
conventions, so it can't simply hand back a C function ptr for use as a
callback. If you have the App Builder, so that you can build a DLL from
VIs, then the entrypoints of the DLL are C style and could be used for
callbacks. Another way of doing this, if you have a development
environment that can build a DLL, would be to make a single generic C
function that matches the signature that your callback requires. Use
the VI Server to invoke LV VIs from the DLL callback. You could also
arrange for the VIs to be running waiting for a semaphore, notifier, or

other synchronization primitive, and have your DLL signal for the VI to run.

Greg McKaskle
Message 3 of 3
(3,004 Views)