Example Code

Logitech Attack3 Joystick LabVIEW Front Panel Control

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

    Driver

  • NI VISA

Code and Documents

Attachment

Overview

This VI demonstrates the use of VISA to monitor a USB RAW Resource within LabVIEW.

 

Description

The VI works by using a USB interrupt event. First, the program opens the RAW resource. Then, it enables the USB interrupt event. After that, the device is notified that the user is waiting, and data is then received from the interrupt. After the stop button is pressed, the VISA resource is closed.

 

This example was specifically designed for use with the Logitech Attack3 Joystick, but can be easily modified to monitor any USB device.

 

 

Steps to Implement or Execute Code

  1. Get your interrupt pipe USB device recognized by Windows.
  2. Attach VISA to the device as a driver using the VISA Driver Development Wizard.
  3. The USB RAW name should show up in MAX, and you should be able to select it in the dropdown list on the front panel.
  4. Running this VI will cause the VI to wait for an interrupt from the device and then return the interrupt data once it occurrs.

 

Requirements

 Software

  • LabVIEW 2012 (or compatible)
  • NI-VISA driver which is compatible with your hardware and version of LabVIEW

 Hardware

  • Logitech Attack3 Joystick

  

Additional Images

 

Front Panel:

1.PNG

 

VI Snippet

2.png

 

 

 

**This document has been updated to meet the current required format for the NI Code Exchange. For more details visit this discussion thread**

 

National Instruments
Applications Engineer

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
carlosgarzon
Member
Member
on

I am controling a microscope using logitech joystick and this Vi is working well for my purpose. thanks.

Team 4376
Member
Member
on

Is there a tutorial somewhere for getting labview to use the logitech controller as an input? I am a programmer on a rookie team and can't figure it out.

Nathan_B.
Active Participant
Active Participant
on

More than likely you should be able to use the "Basic Input Demo.vi" as a starting point.  My Logitech joystick and logitech gamepad (F710) work with it as long as the drivers are installed correctly.

TB1X
Member
Member
on

Thank you for this useful exaple, I completed my ham radio knob control through your help.

ralara
Member
Member
on

Excellent .... Thanks for sharing. Can I connect an arduino in this same way ?. And not able to do that.