How can I connect Logitech G27 with Simulink?

I'm trying to interface Logitech G27 driving wheel with Simulink in Matlab 2018b.
I found some references below.
1. Logitech G29 block is available in Matlab 2018b but I have some problems when I try connecting it to G27 instead of G29. Is it possible to do in this way?
2. I've found one paper where G27 was connected to Simulink by Joystick block. https://docplayer.net/48892672-Building-a-matlab-simulink-based-truck-simulator-t-a-h-lousberg.html#show_full_text I use only the driving wheel and pedals, not the gear selector. In this case, what selector parameters should be used to receive the data?
Thanks.

3 Comments

I am currently an engineering student working on a very similar project. I am only using the driving wheel and pedals however I am utilizing the G29/920. I was wondering if you ever received the information, or figured out how to do this! I am very interested if you have and would love some advice, as I am hitting the same wall you did when trying to figure out this. Please let me know, my email address is zubin34@tamu.edu.
Thanks.
Hy! Sir, I'm Ahmad Mateen Chohan, an Automotive Engineer from Pakistan.
Can you share it's source file at ahmedmateen681@gmail.com
Hello,
I am working on same issue with different Vehicle dynamic model
Can you share some source file at Marshettysheshu28@gmail.com

Sign in to comment.

Answers (4)

If anybody got a way to do it kindly share.
Hello everyone,
Please let me know if you found the answer to this question.
Thanks,
AYUSH MAHESHWARI
AYUSH MAHESHWARI on 16 Mar 2021
Edited: AYUSH MAHESHWARI on 3 Apr 2021
Hello,
You can have following options :
  1. Use Joystick Input block in MATLAB. From the game controller (control panel settings in windows) provide the ID. This ID you can give as a paremeter in the block and recieve signals from axes, buttons and point of view. For example in my case it's 2 and I am getting my steering signal, throttle, brake and clutch from axis while my gear # and other button values (boolean) on g27 from button output. Check accordingly.Once checked by actuating the axis and button on hardware make sure to callibrate the system.
  2. Create joystick object and setup it in similar fashion as mentioned in option 1.
In option 1 and option 2 you can't change steering parameters from the MATLAB / Simulink and everytime has to switch to Logitech Gaming Software. This is not a good way if your project is research oriented. Some example of these parameters are : wheel linearit, wheel range, overall gain , spring gain , damper gain , combined pedals etc. (you would have seen these parameters in Logitech Gaming Software). Joystick Input is a s-function. I f you will right click on block and select Block Parameters you will see parameters over there are joyid, adjust ports and force feed. This will not help much in in-depth analysis of the rersearch work.
3. Intermediate but flexible operability: Design you own s-function. First study the logitech SDK kit (easily avaialble). Over there you have documentation of classes their properties and functions. You can use these in MATLAB using S-function furthermore defining your own parameters (as mentioned above) and then tuning it in simulink itself and see the effect. In SDK file go into src file you will see multiple src snippets etc. You can use these in your level 2 s-function customized blocks. Read document name "LogitechGamingSteering WheelSDK" and you will find wrapper and .dll (dynamic link library). You can use it further in C sharp based tools such as unity game engine too.
I will though suggest to start from option 1 and if you feel to go in-depth, try developing s-function.
Good Luck
Ayush

1 Comment

I am trying to use your Option 1, but am having trouble finding the ID from the game controller. Can you explain in more detail how I find this information and then how do I use it to connect the Logitech driving wheel/pedals to Simulink?

Sign in to comment.

Hi!
How can I connect Thrustmaster T300 RS GT Edition with Simulink?
I can’t connect this gaming steering wheel with pedals to Simulink, please help

Asked:

on 17 Oct 2018

Commented:

on 14 Sep 2023

Community Treasure Hunt

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

Start Hunting!