Louis Manfredi Posted May 10, 2006 Report Share Posted May 10, 2006 Hi Folks: I'm working on a system using a two axis positioning table. Mostly the system runs automatically, scanning my test sensor in a raster pattern. But I need to add manual controls for setup, calibration & the like. It would be really handy to have a virtual joystick-- something that looks like a toggle switch, but when mouse-down on it can be dragged in both axes, providing x and y inputs to the diagram proportional to x & y position. If it optionally snapped back to center on mouse up that would be even better. Has anyone made anything like this, or can anyone suggest a suitable approximation? (If not, I'll have a go at it myself & keep you posted. Best Regards, Louis Quote Link to comment
Chris Davis Posted May 10, 2006 Report Share Posted May 10, 2006 Hi Folks:I'm working on a system using a two axis positioning table. Mostly the system runs automatically, scanning my test sensor in a raster pattern. But I need to add manual controls for setup, calibration & the like. It would be really handy to have a virtual joystick-- something that looks like a toggle switch, but when mouse-down on it can be dragged in both axes, providing x and y inputs to the diagram proportional to x & y position. If it optionally snapped back to center on mouse up that would be even better. Has anyone made anything like this, or can anyone suggest a suitable approximation? (If not, I'll have a go at it myself & keep you posted. Best Regards, Louis Why not use a real joystick? I've used LabView's joystick interface in the past, and it works like a champ. It would certainly save you a lot of time trying to reproduce it on screen, which I'm suspecting you will have to do with a picture control if you want proportional movement capabilities (i.e. if I move the mouse to the left a little, the device should move a little). With USB joystick in the ~$20-$30 at your local Wal-mart, it may be worth considering... Quote Link to comment
Bob Y. Posted May 10, 2006 Report Share Posted May 10, 2006 I would suggest a picture control. Have a dot in the middle, and let the user drag the dot out of the middle (or drag a separate dot) with the mouse. Reading in the mouse postion is a snap and drawing the dot is also easy. Hope that this helps. Bob Young Download File:post-1172-1147299809.vi 1 Quote Link to comment
Louis Manfredi Posted May 11, 2006 Author Report Share Posted May 11, 2006 Hi Chris: Thanks for the suggestion. Hardware joystick would definitely the way to go, I think, if the joystick function were a central part of the application-- but its only something I use every now & then for setup, and the poor little laptop already has cables sprouting out of all sides: A serial cable going to the motor controllers, an earphone cable going to an audio amp, an ethernet cable, an a/d card cable going to a terminal box, and the power supply. Space (and clutter control) are the final frontiers at this project, so the virtual joystick is the answer in this case. Hi Bob: Your example vi is just about exactly what I wanted & roughly the approach I would have taken to do it myself. (I'll change the colors and the size, and replace the one line with two to better simulate a tapered shank of a real joystick.) I had no idea it would be that easy however. (Especially since you did it for me ) I didn't know the picture control had built in mouse services-- thought I was going to have to deal with that on my own in the context of the entire window, which would have been a hassle. Geuss I should explore some of those bells & whistles which used to be extra charge add-in features which I couldn't afford way back when. (At one point Chris' suggestion of the hardware joystick would have been cheaper than the picture control tool kit.) Sincere thanks to both for good suggestions given quickly, :worship: Louis Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.