ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Guide in hardware control

I am trying to learn basic hardware control with LabView. I want to control logical mouse PS/2 powered on and off individually.

I have a PC and Labview. Can I connect it directly to a USB port? I think I read where you can send a stream of 1's to a serial port to provide a constant voltage (like turning it on and off). what other hardware will I need (Except DAQ)?
 
Mathan
Message 1 of 3
(3,823 Views)

Don't understand what you are tyring to do. You can't control the power of a USB port, so your USB mouse is always going to be powered.

You mention a serial port. That's not the same thing at all as a USB port. If you have a serial mouse, you can connect that to a serial port. A regular mouse cannot be connected to a serial port because the logic levels are wrong. If you wanted to experiment, I suppose you could try connecting a mouse to a parallel port and try that. There's a shipping example with LabVIEW that shows one way to control the parallel port.

Message 2 of 3
(3,813 Views)

Hi Mathan,

To find the examples that Dennis mentioned, open LabVIEW and navigate to Help >> Find Examples.  Then search for "parallel", and you will find two examples: Parallel Port Read and Write Loop.vi and Parallel Port Additional Data Register Inputs.vi.  Also, in the Connectivity >> Input Device Control function palette, you will find some functions to control a mouse.

Regards,

Rima

Rima H.
Web Product Manager
Message 3 of 3
(3,771 Views)