Joystick block under Mac OS

26 次查看(过去 30 天)
Fabrizio
Fabrizio 2025-8-26,11:45
评论: Fabrizio 2025-9-10,16:10
I am currently working in the Mac OS ver 15.6.1 (Sequoia) environment and need to connect a joystick to my Simulink model (R2025a) for aircraft simulation. Would be working under Mac OS? If so, which hardware (joystick or pad) is recommended?
Thank you very much in advance,
Fabrizio

回答(1 个)

sneha
sneha 2025-9-1,9:51
1. Native Support in Simulink
  • Simulink’s built-in Simulation 3D Joystick block is not supported on Mac OS, because it relies on DirectInput/XInput APIs.
  • If you use Windows, you can use the sim3d.io.Joystick object to interface with a joystick.
Syntax:
joystick = sim3d.io.Joystick()
joystick = sim3d.io.Joystick(Name=Value)
The sim3d.io.Joystick object supports all joystick devices using Microsoft® DirectInput and XInput protocols.
Example: To enable force feedback if supported:
joystick = sim3d.io.Joystick(ForceFeedback=1)
2. Workaround for macOS
Since the built-in block is not supported on macOS, you can:
3. Hardware Recommendation
  • Preferred:Flight-centric USB HID-compliant joystick (e.g., Logitech Extreme 3D Pro, Thrustmaster T.16000M).
  • Why not a gamepad? Joysticks provide more precise control for flight simulation.
4. Integration Steps (macOS)
  • Choose joystick → Ensure it’s USB HID compliant.
  • Connect to macOS → Verify in System Settings → Game Controller.
  • Integrate with Simulink via S-Function → Assign axes/buttons to simulation controls.
  • Run simulation → Test and calibrate.
Please note that Mathworks does not extend support for file exchange submissions.
You can also use python scripts to acheive the same.
References :
  1 个评论
Fabrizio
Fabrizio 2025-9-10,16:10
Thank you very much for your kind answer. I did download the S-function, but I don't know where to get the required WinMM.lib file. It's part of the Windows SDK and I am using a MacOS.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Block Authoring and Simulation Integration 的更多信息

标签

产品


版本

R2025a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by