Hi, I am using the code on the website liquid instruments for basic datalogger.
I use moku:lab and the error is: Exception occured: time_to_end.
Here is the link to the code: Examples for Python | Moku API
I ist worth to say, that I didn’t change anything in this code and it’s showing an error on my system.
Hi @Saman
Yes, there have been some changes to the logging_progress
response. I would recommend using the 'complete'
field
complete = False
while not complete:
# Wait for the logging session to progress by sleeping 0.5sec
time.sleep(0.5)
# Get current progress
progress = i.logging_progress()
complete = progress['complete']
The examples and API reference will be updated later this week
Thanks Nadia, I get no more errors. But I still see no data saved in the .LI file stored in the local directory.(the code downloads file with 1KB). I also need to say, that no external cable is connected from the output to the input.
best
Saman
Hi @Saman
The download target will depend on the hardware you are using, the example is for Moku:Go, you can read more about it here File Transfer | Moku API, I’ve also written a short summary with examples below that should help.
Log files downloaded from persist (Moku:Go), media (Moku:Lab) or ssd (Moku:Pro) will be in *.li format, which can then be converted to *.csv, *.mat, or *.npy using LI File Converter.
# For Moku:Go
i.download("persist", logFile['file_name'], os.path.join(os.getcwd(), logFile['file_name'])
# For Moku:Lab
i.download("media", logFile['file_name'], os.path.join(os.getcwd(), logFile['file_name'])
# For Moku:Pro
i.download("ssd", logFile['file_name'], os.path.join(os.getcwd(), logFile['file_name'])