LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pls help

a)Create a VI. Project3.vi that writes a 1-D array of three random
numbers(between 0 to 100) and their average
every 1 second to a file Proj3data.dat continuously in ASCII format
with one digit after floating point, for 10 seconds.

b) Build a VI Proj3databack.vi which reads the file you created (that
is, Proj3data.dat). Get the original data back in an arry indicator.

pls send me:
physics.fizik@gmail.com

0 Kudos
Message 1 of 7
(2,976 Views)
I will do your homework as long as you do my job.
deal?
Message 2 of 7
(2,970 Views)
Is this for a school project (as part of a course)?
 
If so, then maybe we can walk you through the example and provide assistance along the way.
 
So open LV and open a blank vi that you'll save as the filename that you want.
Go to the block diagram and familiarize yourself with the Tools palette as well as the Functions Palette.
 
If you have newer LV versions (LV7 & up) you can right click on a blank area of the block diagram and the FUnctions Palette will appear.
 
The 1st thing is to generate the random numbers.  This function is located under "Numeric" and the icon is "2-dices".  That will generate a decimal number between 0 & 1.  Multiply by 100 and you have your random range. 
You will need a couple of loops. 
The fist loop "FOR" can contain the random number generator and use it to generate the 3 numbers.  You can output an array of 3 numbers, then do the avg and place the avg # the array.
 
You also need a while loop which contains a wait x msec.  The value of x depends on how accurate you want to be .  There are different ways of doing this, so I'll just describe the simplest one.  Place a constant 1000 to the timer inside the while loop which contains the for loop.  Place a stop button on the front panel to stop the loop.  It is wired to the loop control (stop sign).
 
Create a display to show the numbers that are generated & their avg.  Once you achieve this, writing to the file will be the next step.  There are also some different approaches to this.  Get to this point first, then we'll help for the file writing portion, which is actually quite simple.
 
JLV
 
 
Message 3 of 7
(2,958 Views)
Ah, the good ole days.  Clearly defined objective.  Completable with a half hour's work.  No middle managers leaning over my shoulder second guessing every move.  No TPS reports. 

Remind me why I graduated?
Message 4 of 7
(2,948 Views)
I'm trying to figure that out myself...
😄
Message 5 of 7
(2,932 Views)
As I recall, it had something to do with money.Smiley Very Happy
Message 6 of 7
(2,925 Views)

Speaking of money...  I'll do it for $150.00!

NO CHECKS!

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
Message 7 of 7
(2,905 Views)