Add to trigger actions: log and power cycle target

Hi @simonmerrett - I am not sure that the UI is up to this, at least without some modifications. You may be able to hack it. The UTC times can show up in the Statistics recordings. You can also toggle a JS220 GPIO. However, you would likely need external hardware to interpret an edge as “cycle power” since the Joulescope UI can only set the value (not toggle or perfom arbitrary patterns) on trigger Start and Stop.

To get the UTC time in the Trigger widget, select Record statistics under Start Actions. Then press Config and change Time Format to UTC. The first entry will be when the trigger happened, and the last entry will be when the trigger starts waiting for the next event. You can subtract the UTC time for the first entry from the previous CSV file’s last entry to know how long it was in trigger search mode. Did I mention that this is a hack :wink:

You can certainly do this in Python. See the trigger_host_pyjoulescope_driver example, which is pretty close to what you want. You can modify lines 130 - 145 to take whatever actions you want on the trigger detection which includes printing / logging UTC time and cycling the power supply. What do you think?

1 Like