Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Can LabVIEW take advantage of controller button pressure sensitivity? (http://www.chiefdelphi.com/forums/showthread.php?t=129491)

pastelpony 15-05-2014 21:41

Can LabVIEW take advantage of controller button pressure sensitivity?
 
For example, I have a steering wheel and pedal set that is registered as a generic USB controller and works flawlessly in LabVIEW. However, I would like the sensitivity of the press of a button to affect the output of a motor. Is there a way LabVIEW can read pressure sensitivity through a .dll file or such?

DonRotolo 15-05-2014 22:13

Re: Can LabVIEW take advantage of controller button pressure sensitivity?
 
How does the device report that pressure?

Not directly related: If only position is reported, pressure can be estimated by the rate of position change. So a 'light' press might move it 2 mm/sec, while a 'hard' press might go 15 mm/sec. (Finally! A real use for calculus! :-))

MaxMax161 15-05-2014 23:11

Re: Can LabVIEW take advantage of controller button pressure sensitivity?
 
What hardware are you using? If it's reported by the hardware labview should be able to read it as well as any other language.

Quote:

Originally Posted by DonRotolo (Post 1385653)
How does the device report that pressure?
Not directly related: If only position is reported, pressure can be estimated by the rate of position change.

Don, perhaps I'm just not seeing it. but just given ON/OFF how would you determine the rate a button was pressed? I'm imagining it being off for some arbitrarily long amount of time then being pressed and turning to on for an undetermined amount of time. However, I could see the length of press being used to control something about an action, assuming it was a press and release action not a press and hold action. For example in several video games quickly tapping the jump button vs holding it will result in a different sized jump.

Mark McLeod 16-05-2014 07:56

Re: Can LabVIEW take advantage of controller button pressure sensitivity?
 
Quote:

Originally Posted by pastelpony (Post 1385647)
I would like the sensitivity of the press of a button to affect the output of a motor. Is there a way LabVIEW can read pressure sensitivity through a .dll file or such?

It is the game controller device, not the reading of it in code that generally determines if an input is a button (on/off) or an axis (press sensitivity).
Exceptions like the xbox hat only make some axis behave as on/off buttons, but a button never behaves as an axis.

In general, if code reads the game controller input as an Axis, then the device returns press sensitivity. However, if a game controller input is reported as a button, then it is not press sensitive.

pastelpony 16-05-2014 08:46

Re: Can LabVIEW take advantage of controller button pressure sensitivity?
 
Yes, I understand that buttons give only a boolean value. However, I thought this because these controllers have pressure sensitivity (such as speed variation through press strength when applied to a driving simulator) and I wondered if LabVIEW could read this. However, this does not appear to be the case. Thank you very much for your help.

MDAWG25 16-05-2014 10:15

Re: Can LabVIEW take advantage of controller button pressure sensitivity?
 
Quote:

Originally Posted by pastelpony (Post 1385710)
Yes, I understand that buttons give only a boolean value. However, I thought this because these controllers have pressure sensitivity (such as speed variation through press strength when applied to a driving simulator) and I wondered if LabVIEW could read this. However, this does not appear to be the case. Thank you very much for your help.

What is the name of this controller? The WPI Libraries may not be able to read it, however you can send the data from a custom dashboard that is reading the controller values with LabVIEW's default joystick input, or by extending DLLs if you want.

An example of extending DLLs In LabVIEW can be found here:
http://www.chiefdelphi.com/forums/sh...07#post1374207

This shows an example of extending the xinput dll to control the vibration of a connected xbox 360 controller.

pastelpony 16-05-2014 17:19

Re: Can LabVIEW take advantage of controller button pressure sensitivity?
 
Quote:

Originally Posted by MDAWG25 (Post 1385720)
What is the name of this controller? The WPI Libraries may not be able to read it, however you can send the data from a custom dashboard that is reading the controller values with LabVIEW's default joystick input, or by extending DLLs if you want.

An example of extending DLLs In LabVIEW can be found here:
http://www.chiefdelphi.com/forums/sh...07#post1374207

This shows an example of extending the xinput dll to control the vibration of a connected xbox 360 controller.

I've used xinput to map vibration onto a Dualshock 3 with LabVIEW through third-party software. I can probably map this controller as well. Thank you. It is an Intec steering wheel and pedal set, pretty generic.


All times are GMT -5. The time now is 08:52.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi