03-09-2023 07:07 AM - edited 03-09-2023 07:36 AM
I try to use G29 gaming wheel in LabView, for a driving simulator.
I download the SDK, follow the step in Wheel Integration — monoDrive Simulator, and then import the dll and header to get the vi lib.
However, when I used the Logi Get State ENGINES.vi, the function returned weird value and not affected by turning the wheel, shown in figure:
The SDK docs shows that the vi should work with DIJOYSTATE2ENGINES. But the DIJOYSTATE2ENGINES is a ctl file, if I drag it into the panel it will be like numeric control.
Are there anyone who has experience about using G29 in LabView? How to get the right steering, throttle, and brake command using these VIs?
I've try to use the joystickAcquire vi, but it recieve nothing.
Solved! Go to Solution.
03-09-2023 10:59 AM
Have you tried the LabVIEW "Query Input Devices" function, found on the Connectivity Palette under "Input Device Control"?
Bob Schor
03-09-2023 07:23 PM - edited 03-09-2023 07:24 PM
Hi Bob,
It seems that it cannot detect my G29.
BTW, my G29 works well in other games and matlab, the DirectX and G hub have been installed.
03-09-2023 08:49 PM
Well, just for fun, I plugged a Logitech XBox Controller (a RumblePad) in and it was found, with 4 axes, 12 buttons, and 1 POV (and I could get must of them to "light up"). I must confess I've never used a "Steering Wheel", and I guess I assumed it would be treated as another JoyStick ...
Bob Schor
03-09-2023 09:05 PM - edited 03-09-2023 09:33 PM
Yes, usually G29 steering wheel can be detected as a joystick.
For instance, simulink block "joystick input" detects it as 8 axes and 32 buttons.
Wondering if anyone had met the same problem in LabView.
03-09-2023 10:08 PM
Maybe 8-10 years ago, I tried to connect a Logitech Joystick to LabVIEW, but LabVIEW didn't "see" it. I found it listed when I ran dxDiag, but it was the 13th (or so) device listed, and LabVIEW only showed the first 8 or 9. In other words, NI didn't show "everything". I posted this in the Forum's "Idea Exchange", but it never got enough "hits" (Kudos) to rise to attention from NI (or at least I never heard about it). I just went looking for this old Idea, but I can't find it, but this might explain why LabVIEW can't see your Steering Wheel.
Can you run dxdiag when your Steering Wheel is attached, and post the list of Devices that DxDiag finds? If you've got >12 devices, and the Steering Wheel is at the end, you might have the same problem I did so many years ago.
Bob Schor
03-09-2023 10:13 PM - edited 03-09-2023 10:15 PM
@PATCHIEN wrote:
Yes, usually G29 steering wheel can be detected as a joystick.
For instance, simulink block "joystick input" detects it as 8 axes and 32 buttons.
Wondering if anyone had met the same problem in LabView.
Edit: Sorry the link I posted earlier wasn't what you were looking for.
03-10-2023 04:01 AM
This seems to interface directly to the SDK DLLs. Your not by any change trying to run that in LabVIEW 64-bit?
03-12-2023 07:42 PM - edited 03-12-2023 07:45 PM
I ran it in LabView 2021 SP1 64-bit indeed. When Importing shared library dll, I selected LogitechSteeringWheelLib.h as the header file.
The result was it cannot find some of the functions like LogiGetState, because of the header file "dinput.h" cannot be found.
Hence, I used LogiGetStateENGINE and DIJOYSTATE2ENGINES, then lead to the result as first I posted.
03-12-2023 09:17 PM
I found the G29 using query input device, I clicked the number in the left of figure to 6.
However the axes total is still zero, and I still cannot get the values from the device.