Filtering in real time from a NI DAQ
    9 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
    Marco Tito Scordo
 il 18 Gen 2017
  
    
    
    
    
    Commentato: Walter Roberson
      
      
 il 7 Feb 2017
            Hello Guys, I'm trying to acquire an analog signal (coming from a sensor) from a NI DAQ board and I would like to manage better the plot and filtering in real time in Matlab. I'm acquiring in background operation. What is hard is how to have access to the data (from the listener) for processsing: I'm able to plot only one second of data. Does someone knows how to solve this? Thank you
0 Commenti
Risposta accettata
  Vandana Ravichandran
    
 il 20 Gen 2017
        
      Modificato: Vandana Ravichandran
    
 il 20 Gen 2017
  
      Please try the "DurationInSeconds" property of the session object. You can create a listener using "addlistener" function that calls the "plot" Callback for the "DataAvailable" event. "DurationInSeconds" can be used to control for how long the background operation runs and the data is acquired for this duration. Once this interval completes, the listener invokes the "plot" callback.
The documentation has an example similar to what you want to implement: https://www.mathworks.com/help/daq/ref/dataavailable.html
2 Commenti
  Walter Roberson
      
      
 il 7 Feb 2017
				How are you doing the plotting?
The callback on the listener should have access to all of the data made available. However if you happened to be plotting in Simulink with a Scope block then that block might be configured to retain a limited number of points.
Più risposte (0)
Vedere anche
Categorie
				Scopri di più su Analog Input and Output in Help Center e File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


