LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Logitech G29/G920 Steering wheel in labview

Solved!
Go to solution

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:

PATCHIEN_0-1678366698308.png

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.

PATCHIEN_1-1678366909500.png

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.

 

 

0 Kudos
Message 1 of 12
(2,563 Views)

Have you tried the LabVIEW "Query Input Devices" function, found on the Connectivity Palette under "Input Device Control"?

Query Input Devices.png

 Bob Schor

0 Kudos
Message 2 of 12
(2,533 Views)

Hi Bob,

 

It seems that it cannot detect my G29.

PATCHIEN_0-1678411339179.png

 

BTW, my G29 works well in other games and matlab, the DirectX and G hub have been installed.

0 Kudos
Message 3 of 12
(2,510 Views)

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

0 Kudos
Message 4 of 12
(2,499 Views)

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.

PATCHIEN_0-1678417490189.png

Wondering if anyone had met the same problem in LabView.

 

0 Kudos
Message 5 of 12
(2,495 Views)

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

0 Kudos
Message 6 of 12
(2,483 Views)

@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.

PATCHIEN_0-1678417490189.png

Wondering if anyone had met the same problem in LabView.

 


Edit: Sorry the link I posted earlier wasn't what you were looking for.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 12
(2,479 Views)

This seems to interface directly to the SDK DLLs. Your not by any change trying to run that in LabVIEW 64-bit?

Rolf Kalbermatter
My Blog
0 Kudos
Message 8 of 12
(2,455 Views)

I ran it in LabView 2021 SP1 64-bit indeed. When Importing shared library dll, I selected LogitechSteeringWheelLib.h as the header file.

PATCHIEN_0-1678667824405.png

The result was it cannot find some of the functions like LogiGetState, because of the header file "dinput.h" cannot be found.

PATCHIEN_1-1678667931741.png

Hence, I used LogiGetStateENGINE and DIJOYSTATE2ENGINES, then lead to the result as first I posted.

 

0 Kudos
Message 9 of 12
(2,386 Views)

I found the G29 using query input device, I clicked the number in the left of figure to 6.

PATCHIEN_1-1678673684060.png

However the axes total is still zero, and I still cannot get the values from the device.

 

0 Kudos
Message 10 of 12
(2,370 Views)