MATLAB >> Simulink Joystick Block

by blusterNrg » Fri, 09 Sep 2005 20:02:27 GMT

Could someone help me? I'm trying to retrieve the axes and the
button' state from a Joystick Input Simulink block.
What are the inputs sent by the block?
Does some tutorial exist?


MATLAB >> Simulink Joystick Block

by Jan Houska » Fri, 09 Sep 2005 21:39:25 GMT

Hi Francesco,

If you mean the Joystick Input block found in the Virtual Reality
Toolbox library, then its outputs are like this:

The first output port (labeled Axes) returns the axes of the joystick in
a vector - these are at least two, usually three or more. Value of each
axis is returned in one element of the vector. The values are normalized
into the range from -1 to 1 (but that also depends on how is the
joystick calibrated in the operating system). The X and Y axis are the
first two elements of the vector.

The second output port (labeled Buttons) returns the joystick buttons. 0
means not pressed, 1 means pressed. This is also a vector, with as many
elements as the joystick has buttons.

The third output port (labeled Point of View) returns the value of the
"Point of View" cap. Not all the joysticks have this feature and
therefore this output port may not be present at all.

Good Luck, Jan

Jan Houska HUMUSOFT s.r.o.
XXXX@XXXXX.COM Pobrezni 20 186 00 Praha 8
tel: ++ 420 2 84011730 Czech Republic
fax: ++ 420 2 84011740

MATLAB >> Simulink Joystick Block

by blusternrg » Fri, 09 Sep 2005 23:02:20 GMT

Thanks a lot!!!!!!!
It was what i needed to know!

Similar Threads

1. how can i configure my hardware joystick with simulink's virtual reality toolbox joystick


2. Simulink -- joystick and pedals - MATLAB

3. Joystick and Simulink

I try to use a  USB-Joystick (Logitech FORCE3D Pro) together with the
Simulink "Real-Time Windows Traget", but this doesn't work. I've read
within this group to use the "Analog Input"-Block from the RTWin-
Toolbox to solve my problem.
When I compiled and let the real-time system run, the joystick always
gives a zero to the output. Very often MATLAB crashs.
Has anyone done these before? Here my settings for the Joystick

- Data acquisition board:  Standard Devices Joystick [1h]
- Sample time:                0.001 (as chosen under Simulation->
- Input channels:             1
- Input range:                  -1V to 1V
- Block output signal:       Volts

4. interfacing of a USBport joystick with simulink - MATLAB

5. Simulink Build Issue with Joystick Input

I'm trying to build an executable file which will run a simulation I created.  In this simulation I use the Joystick Input from the Virtual Reality Toolbox.  For some reason I keep getting an error when building which involves the joystick control.  See below ...

Using the "grt.tlc" target file "Visual C/C++ Project Makefile only for the 'grt' target" ******************************************************************

Microsoft (R) Program Maintenance Utility Version 8.00.50727.762 
Copyright (C) Microsoft Corporation.  All rights reserved. 
NMAKE : fatal error U1073: don't know how to make 'joyinput.ofile' 
U:\Matlab\VRTestAll_4_27_grt_rtw>echo The make command returned an error of 2  
The make command returned an error of 2 
'An_error_occurred_during_the_call_to_make' is not recognized as an internal or external command, 
operable program or batch file. 
### Real-Time Workshop build procedure for model: 'VRTestAll_4_27' aborted due to an error.

6. Simulink 3D Animation Joystick - MATLAB

7. why is not the simulink block handle included in "block" input to level 2 mfile

Why is not thesimulink block handle included in the "block" 
input to level 2 mfile?

I know find_system command can get handles, but it would be 
nice to have the handle directly.

8. Simulink-block LMS and fast block LMS - MATLAB