# TAILIEUCHUNG - Microprocessor Interfacing Techniques Lab VIEW Tutorial Part 5

## Microprocessor Interfacing Techniques Lab VIEW Tutorial Part 5 | PHY 406 - Microprocessor Interfacing Techniques PHY 406 - Microprocessor Interfacing Techniques LabVIEW Tutorial - Part V Loop Variables Thanks for the Memory One of the things that we often need to do is to refer to values in a previous loop iteration. Thus we might want to average the last four values of the random number generator. To do this we need a shift register. A shift register takes an input in one iteration and delivers it as an output into the next iternation. So why is it called a shift register Well because it is a little more elaborate than that. The shift register can be as long as you like and values are shifted down one element at a time. So there is one input and many outputs. Suppose we have a shift register with four elements which contain 75 99 63 27. A new value of 93 is pushed into the shift register and everything moves down one. The shift register now has 93 75 99 63. At the next iteration 45 is pushed in and the register now has 45 93 75 99 and so on. We can generate a shift register by popping-up on the right-hand side of the while loop and selecting add shift register. Two new icons pop-up on the right input and left output of the loop. Go to the left one and pop-up - select add element - do it again and you now have three elements which go in time order down the page newest on top. Re-arrange your VI to show the average of the last four values of the random number generator. The result should look something like this Run the VI and you should get the expected result. It isn t going to take a rocket scientist to realise that doing any significant arithmetic in LabVIEW is going to be tedious. Evaluating any complex expression will involve lots of elements and will rapdily get tedious. Fortunately there is a better way. Under structures there is an item called a formula node. This is designed to make things easy. Remove the multipliers and dividers for the averaging and stretch a formula node box into the space. The formula node box can

TÀI LIỆU LIÊN QUAN
34    36    0
30    36    0
30    39    0
30    37    0
30    37    0
30    35    0
48    48    2
26    39    0
75    38    0
60    40    0
TÀI LIỆU XEM NHIỀU
3    5285    69
24    2611    27
8    2203    11
29    2138    29
35    1918    48
165    1863    1
2    1811    10
64    1771    6
1    1702    7
15    1699    4
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
9          27-11-2020
2    14    0    27-11-2020
27    14    0    27-11-2020
8    15    0    27-11-2020
6    15    0    27-11-2020
7    10    0    27-11-2020
1    12    0    27-11-2020
7    14    0    27-11-2020
2    11    0    27-11-2020
4    11    0    27-11-2020
TÀI LIỆU HOT
580    1374    127
171    802    117
21    957    116
16    1024    109
312    207    101
7    26    80
3    5285    69
37    258    68
17    251    59
17    321    58