I’m using Moku::Go and exited about this device.
I have a question about Datalogger instrument by Python API.
In the previous “pymoku” module, there were get_stream_data() which seems to be used for checking data in real time. But I couldn’t find any function to do it in the new “moku” module. Is this not available in the new version?
Or, I just want to design the realtime GUI which shows the graphs of input1/2 continuously whenever logging is on or off (started or stopped). The UI of the Datalogger in Moku App for Windows/Mac is perfect, and I want to make some python scripts that have similar user interfaces. Is this possible in the current API?
The moku-python equivalent is the get_data() function. This will return a a frame of data that is a time series of 1024 points for both Ch1 and Ch2. However, this function does not exist in all of our API instruments. The get_data() function does not exist in the Data Logger.
If you are trying to make a real-time GUI that essentially does what the Data Logger instrument in our software does then it may be a bit of a challenge even when using get_data(). The reason is because this get_data() does not continuously get, or log, data from the Moku’s inputs. It returns the frame of data when called, so the time between when you receive the data is dependent on the latency of your network since Moku is WiFi enabled. This can be reduced by using the USB-C cable, however, it is still not the same as logging the data first and then downloading it to your laptop.
If you are not concerned with each set of data coming in to be at a set rate and possibly missing some transient data points, then this implementation using get_data() should be fine for you to use. Please let me know if you have any other questions!
Thank you for your reply!
Sorry, typo in previous message: s/exited/excited/
So I should give up using moku library as I have to take data without missing for data logging, while missing is acceptable for GUI. If Datalogger and Oscilloscope.get_data() could be used at the same time, it will be no problem, but it’s not possible, is it?
Now I’m considering to use pymoku library. Is there any possible problems using old pymoku library for Moku:Go?
We are working on enabling Multi-Instrument Mode on the APIs, which would allow the Data Logger and Oscilloscope to be used at the same time, however this functionality is not available yet.
If you are using pymoku (Moku:Lab toolbox) then you may find this API reference page helpful. The get_realtime_data function always returns a new object at framerate (10Hz by default). The downsampled, low-latency nature of this data makes it particularly suitable for plotting in real time.
Please be aware that the pymoku toolbox does not work with Moku:Go or Moku:Pro. It is specifically for Moku:Lab. I hope this information was helpful for you and happy to answer any other questions about our APIs!
Kenny, since you brought up this feature of live streaming data using the APIs (which by the way is a much requested feature), I wanted to ask a few questions about how you are using it and what kind of specs you would need for your application. Our dev team peruses the forums as well and we often implement customer feedback and feature requests!
I am curious about what the end goal is for this python GUI you are making that can both stream data visually to the user and log data for later processing. How fast do you need the frames updated (1s, 1ms, 1us, etc.)? How many points of data do you need per frame? Will the GUI be triggered or do you want this to operate in “roll mode”?
Any extra information you can provide is extremely helpful and will improve Moku:Go in the future!