Joystick applications can command motors to be run at a speed or position, proportional to the analog voltage of the joystick. This sample is for analog velocity.
Related FAQ: Analog position / Joystick program for Compax3
This sample program is for a programmable Compax3 T30 that uses a simple CoDeSys program.
I0 input energizes the motor and then homes
I1 enables the joystick (gears the motor speed to the joystick voltage)
Note! Signal Source in the drive configuration (.c3p) file is already set to +/-10v Master speed. Users can use this .zip file and modify the .c3p drive configuration for the Compax3 T30 for their specific power level and feedback type in the Device Selection. Then go through the I11T30 drive configuration and select the motor being used in the application and then modify per your application and click through to Finish and then download.
Scaling is set to 100M which is in user units. The sample .c3p file is in millimeters so a 1volt analog input commands 1volt / 10volt * 100 = 10mm/sec speed
This uses a CTI Electonics M2003 joystick. The program uses two of the joysticks inputs, one to energize, the other to enable the joystick. Any joystick or potentiometer could work but the CTI's is a well sealed for industrial applications.
In the Optimization screen, bottom left, Gain and Offset for the analog input 0 is in the Tuning tab (0.1 value is a 1volt offset, values can be negative). Users can monitor the actual analog input voltage by dragging and dropping the Analog Input0 voltage from under Inputs in the bottom right Status Values to the top right Status Dispaly.