07-11-2017 04:49 AM
Target Client - LabVIEW 2014
Hi,
I have created a DLL of TAP() in C#. I wish to consume my async functions in LabVIEW, is it possible? If yes how?
My function looks like :-
Snippet
public async Task<bool> AttachCOMPortAsync(string portName)
{
// Do something
}
Solved! Go to Solution.
07-11-2017 02:56 PM
I assume you've at least tried it. What I can tell you is:
07-17-2017 04:35 AM
@tyk007
Thanks for the reply.
I did try out before posting this question to forum. Also that was my day 1 with LabVIEW so I myself wasn't aware of many things. So for the reasons you have mentioned I believe that Task<T> types with async won't work (However from the link you posted I don't think limitation of LabVIEW 2014 specifically are pronounced evidently).
So I wrapped them as synchronised functions with AsyncContext.Run and that seems to do the job though. Later I went on to use Events in my C# library and used Event callback (basically raised event in dll whenever async task was finished) in LabVIEW and that too worked.