Jump to content

Two Axis Joystick...


Recommended Posts

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

Link to comment
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...

Link to comment

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 :P ) 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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.