Hi, i want to monitor current for 30 minutes and i want 1000 samples to recorded per second into a csv file. I have a JS220.
After some research i found that i need to run read_by_callback for such an operation.
I ran read_by_callback script as it is with no modification and i got certain logs getting printed into my terminal but i do not see and csv, jls or any kind of plot being generated. Below are the logs i am observing:
2024-01-03 17:45:14,693 INFO jsdrv open_ll(opt=0)
2024-01-03 17:45:14,694 INFO jsdrv device_open(u/js220/000796) \\?\usb#vid_16d0&pid_10ba#000796#{e27188c8-98ff-41de-be50-653324c6b19c}
2024-01-03 17:45:14,694 INFO jsdrv open(opt=0)
2024-01-03 17:45:14,694 INFO jsdrv bulk_in_stream_open 130
2024-01-03 17:45:14,694 INFO jsdrv bulk_in_initialize pipe_id=0x82
2024-01-03 17:45:14,694 INFO jsdrv MAXIMUM_TRANSFER_SIZE pipe_id=0x82 bytes=2097152
2024-01-03 17:45:14,695 INFO jsdrv port0 connect rsp
2024-01-03 17:45:14,695 INFO jsdrv JS220 app_id=3, FW=1.2.1, HW=1.0.0, FPGA=1.2.1, protocol=1.0.0
2024-01-03 17:45:14,695 INFO jsdrv publish to dev $ nul
2024-01-03 17:45:14,695 INFO jsdrv publish to dev c/!ping u32 1
2024-01-03 17:45:14,696 INFO jsdrv open complete
2024-01-03 17:45:14,696 INFO jsdrv on_sampling_frequency(2000000)
2024-01-03 17:45:14,702 INFO jsdrv publish to dev s/i/range/mode u8.R 4
2024-01-03 17:45:14,702 INFO jsdrv publish to dev s/v/range/select u8.R 0
2024-01-03 17:45:14,702 INFO jsdrv publish to dev s/v/range/mode u8.R 1
2024-01-03 17:45:14,706 INFO jsdrv publish to dev s/i/ctrl u8.R 1
2024-01-03 17:45:14,714 INFO jsdrv stream_in_port 21 initial synchronization: u32=0x1b62d841, u64=0x41b6281e7
2024-01-03 17:45:14,714 INFO jsdrv publish to dev s/v/ctrl u8.R 1
2024-01-03 17:45:14,718 INFO jsdrv stream_in_port 22 initial synchronization: u32=0x1b6319b7, u64=0x41b6281e7
2024-01-03 17:45:14,718 INFO jsdrv publish to dev s/i/range/ctrl u8.R 1
2024-01-03 17:45:14,722 INFO jsdrv stream_in_port 23 initial synchronization: u32=0x1b63303d, u64=0x41b6281e7
2024-01-03 17:45:14,722 INFO jsdrv stream_in_port 20 initial synchronization: u32=0x1b633c18, u64=0x41b6281e7
2024-01-03 17:45:14,722 INFO jsdrv publish to dev s/gpi/0/ctrl u8.R 1
2024-01-03 17:45:14,726 INFO jsdrv stream_in_port 24 initial synchronization: u32=0x1b6359a0, u64=0x41b6281e7
2024-01-03 17:45:14,728 INFO joulescope.v1.sample_buffer.current add -> auto clear
2024-01-03 17:45:14,728 INFO joulescope.v1.sample_buffer.current skip head=None, sample_id=8819665952, sample_id_orig=17639331905, sz=16254
2024-01-03 17:45:14,728 INFO jsdrv publish to dev s/gpi/1/ctrl u8.R 1
2024-01-03 17:45:14,733 INFO jsdrv stream_in_port 25 initial synchronization: u32=0x1b6388e0, u64=0x41b6281e7
2024-01-03 17:45:14,734 INFO joulescope.v1.sample_buffer.voltage add -> auto clear
2024-01-03 17:45:14,734 INFO joulescope.v1.sample_buffer.voltage skip head=None, sample_id=8819674331, sample_id_orig=17639348663, sz=16254
2024-01-03 17:45:14,737 INFO joulescope.v1.sample_buffer.power add -> auto clear
2024-01-03 17:45:14,738 INFO joulescope.v1.sample_buffer.power skip head=None, sample_id=8819677214, sample_id_orig=17639354429, sz=16332
2024-01-03 17:45:14,771 INFO joulescope.v1.sample_buffer.current_range add -> auto clear
2024-01-03 17:45:14,771 INFO joulescope.v1.sample_buffer.current_range skip head=None, sample_id=8819678732, sample_id_orig=17639357464, sz=100800
2024-01-03 17:45:14,777 INFO joulescope.v1.sample_buffer.gpi0 add -> auto clear
2024-01-03 17:45:14,777 INFO joulescope.v1.sample_buffer.gpi0 skip head=None, sample_id=8819682512, sample_id_orig=17639365024, sz=100800
2024-01-03 17:45:14,780 INFO joulescope.v1.sample_buffer.gpi1 add -> auto clear
2024-01-03 17:45:14,780 INFO joulescope.v1.sample_buffer.gpi1 skip head=None, sample_id=8819688560, sample_id_orig=17639377120, sz=100800
2024-01-03 17:45:15,779 INFO jsdrv publish to dev s/i/ctrl u8.R 0
2024-01-03 17:45:15,779 INFO jsdrv publish to dev s/v/ctrl u8.R 0
2024-01-03 17:45:15,780 INFO jsdrv publish to dev s/i/range/ctrl u8.R 0
2024-01-03 17:45:15,780 INFO jsdrv publish to dev s/gpi/0/ctrl u8.R 0
2024-01-03 17:45:15,780 INFO jsdrv publish to dev s/gpi/1/ctrl u8.R 0
2024-01-03 17:45:15,836 INFO jsdrv close
2024-01-03 17:45:15,836 INFO jsdrv device_close(u/js220/000796)
Memory usage: 39.8 MB
2024-01-03 17:45:15,837 INFO jsdrv bulk_in_finalize ep=0x82
found 0 NaN out of 1000000 samples (1.000 seconds)
2024-01-03 17:45:15,838 INFO jsdrv close
2024-01-03 17:45:15,838 INFO jsdrv jsdrv_finalize 00000220B63BAA30
2024-01-03 17:45:15,838 INFO jsdrv USB backend finalize
2024-01-03 17:45:15,838 INFO jsdrv JS220 USB upper-level thread done u/js220/000796
2024-01-03 17:45:15,839 INFO jsdrv finalize usb backend
2024-01-03 17:45:15,839 INFO jsdrv winusb backend finalize
2024-01-03 17:45:15,839 INFO jsdrv USB backend_thread done
2024-01-03 17:45:15,840 INFO jsdrv USB device_thread closing u/js220/000796
2024-01-03 17:45:15,840 INFO jsdrv device_close(u/js220/000796)
2024-01-03 17:45:15,840 INFO jsdrv USB device_thread closed u/js220/000796
Note: Running read_by_callback gave the following error:
Traceback (most recent call last):
File "c:\Users\SystemTest\Downloads\pyjoulescope_examples-main\bin\read_by_callback.py", line 20, in <module>
from joulescope_examples.plot_cal import plot_iv, print_stats
ModuleNotFoundError: No module named 'joulescope_examples'
so i moved the file one level up along side bin and joulescope_examples. Doing this resolved me the above error.