Callback function after addlistener for National Instruments board
    3 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
Probab not really a Matlab question:
After daq sessions are set (getting data from a NI card):
    devices = daq.getDevices;
    DataSession = daq.createSession('ni'); % start a session with the National Instruments 
and addlistener is called:
    lh0 = addlistener(DataSession,'DataAvailable',@(src, event)logData_v1p1(src, event, fid1));
It works, but I cannot find ANYWHERE the file logData_v1p1 which logs data to the file (fid1). 
I've searched all Matlab folders, subfolders, etc., and files I've put in "Box". Where might logData_v1p1 be?
OR: how can I search properly??
OR: if I just want to "massage" the data before it's written to a file, how I access the data, massage it, and then write it to a file?
0 Commenti
Risposte (1)
  Steven Lord
    
      
 il 11 Apr 2025
        The only place where a search of the MathWorks website finds that function name is this post. Can you tell us where you found that addlistener call that you are asking about, the one where logData_v1p1 is called? Was it in an example (potentially from an older release), was it something that you found elsewhere online, was it something you got from your professor (if you're a student) or from a colleague, was it something hallucinated by ChatGPT, etc.?
5 Commenti
  Steven Lord
    
      
 il 12 Apr 2025
				At first glance, assuming you've created fid1 using fopen before adding the listener, I think that's correct. I haven't worked with Data Acquisition Toolbox so I'm not 100% certain.
Vedere anche
Categorie
				Scopri di più su Graphics Performance 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!

