Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i write and read the same data

 
hi,
      
         i have attached my program to this mail. i have some problems in this program.
 
problems:
 
1. I want to select the threshold for the rms,varience and s.d.
But what i used is not doing that. i want to fix the upper threshold value and lower threshold value.
 when ever the input crosses upper threshold value i want the output and it will remains uptill the value above the lower threshold value.
Once it come down the lower threshold value the output should be stopped.
 
2. I want to write this in to a  file and i want to read this file. is this possible or not. 
 
            please try to help me i am very new with lab view6i
 
            
 
 
       REGARDS
 
CHAMARTHY KOMAL DILEEP.
 
 
0 Kudos
Message 1 of 2
(2,434 Views)

The easiest way to perform a certain action (such as file I/O) based on a certain condition (such as whether a value has passed a certain threshold) is to use a comparison VI in combination with a case structure. Then you can specify that if your rms, standard deviation and variance are above a threshold then perform a certain action.

Also consider using shift registers to keep track of data from the last loop. If I understand you correctly, you want to start logging data when an upper threshold has been passed. Then you want to continue logging data until a lower threshold is passed. I have attached a non-functional but explanatory VI that will help explain how to implement logic to that effect. It also demonstrates that you can indeed write and read from the same file in a loop. The best way to do this is to open the file before the loop, do all the necessary writing and reading in the loop, and then close the file after the loop.

Hope this helps!

Jarrod S.
National Instruments
0 Kudos
Message 2 of 2
(2,412 Views)