12-05-2010 05:51 AM
I used Labview to build a .Net assemlby that contains a VI. I can start the VI operation from my C# .Net application but I can't stop it.
For example, I start broadcasting a signal from a data file. The data file is 20min long. What should I do to stop the broadcasting manually before the VI operation has ended?
Solved! Go to Solution.
12-05-2010 10:29 AM
WIth such little information, I would be guessing. Is broadcasing stopping all other things from continuing? How about broadcastng smaller discreate sections of the data, and in between, check to see if an abort is requested.
A
12-05-2010 10:51 AM
Thank you for your answer, I understand the solution you suggest.
Broadcasing does stop all other things from continuing.
What I want to do is to run a Labview project that runs a long procedure from .Net application. I do not want to split the source action into small short actions.
The best solution for me is to run the Labview from one thread in the .Net application and to stop it from another thread (run the long procedure asynchronicly).
I can start the long procedure in another thread - that way my application does not get stuck, but I can't stop it before the procedure is complete (can I use events with lab view assembly?).
Thanks again!
12-05-2010 11:04 AM
Well, if you perhaps can expose an interface on the LV side that is a stop which would then set a variable somewhere that is checked before scanning descreate portions the data stream you can effectively have the same thing without breaking the stream up externally.
A
12-05-2010 11:16 AM
That would be great!
How do I expose such an interface from the LV?
At the moment all I can do is to expose one function per VI file - that function shold start or stop the VI according to the paramaters I pass from my .Net application.
When I call this function (with or without parameters) from one thread to start, I can't call it again from the same thread or from another thread. The VI wouldn't respond until it completes the procedure.
12-05-2010 11:23 AM
Right so create another VI. Have it write to a global variable that the other VI that you are trying to stop will read.
A