Hi @mliberty ,
I am working with Joulescope version JS110 currently.
I am trying to make an automation script that captures every real-time sample using python script and also if at any level my current levels reaches above certain limit it immediately starts capturing the current variation and records till the current reaches the normal level.
Basically, I am trying to capture every single activity that happens real time and can get the averaged current for that particular event.
Working with Windows 10 and 64bit processor.
So, Need your guidance to achieve this.
Thanks,
Aryan
1 Like
Hi @aryan and welcome to the Joulescope forum!
I think that the first step is to further refine what you are trying to do. Here is what I understand:
- Start script, initialize JS110, start current sample streaming.
- Wait until current sample value exceeds threshold.
- Wait until the current sample value is below a threshold.
- Output the average current, duration and charge between (2) and (3).
- Goto (2)
- On CTRL-C, exit.
I have a few questions:
- Do the steps I described above match what you want?
- For (4), what is the desired output? File, stdout, another thread?
- Do you also want to record the waveform between (2) and (3) to a JLS file?
- Do you have any preference between using the
joulescope
package orpyjoulescope_driver
package? - For (3), do you want to ensure that it is below the threshold for some time, or just 1 sample?
The Joulescope UI 1.1 now includes support for triggers, which I think do what you want. We also now have a trigger_host_pyjoulescope_driver.py example that uses the same detection from the UI in a script.
I am going to mark this issue as solved, but please post again if you still have questions!