From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Keyboard or Mouse in LabView RealTime

Hi,
I would like to know whether keyboard or mouse can be used as input in LabView RealTime. If yes, can anyone explain me how to get the input coming from the keyboard or mouse?
 
Thanks
0 Kudos
Message 1 of 6
(3,006 Views)
Hi e_Rik,
 
Could you explain what you are trying to do a little further?  Currently the only real-time targets that can have a keyboard or mouse plugged into them is a PXI chassis or a desktop ETS system. 
 
The following links also touch on the subject as well.
 
I double checked and currently there are no keyboard or mouse VIs that work on real-time targets.  You may be able to get around this by finding a serial keyboard and mouse and using VISA calls.  Hope that helps clarify, and have a good day.
 
 
Brian K.
0 Kudos
Message 2 of 6
(2,994 Views)
Thanks for your reply Brian K.,

I am trying to use a mouse to track the position of an object on a table. Since the project requires the VI to be run in RealTime target, I can not use the standard mouse VIs that run in Windows.

For your information, I am using 6221M NI card that run in realtime computer and planning to use wireless USB mouse if possible.

Could you explain briefly how serial mouse and VISA calls can be used in realtime platform? Should I connect the serial mouse to the card or directly to the motherboard PS/2 plug in the realtime target computer? Is there any way of communication between motherboard and the card in realtime computer?

Erik

0 Kudos
Message 3 of 6
(2,989 Views)
Hi Erik1000,
 
First off if you would like some more information about VISA the following two links are the best place to start off.
I this is your first time using serial in LabVIEW, I would first practice with some non-Realtime examples such as Basic Serial Write and Read.vi.  After you know more about the non-realtime VISA calls the realtime will seem more familiar.
 
You serial mouse would go into the serial port of your real-time target.  Your real-time target will need the VISA drivers to be installed to be able to see the COM port.  Just for more background information what is the real-time target that you plan to deploy to? 
 
Also what do you mean by "I am trying to use a mouse to track the position of an object on a table."  Are you having something move across a table and you want follow it with your mouse?
Brian K.
0 Kudos
Message 4 of 6
(2,970 Views)
Hi,
Thanks for the answers.
The mouse will be attached to an object that moves on table (2D) and its position will be calculated using the data (x and y) obtained from the mouse.

How about using USB mouse in RealTime?

Erik


0 Kudos
Message 5 of 6
(2,963 Views)

Here is a link to a knowledge base that sicusses real-time USB FAQs.

http://digital.ni.com/public.nsf/websearch/3AA2D358C7A40848862571D3006CBDE4?OpenDocument

It states "USB storage devices such as thumb drivers and external USB hard drives are supported for real-time targets with onboard USB hardware".  So currently there is no support for USB mice in real-time targets. 

I understand that since the mouse is being used more as a sensor rather than human interface, determinism might be needed.  Are you able to poll your mouse or is it interupt driven?  If you are able to poll the device then you could use a USB to serial converter and the mouse would act like any serial sensor. 

Brian K.
0 Kudos
Message 6 of 6
(2,955 Views)