• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
CDP Studio logo

CDP Studio

The no-code and full-code software development tool for distributed control systems and HMI

  • Doc
  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Products
    • Automation Designer
    • HMI Designer
    • Maritime HMIs
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • Hardware - ForceFeedbackJoystick I/O
  • Force Feedback Joystick Setup Guide
  • 5.0.0

Hardware - ForceFeedbackJoystick I/O ForceFeedbackJoystick Configuration Manual

Force Feedback Joystick Setup Guide

Introduction

This guide demonstrates a system that uses a ForceFeedbackJoystick component to get joystick-movement information into an application in CDP Studio, the independent automation software for open PC-based real-time distributed control systems. This is implemented by setting up an Application with a ForceFeedbackJoystick component. When running the component, values are continously transfered from the physical joystick into the ForceFeedbackJoystick component.

Set up a Test-system

First we set up a System that the joystick component can be tested in:

Create a system named JoystickDemo with a Console application named JoystickDemoApp, then select Configure mode. See How to Create a system for more information.

Set Up ForceFeedbackJoystick in Application

  • Select the JoystickDemoApp that resides under JoystickDemo in the Project tree
  • In the Resource tree, expand the ForceFeedbackJoystick resource.
  • Double-click to add a ForceFeedbackJoystick to JoystickDemoApp

    Note: Resources are always added as children to the currently selected item in the Project tree.

  • Select the ForceFeedbackJoystick in the subcomponents table.
  • Rename the ForceFeedbackJoystick to Joystick.
  • If the application is running on Linux, select the Joystick component, and in the Properties table, set Device to '/dev/input/js0'

How to Run the Tutorial

To run the tutorial from CDP Studio, select Configure mode, right-click on the system project and select Run & Connect. See the Running and Connecting to the System tutorial for more information.

Verify That It Works

  • Navigate into JoystickDemoApp Joystick.
  • Double-click the Signals header to expand the Signals table.
  • Move the physical joystick and take note of which signals that change, and which minimum and maximum values they have.
  • If nothing happens when the physical joystick is moved, see Troubleshooting below.

Scale Signals

To make it simpler to treat the signals in generic code in other components, it might be helpful to scale the signals between -1 and 1, where -1 is defined as left/back, and 1 is defined as right/front. To add scaling points, go into each channel you noted above, and for each channel:

  • In the Resource tree search-box, enter 'sca' without the apostrophes.
  • From the operators that come up, double-click 'Scale<double>'.
  • In the Operator table, click on in front of Scale.
  • In the Resource tree, double-click to add a ScalingPoint<double>
  • In ScalingPoint, set InValue to the value you got when you moved the joystick all the way back or left, and set OutValue to '-1'.
  • Add another ScalingPoint<double> from the Resource tree by double-clicking ScalingPoint<double> in the Resource tree
  • In ScalingPoint1 that was added, set InValue to the value you got when you moved the joystick all the way front or right, and set OutValue to '1'.
  • Repeat these steps for other channels that need scaling.

Troubleshooting

The Application Output window contains messages from the application. Any 'Error' or 'Warning' messages found there indicate problems.

If the joystick is not working, this can typically be caused by:

  • No connection with joystick? Check connection with joystick, or batteries, if any.
  • No driver installed for the joystick on the target device? Install correct driver.
  • Linux: Wrong Device is specified. To list avaliable devices, log into the Linux device (f.i. using 'ssh' or 'putty') and type
    ls /dev/input/

    The above command will list all input devices available. Typically, only 'js<number>' devices are compatible with the Joystick driver.

  • If the Joystick component is not activated, the component will not run. Make sure the property Activate is set to '1'.

Hardware - ForceFeedbackJoystick I/O ForceFeedbackJoystick Configuration Manual

The content of this document is confidential information not to be published without the consent of CDP Technologies AS.

CDP Technologies AS, www.cdpstudio.com

Get started with CDP Studio today

Let us help you take your great ideas and turn them into the products your customer will love.

Try CDP Studio for free
Why CDP Studio?

CDP Technologies AS
Hundsværgata 8,
P.O. Box 144
6001 Ålesund, Norway

Tel: +47 990 80 900
E-mail: info@cdptech.com

Company

About CDP

Contact us

Services

Partners

Blog

Developers

Get started

User manuals

Support

Document download

Release notes

My account

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

© Copyright 2025 CDP Technologies. Privacy and cookie policy.

Return to top