Question: Exercise - Arrays LABVIEW PROBLEM A useful tool in many control applications is a circular buffer. This is an array into which we write values
Exercise - Arrays LABVIEW PROBLEM
A useful tool in many control applications is a circular buffer. This is an array into which we write values one at a time. However, when we have filled the array, we continue writing from the beginning of the array again. This way, we always have a given number of the most recent values of the input signal. In this exercise you will develop a simple VI that does the following: 1. Initialize a 100 element array to the value NaN (not a number see numeric constants palette, or just type 'nan' into a numeric constant box). 2. A continuously repeating loop, executing once every 50 ms, that uses the array as a circular buffer. It writes a value y into the buffer: y = asin(bt) (a = amplitude, b = frequency, both from user-settable controls, t is time value incremented by 0.05 each time the loop repeats). Each time the loop repeats it plots the circular buffer array on a waveform graph (Note: make sure you select waveform graph not the waveform chart display module). Confirm that the program runs correctly: the sine wave should appear on the graph, and the new values will overwrite the old values progressively.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
