Example Code

FPS with Real Guns Code

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.

    Hardware

  • Data Acquisition (DAQ)

    Software

  • LabVIEW

    Driver

  • NI DAQmx

Code and Documents

Attachment

Download All

Overview

This is the code that was used to play Half Life (the flash version) with real guns shooting into a piece of drywall.

 

Description

The accelerometers will take in vibration data to triangulate the location of a hit on the wall. This program uses linearized math for simplicity, and ease of use, and therefore has some inherent offset error.  We used a USB-4432 and 4 accelerometers in a square pattern on the wall. The VI's are saved in LabVIEW version 8.6.The math behind all this is available at http://decibel.ni.com/content/docs/DOC-6126

 

Requirements

Hardware

  • USB-4432
  • Accelerometers

Software

  • LabVIEW 2012 or compatible

 

Steps to Implement or Execute Code

1.Download and set up all VI's

2.Set all configuration settings desired with your hardware

3.Run application.

 

Additional Information or References

 

 

 

Main.png

 

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

Doug Farrell
Solutions Marketing - Automotive
National Instruments

National Instruments Automotive Solutions

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

Comments
pallen
Active Participant
Active Participant
on

This is too awesome!

Thanks for putting this one up.

---------------------
Patrick Allen: FunctionalityUnlimited.ca
Zulu_1978
Member
Member
on

Hi

I am trying to use these codes with USB 4432 but its not working. Are these compatible with USB 4432. Also is the program main.vi the main program to run.