Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/06/2018 in all areas

  1. I dont know if theres a guide, but generally writing a wrapper that is (trivially) labview compatible means: Determining thread safety of the underlying code (and trying to keep things thread safe if possible -- the alternative is that every DLL call needs to run in the UI thread) Only exposing simple return values (void, numeric, pointer) -- don't try to return a struct by value Only exposing simple parameter values (string, numeric, string array, numeric array, or pointer) -- trying to pass a struct by value can be done, but you'll have to think about byte alignment on different platforms. Trying to keep things synchronous if possible. Any callbacks have to be part of the wrapper. Labview exposes two message mechanisms which can be called from C, firing an occurrence and firing off a user event. If your underlying library uses a callback mechanism to notify clients that an operation has completed, you would write a callback inside of your wrapper which fires the occurrence or generates the user event when the operation is complete. Presumably then the labview code would either have the data (as part of the event) or call the DLL to grab the resultant data. The program files/ni/labview/cintools directory contains various headers you can use to access some of the innards of labview, including the above. There used to be a help page on ni.com but google can no longer find it. Included in the tools are also the definitions of labview arrays and labview strings, which could make manipulation of large data sets easier/more efficient.
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.