Jump to content
  • 0

Digital discovery logic timed acquisition


Jaapverheggen

Question

I would like to use waveform to log the digital output of 8 channels over a period of time.

I currently manually record the output events for the 8 channels, but I would like to have the PC take a 100 ms measurement every 10 minutes and export this data to a new file every 10 minutes.

Essentially, I would like to know if the waveforms software can automated run a measurement and export it to a tdms file every 10 minutes over a few days.

Thanks

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Hi @Jaapverheggen

The View / Logging tool can be used to save acquisitions to file.
The Update rate rate in Logic Analyzer is limited to 10 seconds, but you can use Script to take acquisitions every 10 minutes.
In Logic configure Trigger to None, set time Base to 10ms/div, add DIO 7:0, open View/Logging and set to save Each acquisition, Reset the index before Running the script.

var dt = Date.now() // milliseconds since epoch
// with 10 minute intervals it will make 144 acquisitions / day
for(var i = 0; i < 1000 && wait(); i++){ // 1000 acquisitions or stopped
    print(i+" "+Date())
    Logic1.single()
    // next acquisition time in
    // 10 minutes * 60 seconds in minute * 1000 milliseconds in a second
    dt += 10*60*1000 
    while(Date.now() < dt && wait(0.001)); // wait 10 minutes or stopped
}

i1.thumb.png.944629abf2451b9cc3b96f0be8e98d11.png

Link to comment
Share on other sites

Hi Attila,

Good to find this thread a colleague of mine started. The code worked out exactly as planned, thank you for this.

Would it  be possible to do something similar with an Analog Discovery 2, monitoring a few logic channels while simultaneously recording the analog reponse of the device using one of the scope channels? I am not sure whether the Analog Discovery 2 is limited to using either the LA or the Scope instead of running them in parallel. One quickly (few sec delay) ofter another would be fine as well.

Thanks!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...