LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

coordinate control using mouse pointer

Hi, I have a written a simple program to control 2 +-10v analogue outputs proportionally by moving a mouse pointer around the screen, the idea of this is to control 2 hydraulic servo valves which drive a hydraulic cylinder each with LVDT feedback, these  in-turn are fitted to an arm which follows the mouse movement in 2 axis x and y. The problem I have is that i'm not sure how to set the xy axis in the centre of the screen so if I move to the left the output is minus or if I move downward, at the moment it just goes 0 to 10v (after being scaled) from top to bottom and the same from left to right,  just to say this unit is only in the design stage. Also, I was looking at using a touch screen panel PC what would be the best interface to use for the +-10v outputs and 0-10v inputs plus some descrete i/o PCI express? This is a demo unit so space is a premium. Thanks for any help.
0 Kudos
Message 1 of 2
(2,622 Views)
Using the mouse position directly is only half the solution. You need to know a starting point so you have a delta. It almost sounds like you're looking to use a joystick control. You could always connect a joystick, and use the Input Device VIs to read the joystick position. If you don't want a hardware joystick then you can create a virtual joystick. A picture control would be my suggestion to implement this. An example can be found over at LAVA, which you can modify to suit your needs.
Message Edited by smercurio_fc on 11-01-2008 10:49 AM
Message 2 of 2
(2,610 Views)