I have a main application vi that uses a vi server to call a separate vi to do digital input data acquisition on a PCI-1200. I would like the called vi not to interrupt the main vi execution. I used the example code from the developer exchange library (this.vi and that.vi) and set the property node parameter fp.open to true and the invoke node parameter to wait until done to false, but the main vi still gets interrupted. Are there any other properties or execution settings I have to set to insure that the data acquisition task doesn't interrupt the main application task?
One other potential problem may be that the main application task also does data acquisition on the PCI-1200 at a much lower da ta rate. Thanks in advance.
Hello Robert When you call a vi dynamically from other vi without wating for it to finish, those two vi are running simultanously. Of course if they share the same recourses one will wait for another, but that is another story. You can see if your vi is run properly by observing the dataflow after the dynamic vi is beeing executed.
The "Highlight execusion" will show you if the one vi is wating for another after is has been called.
If you find out that dataflow is not stopped on "run" node than you are sure it is something else which disturb those vis.
From now I can imagine it is the DAQ you are using.
Thanks, I will take a look to see how the execution is progressing in the main application task by using your suggestion.
One other thing I forgot to mention is that I am doing a buffered digital input in the vi outside the main application. What I am trying to do is to run a high resolution task for about 3 minutes every 24 hours to verify the operation of a mechanism. However, I am still taking digital data once every 25 seconds or so in the main application. Hopefully, this doesn't introduce a problem as well. I assume that the high resolution task will override any data measurements done in the same period, but shouldn't completely interrupt the main application execution. Should I setup the tasks with different priorities and/or set u p some sort of flag to prevent the low speed main application task from trying to access the PCI-1200 digital data acquisition?
I did what you suggested and to my surprise the main application stops at a call to an internal vi which does some digital output control using another I/O card, not the one doing the buffered digital input. Is there any way to allow the main application to continue without waiting for the outside vi to complete?
Yes, there is a special parameter called "Wait until done" in invoke node "Run Vi", which you must set to false. After that system will start and run vi, but it will continue execution of the main application. See enclosed file for an example.
Yes, I did this and the main application then continues until it reaches another subvi which does some digital output on another card. The main application then pauses at this subvi until the earlier triggered external vi completes. I was hoping that the later subvi would continue and not wait for the external vi to complete. Any ideas?
This is strange, because normally all NI cards can are multitasking, which measn that you can use one vi to e.g. transmit and second to acquire data. If your vi stops on some vi, please check if this vi is set as reentrant, or one of its sub vis.
Otherwise, it is complicated to say what is wrong, but it must be possible to do multitasking on one board.
When the vi is not a reentrant, it must be finished before the other vi can use it. When you se t is as reentrant you can have a several copies of the same vi in memeory. So the answer is yes, it must be set to reentrant.
Well it still doesn't work...have set the outside vi wait until done to false, have set the subvi's inside the main application to reentrant. I can't even run the high resolution measurement manually outside the main application running in the background. Once I start the vi, the main application pauses and doesn't start up until the outside vi is complete. Don't know if there are any other settings to check? Does any of this depend on the buffered digital input? There is some configuration and initialization of the DIO card prior to the actual measurement in the outside vi. Could this affect the main application running in the background?