Connecting Xbox Controller to Simulink Real-Time
33 次查看(过去 30 天)
显示 更早的评论
Hi,
Im trying to add a xbox controller to my simulink Real-Time. However the only blocks I could find and use only work for normal simulink. I tried using Gamepad Simulator block and the Joystick Input block and I tested and worked only for normal Simulink. When I try to use them in Simulink Real-Time, it doesnt take the values. When I use the the JoyStick input block in simulink real-time, it gives me an error and says "Error:Unable to find S-function module 'joyinput'. S-function modules must exist as either source files or pre-compiled object files on the MATLAB path.".
Is there a way to get around this?
Thanks
0 个评论
回答(2 个)
Ayush
2024-7-31
编辑:Ayush
2024-7-31
Hello Ethan,
It seems that the error that you are getting is because the "Joystick Input" block was not able to create an S-function module properly which is crucial for Simulink Real-time applications. You can try re-building the application to check if the S-function module associated with the block is fixed or you can also try leveraging the following community file exchange that might suit your use case:
Additionally, you can also check out the documentation for "Gamepad Joystick" block for an alternative:
Hope it helps!
0 个评论
Diego Kuratli
2024-10-16
The gamepad and joystick blocks are not supported with Simulink Real-Time.
As a workaround, you could have a model running on the host computer with the Joystick Input block from Simulink 3D Animation, and sending the data via UDP to the Speedgoat real-time target computer. I.e., the joystick is connected to the host computer and send the data to the target computer via the host-target communication link. Here is an example of similar setup with host and target models exchanging data via UDP.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Target Computer Setup 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!