Hi @kenta and welcome to the Joulescope forum!
Unfortunately, the joulescope.jls_v2_writer.JlsWriter
class only supports the floating point signals current
, voltage
, and power
. This was due to historical reasons when we first implemented the JLS v2 file format. I definitely need to take a look and improve this.
You will likely find it much easier to use the new pyjoulescope_driver.record.Record
class using the record entry point.
Note that the pyjoulescope_driver
package uses different parameters than the joulescope
package. However, it is really easy to list them. With your Joulescope connected, type:
python -m pyjoulescope_driver info --verbose
I just pushed 825cc91 which improves the record
entry point of joulescope_driver
to accept set parameters. Starting with version 1.3.2 (hopefully available later today), you will be able to do this:
python -m pyjoulescope_driver record --set "s/i/lsb_src=gpi0" --set "s/v/lsb_src=gpi1" --set "s/extio/voltage=1.8V" --duration 5 --frequency 1000000 --signals i,v,p,0,1 test_jls2.jls
While the Joulescope UI 0.10.x will display the current, voltage, and power fields in a JLS v2 file, it will not display the additional GPI signals. You will need to use Joulescope UI 1.x to display these additional fields. You can find more info on Joulescope UI 1.x here.
To install the new pyjoulescope_driver when it is available (hopefully later today):
pip3 install -U pyjoulescope_driver
Please post and let me know if this works for you!