Hello, I’m using the python script – capture_jls.py file on JS220s – to capture the power profile for x amount of time - for automation. It is working OK and outputs the waveform in .jls format. Whenever I want to connect and capture data from 2 Joules using the same script, it gives me the following error:
device = scan_require_one(config=‘auto’)
File “C:\Users\szhaq\AppData\Roaming\Python\Python310\site-packages\joulescope\v1\driver.py”, line 124, in scan_require_one
raise RuntimeError(“multiple devices found”)
Is there a way to select a particular Joule when running the script or/and collect data from both Joules at the same time? How can I change the driver.py script?
I tried printing line 121 from driver.py script and this is the output but I still dont know how to change the script as its the same output for both devices:
Name: None
config auto
devices [<joulescope.v1.js110.DeviceJs110 object at 0x0000027298AA08B0>]
I totally forgot about capture_all.py, which shows how to use scan. However, capture_all It still records to JLS v1. For JS220, I now strongly recommend using JLS v2, which is just better, more flexible, and much faster to view & navigate in the UI.
A few questions:
Do you have any other requirements other than just recording data to a file?
Do you need synchronization between the captures from each JS220?
Thanks for your reply and confirmation. I used the capture_all.jls file and it works fine with both Joulescopes together
Answering to your questions below:
No other requirements, we want the jls file as well as a cvs file. I can convert the JLS file to CSV easily so no issues there.
We want both the joules to sync data at the same time and at the same sampling rate. I think I set the frequency to 1Mhz and they both are capturing data at that rate.
Nothing else as of now but if there’s something, Ill reach out to you.
Thanks so much for your help and prompt response. You guys have made a great device - cheers!
For (2), note that while the Joulescopes will capture at approximately the same rate (specified as ±25 ppm each, ±50 ppm combined worst case total), they will not start capturing at exactly the same time. If you are happy with the existing alignment, great!
We will add multiple, simultaneous Joulescope JS220 support to the UI, hopefully by early next year. Part of this work includes improved synchronization between multiple JS220’s.
If you need improved synchronization sooner, the best option is to drive a signal that indicates the region of interest into the INx general-purpose input of each JS220. You can even use a OUTx from one JS220 to drive both INx signals.
When I was using the capture.py script to get .jls output in a certain directory, after that I was running the following command in the same directory to convert JLS to CVS file and it worked fine:
This seems to not work with capture_all.py and it gives the following error:
File “C:\Users\szhaq\AppData\Roaming\Python\Python310\site-packages\joulescope_main_.py”, line 22, in
sys.exit(run())
File “C:\Users\szhaq\AppData\Roaming\Python\Python310\site-packages\joulescope\entry_points\runner.py”, line 105, in run
return args.func(args)
File “C:\Users\szhaq\AppData\Roaming\Python\Python310\site-packages\joulescope\entry_points\recording.py”, line 79, in on_cmd
r = DataReader().open(args.filename)
File “C:\Users\szhaq\AppData\Roaming\Python\Python310\site-packages\joulescope\data_recorder.py”, line 459, in open
self._fh = open(filehandle, ‘rb’)
FileNotFoundError: [Errno 2] No such file or directory: ‘test1_003512’