[Python API] Channel naming

Hey again (:slight_smile:
Is there an option to re-name channels for the captured recording ?
(even better if it would be possible to set it before starting the capture).

if not, are there any plans for future versions ?

@itay.work94 Great question. Unfortunately, it doesn’t look like channel naming is available via our Automation API.
https://saleae.github.io/logic2-automation/automation.html

I’ll bring this idea up directly with our software team here. I think this is great. Right now, you’ll have to manually edit the channel names before running your automation script.

Out of curiousity, were you mostly looking to take advantage of channel naming for raw data exports, or for something else?

Hello :slight_smile:

Is there an update for channel naming using API 2 ?

Thanks!

@pawel Thanks for following up on this. Unfortunately, we don’t have any updates to share. We did however log this idea internally, as well as publicly below:

Can you help describe your particular use case for this feature? We’d love to know more about your automated testing requirements surrounding this feature request. At the very least, I’d like to make sure that information is logged in the feature request post above so we can keep it in mind, and to help with prioritization.

Thanks Tim for quick reply!

The first thing which I do when I use Logic 2 app is to name channels inside app to match net names of connected signals as they are used in schematic - for readability purposes.
For example if I have 16 signals connected to Logic 16, when I analyze signals, “RTC_INT” name is much more informative than “Channel 0”. API 2 prevents me to provide my own names and I’m little surprised that such basic feature is not implemented to be honest.

What’s more - is there a way to set analyzers (e.g. Async Serial) BEFORE capture starts? So that during capture, all analyzers will do their job of decoding data during capture and not after capture ends and is saved.
My scenario is that I have to capture really long (days) of data which is impossible to do without having hundreds of GBs of RAM using regular app (I omit the fact that analyzing such long capture would be a nightmare). Currently I’m capturing 5h of data, when it stops, I apply analyzers (16 of them) and because decoding takes some time - it delays unnecessarily starting new capture (so for longer period of time data is not being captured). I’m basing on this example - Getting Started — Saleae 1.0.6 documentation

Also: is it possible to set order of channels using API 2? In app I can move for example D15 channel to be the first which is displayed (just below "File/Edit/Capture/Measure/View/Help bar). Use case is pretty simple - sometimes where 16 signals are connected it’s easier to manipulate channels using their order in app/API than to physically change their connections.

Thanks!

@pawel Thanks for the added details! Your use case makes a lot of sense. I’ve added some more notes about it in the feature request post I linked previously.

This is unfortunately not possible at the moment. The analyzer must be added before the capture to use that functionality. I’ll check with the team here to see if there might be a workaround for your particular case below.

This is unfortunately not possible right now either. I’ve added a note about your request in the feature request post below.

@pawel Sorry you hadn’t heard back from me yet on the below.

The workaround for now might be to not add the analyzer during automation to minimize the delay between captures. You’ll need to add the analyzer at the time of reviewing your capture file however, though I could see how this isn’t ideal. I still have the action of checking with the software team if there is a workaround which will stil allow you to add analyzers during your automation script, while also minimizing downtime between captures.

1 Like

Thank you Tim for update - applying analyzers after capture is an option but it would be perfect to have possibility to apply them before starting new capture.

Another thing - is it possible to apply analyzer using API 2 and set how data should be displayed (I mean “Binary” or “Decimal” or Hexadecimal" or “Ascii”)? It seems that it defaults to “Ascii”.

Do you know Tim what is possible timeframe for Saleae to update API to have features (at least some) which we discussed in this topic? Original question was posted ~9 months ago…

Hi @pawel , thanks for the feedback and I’m sorry we can’t ship this sooner. The Saleae team is tiny (3 SW developers, including myself), so we generally can only focus on one area of the application at a time. I don’t have an estimate on when we will get back to working on the API at the moment.

We do want to open up the API to more or less allow you to control all areas of the application, in the same way you can manually.

In the meantime, for your analyzer needs, the API does support calls from multiple threads. You can for example add analyzers, save, export, and close a capture while the next capture is recording. This should keep the inter-capture gaps very short. Details here:

With the current API this is only possible when exporting analyzer results. The functions export_data_table and legacy_export_analyzer support it. Details here:
https://saleae.github.io/logic2-automation/automation.html#datatableexportconfiguration

1 Like

Sorry Mark for my late response and thank you for clean explanation for current API/development status.
It’s a pity that currently you don’t have enough resources to develop more API 2 features - but I hope that this will improve in near future :slightly_smiling_face:

I’ve checked link which you provided and it works excellent - the gap between ending old capture and starting new one is <1s :smile:

Hi @timreyes Tim, is it still not possible to change the labels?

@albert.caba That’s correct. This is currently not possible yet.

@timreyes : I really need to set channel names for capture instead of “Digital 0” as this does not convey any meaning when I send the capture for analysis. Is there some kind of a workaround that I can use to get this feature? This is a very basic feature that should have been provided.

1 Like

I agree, it’s been more than two years for this simple feature to be implemented and nothing, so makes me wonder what a mess of code there is, so even easy features like this cannot be implemented. Nothing is ever implemented on the automation side , I don’t get it

What is irritating is that this so called “feature” is supposed to be the most basic and should be included in the first iteration itself. I am even surprised by the fact that a “usecase” for the feature is asked. I mean WTF!

Every reply for such requests comes with a “we have only 2 people working”. I don’t understand how that is my problem. The LA is definitely not cheap and looks more on the overpriced side and the expectation is the SW coming with the HW is decent. If the software is a mess open up the HW so that it can be used with 3rd party analysis software like Sigrok or something instead of the hacks.

I wasted my time trying to get this Automation API working only to find that there is no channel naming. Sigh!

@gautam.nbhat @albert.caba -

It looks like a suggestion was made by a community member on your forum post below.

Our end goal as Mark mentioned previously is to open up our Automation API to allow for controlling all aspects of the software available in the GUI. As you’ve brought up, we’re unfortunately not there yet, and I completely understand your frustration regarding not having an update on this topic since then. We’ve been heads down on some high priority projects for quite some time and the short answer is that we simply haven’t been able to prioritize working towards this goal because of it.

Hello!

I have just spent longer than necessary looking for an API (official and/or unofficial) for renaming the channels prior to an automatic data capture + csv export job.

Is there really no such API? It seems like a rather trivial thing to implement since it already is possible to rename the channels via the GUI (my current workaround - but it is hard to ensure that everyone names the channels correctly for additional postprocessing down the line).

Any idea to when/if this will be implemented? Are we talking weeks/months or years into the future?

Best regards,
Henrik Fritzon

@henrikfritzonsund Thanks for letting us know your need for that. We unfortunately don’t have a timeline as to when we would be able to get to this, however, you’re certainly right that we’re long overdue on getting this implemented.

We’re currently in the middle of a big project and, as such, we don’t have a good estimate as to when we would be able to implement this just yet.

Hi @itay.work94, @pawel, @gautam.nbhat, @albert.caba and anyone else interested –

Try out this python script:

You could embed the function sal_rename_channels() within your Automation API python script, or call this script separately as a standalone program.

Note: I’m still quite new to python, so any feedback is quite welcome :slight_smile:

PS: This is based on a concept discussed in another thread:

… and as I wanted to explore python a bit more, I finally tried it out myself.