02-23-2009 05:16 AM
Hi,
I have written a programme to capture movements of the mouse (I will actually be using a touch screen). I have used Initialize Mouse in a while loop. I want to then analyse the movements in terms of speed acceleration etc. To do this I need to know the capture rate of Initialize Mouse. I can't find this information anywhere, and there seems to be no way to control it. I did write a short programme, capturing over a 1 sec period but the capture rate seemed ridiculosly high, can anyone help me with this.
Many thanks
02-26-2009 06:06 AM
Hi Kmut,
Good afternoon and I hope your well today.
Thanks for your post.
I have attached some code that allows you to acquire data from the mouse and a rate you choose - down to a few ms on a windows machine. I used the acquire input data.vi to acquire the axis info and button info from the mouse. Then using a queue you can do post-anylsis on the data without affecting your acquisation rate. This design is known as a producer.consumer design pattern.
In the consumer (anylsis) loop I have created a circular buffer to store the last 10 samples in this case. With this area of axis info you can perform some maths functions to work out what you wish.
I have attached the example in LabVIEW 8.6 - please let me know if your using a different version.
I hope this helps, and I'd be more than happy to discuss your application furhter - just post back!
02-26-2009 06:11 AM
Hi Kmut,
I also just wanted to check that your doing this on windows, the acquire data.vi and input vi you mentioned both are only support on windows. I am not sure what Real Time targets have a mouse input.. but please to clarify this for me if this is the case.
03-02-2009 07:41 AM
Hi Hillman,
Thanks for your help, unfortunately I am using LabVIEW 7.1 so couldn't open your attachment. Yes I am using windows to run this and I am capturing touch screen data.
Kind regards
Kmut
03-02-2009 02:50 PM
Hi Kmut,
Thanks for getting back to me. Sorry, I must have missed what version you were using.
Attached is a copy of the VI in LabVIEW 7.1.
Note: LabVIEW 8.6 VI was saved to labVIEW 8.0. Opened in labVIEW 8.0 and saved back to LabVIEW 7.1 - for anybodys reference.
Please let me know how the example finds you,
03-04-2009 08:59 AM
Hillman,
The program was very helpful, I can see were I was going wrong now. Thank-you so much for all your help!
Kmut
03-04-2009 09:50 AM
Hi kmut,
Thanks for the reply and I hope your well today.
Not a problem! Thanks for the question and I am glad its all working well for you.
Remember, the forum is a great resource - so please do post a new thread if you have anything you wish to discuss in the future.
Best wishes with your applications,
Kind Regards,
James.
03-07-2011 05:50 PM
Hello, this is actually a different problem, but it has to do with Initialize Mouse.vi
We are using both Labview 7.1 and 8.6.1. We use Labview 7.1 where we need to keep the runtime library as small as possible.
This is under Windows with an app built using the application builder. If a Microschip PICKit is plugged into a USB port, initialize mouse.vi crashes inside the vi, and brings up an application error, and the application closes.
Has anyone else had this problem. We have not been able to find a work around. Any help would be great.
Under labview 8.6.1 we don't see the problem.
Thanks - Bart
03-08-2011 09:20 AM
Hi BartSchroder,
I hope you are well and thank you for using the NI Forums! The post you have created is on a topic which has been inactive for quite a while. You may receive more success by creating a new forum post in a new thread summarising all the issues you are having.
Kind regards,