I am developing an event detector, it studies current levels and for now will print to console when a specific current range, limits duration conditions are met.
I have based my detector of the ‘detector.py’ example in Joulescope Scripting examples, I set current range mode parameters etc, and sampling frequency, subscribe to current data, and tie my callback to the current data being available.
My issue is that the ‘data_callback’ is triggered always at 50ms, and this appears to be fixed regardless of sample rate.
So if I set the sample rate is set to 1,000,000, data_callback() runs when 50,022 samples are available.
Then if I set the sample rate to 10,000, data_callback() runs when 500 samples are available.
Is there a way to control how this callback is generated, at present it seems fixed to 50ms duration is that as expected? For my detection logic (without getting into the detail) it would be much simplified if I could set this to approx 20ms interval
I have attached a condensed version of my detector script here:
P.S. First time poster here, but have been using the Joulescope since april 2025, really this is an excellent bit of kit! Congratulations to the Joulescope team on a great product!
js220_data.py (1.9 KB)