04-05-2016 11:16 PM
I have three separate VIs (attached along with).The functionality of each vi is as follows:-
DOTNET Desktop Movie.llb:-This vi is used for screen capture at a specified frame rate.On execution,a .avi file is created
data acq.vi:-This will aquire some physiological signals and store it in a .lvm file
Mouse-click:-This will record each mouse click along with the time of click on the screen.
All the VIs are working fine individually but when I combine all three into one VI(all 3 put inside one while loop),the Mouse-click VI randomly misses out on some mouse clicks.
Can anyone tell me what is the error?
04-05-2016 11:20 PM
The integrated VI which is showing the error is attached along with.
04-06-2016 04:52 AM
Since you are polling the mouse, any delays in the loop will open up the possibility of missing clicks. And the screen capture has delays in it. I assume the data acquisition is also introducing some delays.
The simple solution is to just have each VI be in their own loop. This way they run independently from everybody else.
You should also look into using an Event Structure to capture the mouse clicks. It will be a lot more efficient and does not poll the mouse, using up lots of CPU.
04-06-2016 05:45 AM
If each VI is put in separate loop,then I will have to stop the execution of each separately.I want the execution of all VI to stop simultaneously once I press a STOP button.
04-06-2016 06:01 AM
Hi,
If your are goin to run parallel loops then you can stop it with the help of following method
http://digital.ni.com/public.nsf/allkb/267704CDE91156D186256F6D00711AAE
go throgh the link to stop parallel while loops with single click...
hope this helps
Kudos Are Welcome 😄