To download NI software, including the products shown below, visit ni.com/downloads.
Overview
Use an Functional Global Variable to implement equations of uniform acceleration to model a ball thrown from ground level.
Description
This code uses the equations of uniform acceleration to simulate the behavior of a ball thrown from a point at ground level by using an event driven state machine and an Functional Global Variable. By changing the values of Initial Vertical Velocity, Acceleration due to Gravity, and the Initial Horizontal Velocity, it is possible to visualize the behavior of the ball, which is represented both by a single LED in the above array, and also by the waveform chart.
Requirements
Steps to Implement or Execute Code
Additional Information or References
VI Block Diagram
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.