Xbox controllers and DirectInput/XInput

For my final year project I use LabVIEW to create the simple tactile feedback in a Xbox 360 controller.

Examples of C++ code using XInput, which converts the trigger values (0-255) at the speed of vibration motor is attached (0 - 65535).

The code defines a structure:

struct CONTROLER_STATE
{
XINPUT_STATE lastState;
State XINPUT_STATE;
DWORD dwRet;
bool bLockVibration;
XINPUT_VIBRATION vibration;
};

CONTROLER_STATE g_Controllers [MAX_CONTROLLERS];

then it sets the values of vibration.wLeftMotorSpeed and vibration.wRightMotorSpeed and transmits values to XInputSetState:

XInputSetState (i, & .the g_Controllers [i]);

By using the "Call library function" node and selecting XInput1_3.dll, I have access to XInputSetState and other functions.

'I' is the index of the controller (0-3), but although the engine speeds are UInt_16, they are buried in the struct and I don't know what type I have to use or how to assemble the data in the block diagram.

Does anyone have any suggestions?

Thanks in advance,

Greg.

Dear Greg,

Thanks for the clarification; I assumed that with 5 posts you were a beginner.

It is possible to pass struct of data as defined in a type. DLL as clusters in LabVIEW.  I could find this example of Community ( https://decibel.ni.com/content/docs/DOC-9079 ), and you can look at some of the attachments in LabVIEWWrapper as a base.

Kind regards

Tags: NI Software

Similar Questions

  • Xbox will not connect to xbox live and said "Uh Oh, seems to have found a bug in the system.

    So I went to a game on my xbox and it froze, I so stop my xbox 360 and turned it. When it was turned on it says not connected to xbox live, so I did the steps and plugged but it got to the last step where it connects to xbox live, and it said unable to connect to live. So I went on the xbox website and I registered and it says "Uh Oh, seems to have found a bug in the system and it tells me I have no friends and it does not display my photo on the site...» It happened once in October, but has not occurred again until now. I need help please to find what's wrong.

    Try Xbox support:
    http://support.Xbox.com/en-us/

  • If I had an xbox we and my friends just had an xbox 360. Would we be able to talk to each other

    My friends do not receive the xbox one and I am. I would still be able to talk about them on the 360 via the xbox one. Thank you.

    Hello

    It is not a community forum for Xbox.

    Try these resources to the Xbox:

    Xbox forums: http://www.xbox.com/en-US/forums

    Main problems Xbox: http://support.xbox.com/en-US/browse?product=xbox-360

    Xbox contact us: http://support.xbox.com/en-US/contact-us

    Don

  • When playing xbox live and someone turns on the laptop he loses the connection to the server and then resets modem

    when im playing left 4 dead 2 versus and kids turns to the top turn of the page to play counterstrike he says: interruption of the connection to the server and then resets my modem or router

    I had the Charter to come out, they ran the new line and I always have problem help me please

    Hello

    ·         What operating system do you use?

    Step 1:

    I suggest you to update the firmware of the router on the manufacturer's Web site and verify that it helps. For more information on how router update contact your router manufacturer's support site.

    Step 2:

    Try to assign the static IP address for an Xbox 360 and the laptop and check if it helps.

    To assign a static IP address for your laptop:

    one) click Start > Control Panel > network and Internet > network and sharing Center and click on change adapter settings.

    (b) select your network adapter. (if you have more than one list) Right-click on the adapter and choose 'Properties' from the list.

    (c) under "this connection uses the following items," click once on "Internet Protocol Version 4 (TCP/IPv4) to select it and then click on the button 'Properties'.

    (d) click the radio button for "use the following IP address:" enter the static IP address, you want to use in the IP address box.

    (e) press "Tab" when you are finished and that the "Subnet mask" value should automatically populate with the correct value.

    (f) Finally, you will need to enter the IP address of your default gateway and the IP addresses of your favorite servers and auxiliary DNS.

    (g) the default gateway is the IP address of your router. The DNS addresses are usually provided to you by your ISP.

    (h) click on 'OK' to save your changes, and then click 'OK' again on the local area network connection properties window. You have now assigned to your computer a static IP address in Windows

    To assign a static IP for Xbox:

    (a) turn on the console and press "Guide" on the controller to bring up the quick menu.

    (b) go to the 'Settings' tab, then open "System Settings." The dashboard opens and the 'System settings' menu.

    (c) select 'Network settings' in the menu new. Another list of menu options is displayed. Choose "Configure network." This opens the network configuration menu, where you can set a static IP address. Note your IP address, subnet mask and gateway.

    (d) change your settings 'IP' to 'Manual' instead of 'automatic '. This will allow you to manually select your IP address and other settings. It can also erase your current settings, that's why you need to write.

    (e) change the last three digits of the IP address. Enter the same numbers for the subnet mask and the gateway that you saved in step 3. Press 'B' to exit from the menu and save the changes

  • Reinstall the USB controllers and USB drives

    Some flash drives did not work properly. So I uninstalled my USB controllers and USB drives from Device Manager. When I tried to reinstall, the Add Hardware Wizard cannot find the drivers, now none of my USB ports work. Help, please...

    Hi Paul,.

    Please run the patch from this link and see if that helps.

    Hardware devices do not work or are not detected in Windows
    http://support.Microsoft.com/GP/hardware_device_problems/en-us?EntryPoint=lightbox

    For additional help, see:

    Advanced troubleshooting tips for General USB for Windows XP problems
    http://support.Microsoft.com/kb/310575

    If none of the suggestions above, you may need to reinstall your chipset drivers to fix the problem. Please visit the section of your chipset manufacturer support or your computer manufacturer's Web site for drivers.

    Kind regards

    Shinmila H - Microsoft Support

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Xbox 360 and Vista Media center (understand not found)

    I've looked everywhere I can think and have not been able to find an answer to this far (including the green button forums)

    After you run the transfer Assistant to move things to the Media Center and use as a desktop pc, the xbox 360 and Media Center cannot find the other and settings, I can see the xbox inside network but devices Media Center doesn't see it and I get the infamout (extender not found error).

    configuration is a wired connection via a belkin router, network configuration has not changed and the media center has been able to connect to the xbox previously, I tried several things so far

    -uninstalled onecarelive and disabled the firewall (one of the problems solved but are still unable to find the xbox)
    -reset the xbox to factory settings
    -check the firewall router so
    -installed all the updates that are known for pc and xbox including SP2

    Here's the event codes that I get when you try to configure the Extender, it shows correctly configured but yet I get the error not found "extender".

    * Information 2009-06-04 13:54:55 Mcx2Dvcs 400 none
    Windows Media Center Extender Setup successfully configured Windows Media Center PC for use with an Extender.*Information 2009-06-04 13:54:51 501 Mcx2Prov None
    Hersch began setup of Windows Media Center Extender with the following options: Firewall (0,0,1,1) Power management (0) media settings (1) * WARNING 2009-06-04 13:54:37 411 Mcx2Dvcs None
    Windows Media Center Extender Setup detected the following non-Windows Firewall: Windows Live OneCare Firewall

    disregard, I just fixed it... stopped the connection internet sharing service and was able to connect.

    for those who need to do this click on the Start button > right click on computer > click on manage the > on the left side of the window that opens click on services and applications > then select services > find the service "internet connection sharing" > right-click and select stop.

    some positions will tell to go to properties on the network connections page, but there was a tab sharing for mine

  • Xbox 360 and xbox running live of laptop and wireless modem

    I'm running as my Xbox 360 and xbox live since my laptop via an ethernet cable. The internet connection is done by '3' wireless dongle. It has worked well in the past - until recently.

    Whenever I try now - setting up my xbox can't get an IP address from my laptop.

    I was on the site of Microsoft for answers and xobx and I start to beat now. I watched CSI and as I can see - everyhting should work fine.

    I have Norton Internet Security and Windows Firewall as my security systems.

    Any ideas anyone?

    Thank you

    Hello

    Try a tooth to disable Norton and undo redo the ICS.

    http://support.Xbox.com/support/en/us/NXE/xboxlive/getconnected/hcxl/consharing.aspx

    Jack-MVP Windows Networking. WWW.EZLAN.NET

  • XboX 360 and Qosmio E10 - question on the Pal settings

    Hello
    I have problems of xbox 360 game games that require settings to Pal 60 on my Qosimo E10 with Geoforce FX go 5200. I use my nvidia screen set up that tells me that the screen is set to Pal 60, but my xbox says it is set to Pal 50 and will not play the newer games.

    I can access the xbox through the TV connected to the port monitor button.

    Any help would be appreciated

    Hello

    I'm not an expert for Xbox, but if you Google around you will find many articles and comments about it. Before you wait here and I hope someone has the same unit and Xbox a little check what other forums offer as a solution.

  • Upgrading memory on the PXI-8105 controllers and PXI-8106

    Hello

    I've recently upgraded the memory of three PXIs; one with a PXI-8105 controller and two with the PXI-8106 controllers.  Both the 8105 and 8105 can have a maximum of 4 GB (2x2gb) DDR2-677 (PC2-5300) (see links below).  However, on the three systems, both the BIOS and the o/s only see 3.3 GB.  No idea why this might be the case?

    I tried to Flash the BIOS (v1.4 on the two PXIs), but without success.

    We use COTS memory (i.e. not purchased NOR) but I would be badly pushed to believe it is the cause of the problem.

    Thank you.

    Links;

    I don't know about the BIOS reports less than 4 GB. Here's a blog post that best describes what I wanted.

  • console Xbox banned and cannot play online. How can I get ban lifted?

    Recently, my Xbox 360 console has been banned. I know that my son plays did do things that were against the terms as such.

    I read them to him and he understands now see how I already paid for online use, I was wondering if the console suspension could be lifted?
    Thank you, hoping for an answer soon!
    D.

    Hi ghostmom71,

    Please take a look at the following:

    Xbox LIVE policy on Suspensions of Console

    If you have any other questions, I recommend to contact Xbox Support:

    http://support.Xbox.com

  • The Xbox freezing and won't start do not.

    So my Xbox it does not work, he repeats to me that home took to long to the stat and gives the average error code that has no solutions. as for this is the work of buttond for about 10 seconds and then crashes again. the only Julien can do is hold the home button and then turn off the controller. And the xbox just outside spazzes. Please help me I tried many things

    [Moved from Virus & Malware]

    You will find the Xbox in favor in these forums-online https://forums.xbox.com/

  • I just talked to xbox live and said me to communicate with you as you take money off mky account and I havnt used for more than a year now, I'd like a refund

    Hi I was wondering if some body would contact me on my account that I havnt used more than a year, I would like a refund on that because I'm not happy at all, you get 15 pounds a month and I really carnt afford this, if someone could give me a ring on (deleted) I would be grateful thank you

    Hi laurabramley,

    For any questions about Xbox Live, please see the following link for Xbox support:

    http://support.Xbox.com/en-us/

    Thanks for posting your question in the Microsoft answers Forum

  • I was prompted to download the beta XBox dashboard and would like to know if there are problems with it?

    Dashboard beta

    problems with the xbox dashboard beta?

    I was asked to download, but I don't want a brick console

    I have the slim version

    This has nothing to do with the installation, upgrade, and activate Windows.

    ASK THE XBOX:

    XBox - Support
    http://support.Xbox.com/en-us/pages/default.aspx

    XBox - Contact us (support)
    http://support.Xbox.com/en-us/contact-us

    XBox - Support Forums - and my XBox (top-right)
    http://forums.Xbox.com/

    Xbox technical support phone number

    Toll-free: (800) 4MY-XBOX or (800) 469-9269

  • someone hacked my account xbox live and now they have got my email password and blocked me out, what can I do, who do I call?

    My tram xbox live account has been compromised by another user, xbox is working on the problem, but we have a year of xbox live if they can't fix it, now its Windows live e-mail address which has been associated with the account, we cannot connect to.  Please tell us who to contact, thank you

    Hello

    I suggest you to post the question in the forum below and check if it helps:
    http://windowslivehelp.com/solutions.aspx?ProductID=1

    It will be useful.

  • Xbox 360 and Windows Media Center interfere with the operation of the Vista computer.

    Since the implementation of an Xbox 360 for the family to use, turning power switch and return to the dashboard caused Windows Media Center on the laptop family to turn on automatically, which, in some cases, interrupts programs and blocks computer. Sometimes the computer will be same turns on automatically when the XBox is turned on.

    I've done everything I can think of to stop the problem, including 'disconnect' XBox WMC in the "Uninstall" the XBox and the XBox settings in the settings of WMC. I do not anticipate using WMC in the near future, I just want to stop this crazy to happen.

    Thanks in advance for any help and please ask if you need more information on my problem.

    Hello ebduhamel,

    1. what type of connection you have between the computer and the Xbox, it's a cable or a wireless connection?

    2. is it to wake up the computer from standby or everything just stops?

    I suggest you try the steps below and check if you have the same problem.

    This could be possible only if media sharing is enabled on your computer.

    I suggest that you turn off media sharing and make sure you always have the same question:

    a. click the arrow below the Library tab, and then click media sharing.

    b. turn off media to find that others share and share my media to check boxes, and then click OK.

    By clicking OK, you confirm that you want to turn off sharing for yourself. You will also be asked if you want to turn off sharing for everyone who uses this computer. Note that if you let one of the selected check boxes, some sharing services may continue to run in the background.

    c. When you are prompted to turn off sharing for everyone who uses the computer, follow these steps:

    To make your changes apply to all users of your computer (including yourself), click Yes.

    Thank you
    Irfan H, Engineer Support Microsoft Answers. Visit our Microsoft answers feedback Forum and let us know what you think.

Maybe you are looking for