• 0

Digital discovery logic timed acquisition


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 post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

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

Edited by attila
Link to post
Share on other sites
  • 0

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 post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now