I love that I can write simple python script for measurement and protocol analyzers.
I hate that I can’t create “virtual channel and plot on it”. Also hate that I can not combime multple channels in one virtual using arithmetic or logic operators.
Anyway. My idea is to create plot is python and update it “online”. easy… no!!
Logic2 uses its own (not system installed) python3 (currently 3.8) and does not use packages that are installed on system, so matplotlib which I have and use is unavaliable.
I’ve tryed to search for this python internal instalation and install additional library by hand but its wrapped in python38.zip which is in /tmp/.mount-something/ that is mounted read-only.
- Is there a way that I could add external libraries to this instalation? - then second question is not needed
- Maybe you could add plotting library until there is a way to plot included internally?
- Is there any other method that I can try to plot results online?
For example: I have analog values from sensors that are read by SPI analyzer. How to create plot of it without need of: “Export data to txt/csv” -> parse exported file to something usable -> load data to plotting software (gnuplot, LibreOffice Calc whatever…)
Thanks for any advice.
See https://ideas.saleae.com/b/feature-requests/turn-pwm-metrics-into-additional-channel/ and the list of other Ideas topics linked from that topic for previous discussion of using HLAs to merge and create channel data. We have beaten Saleae pretty well with this club and I think the bruises are speaking to them.
:)) Yes, I’ve seen that discussion before. As I understand, they are planning to include such functionality as creating virtual channels. But not yet.
I need solution now So the basic question is:
Is there a chance that I can include external python package to their closed distribution?
Haven’t found solution yet.
@laski.maciej Unfortunately, we don’t have an external SDK or Python package to add help users add this specific feature themselves. We hear the need for this feature from many of our users, and so, we’re keeping a close eye on this in the meantime!
See this: Serial monitor window
Package installation to Saleae’s Python is not so easy but not impossible. This post covers it briefly.
In this post I stream the data from HLA to my own pipe listener, and from the pipe listener to a virtual com port. You can do further math operations (arithmetic or logic) on the pipe listener just before sending your data to the com port. After redirecting the data to the com port, you can use apps like SerialPlot or any other software to visualize your data. Or you can also visualize your data right in the pipe listener C# app without even sending the data to any com port, it’s up to you.
I wish this feature were already implemented in the original software but not and I don’t see it coming in a near future
You nailed it ;). Love this solution. I can pipe whatever I want to any software I need. Just implement on linux and we’re good to go. Will keep you posted.
Great! Furthermore, I have two settings in my HLA, one being “Prefix” and other being “Pipe Name”.
pipe_name = StringSetting()
prefix = StringSetting()
Each channel is given a unique prefix and sends the data concatenated with prefix as below so that the pipe listener can distinguish the data coming from multiple channels:
def pipe_stream(self, data):
pipe = win32file.CreateFile("\\\\.\\pipe\\" + self.pipe_name,
0, None,win32file.OPEN_EXISTING,0, None)
data = self.prefix + data
some_data = data.encode('ascii')