Author Topic: Joystick Control  (Read 6422 times)

Gerard Hebert

  • Guest
Joystick Control
« on: November 24, 2002, 04:43:00 PM »
Hi,

I'm looking for any programming information or example for using a T100MD1616+ to control stepper motors by providing input from a joystick. My preference would be to have the joystick connected to a computer but this may be too ambitious.

Thanks
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re: Joystick Control
« Reply #1 on: November 25, 2002, 06:47:38 AM »
You can connect the two potentiometer of a joystick to two 0-5V ADC channel in the T100MD+ PLC (ADC 3 and 4 for MD1616), then you can read the position of the joystick to decide how much to move the stepper motor. The value read from the ADC can be scaled into number of steps that the stepper is needed to move and you just have to use the STEPMOVE command to move the stepper by that amount. You can also use the joystick to implement absolute coordinates so the stepper move to where your joystick is.  The STEPMOVEABS command make moving to absolute coordinates a breeze. Since the ADCs are 10-bit resolution you have up to 1024x1024 = 1 million coordinates that you can move within ;D.
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS