163

Application / Automation API

  • Held for moderation
  • Live

S
Saleae

Add an API to interact with the app and the device without using the GUI directly.

This was supported in Logic 1 Socket API

A

Activity Newest / Oldest

M

Mark

It's out now! The latest software release, 2.4.0, contains the 1.0.0 production release of the Logic 2 automation API.
Thanks to everyone in the community who provided feedback and insight into their applications, it's helped a lot!
Learn more (includes links to documentation)
www.saleae.com/automation/
Logic 2 2.4.0 post:
discuss.saleae.com/t/logic-2-4-0/1825


  • A
M

Mark

The first pre-release version of the Logic 2 automation interface is available now!
Details on the release:
discuss.saleae.com/t/saleae-logic-2-automation-api/1685
Documentation, and python library download:
saleae.github.io/logic2-automation/index.html
Note - this is still pre-release, and we intend to make breaking changes to the interface before it is ready for production use.
We would love to get your feedback!


N

Neel

Status changed to: Live

M

Mark

Hello everyone! We're building the automation interface for Logic 2 right now, and would love to get your feedback! You can find more information, including python examples, here: discuss.saleae.com/t/saleae-logic-2-automation-api/1685


  • M
M

Mark

Status changed to: In progress

Avatar

Tim

(#73568)
"Is there a way to query the device serial as well as the calibration state (if a factory calibration file was successfully downloaded and applied) via the Socket API?

Or as an alternative, is there a way to apply a calibration file via the Socket API?"


Avatar

Tim

ideas.saleae.com/b/feature-requests/read-measurement-and-extensions-via-socket-api/
"Read Measurement (and Extensions) via Socket API
It would be very useful to be able to access common measurement (1.x) and measurement extension (2.x) parameters via the socket API. File I/O is a bottleneck and it would be great to avoid writing then reading and post-processing data for simple things like peak-to-peak or dBV analog measurement (extension for dBV conversion via the flexible python extension capabilities in 2.x)."


Avatar

Tim

discuss.saleae.com/t/some-2-x-nits/1524
"In my case, I was doing some post-processing of various DVT scenarios.

Reset the target
Start a capture
Launch a python script
Wait for script to exit
Stop capture,
export CSV
Repeat above with different arguments to our test scripts. Then take the CSVs and drop them into a spreadsheet or post-process using python/matplotlib. It would be nice to name the export according to the arguments of my test script. That’s what I ended up doing; I’d alt-tab switch to my terminal window and 'mv digital.csv foo-test_200hz_6ms_10k"

Now that I see this: GitHub - saleae/python-saleae-cli: basic command line utility to automate the Saleae Logic software using the ppannuto python-saleae library

I realize that would probably be a better way to deal with my situation."


J

Jörg

Hello, when will the automation API be available? We are waiting more than a year for this feature.
Please name a fix date for a first version, including an API.
The older version of logic-software is no longer supported of your team, therefor the availability of the API in V2 is a must have!
(Otherwise we would have to buy another tool for our test benches.)


Avatar

Tim

The older Logic 1.x software will continue to work with our Logic Gen2 hardware, including the newly updated rev 3.0.0 hardware that we recently released. More information on our newer hardware revisions can be found in the link below:
support.saleae.com/datasheets-and-specifications/logic-hardware-revisions

We recently released Logic software legacy version 1.2.40. This version of the software is compatible with rev 3.0.0 hardware and continues to support our automation API:
support.saleae.com/logic-software/legacy-software/older-software-releases

Sorry again we don't have a release date planned yet for automation in the Logic 2 app.


Avatar

Tim

discuss.saleae.com/t/scripting-socket-api/108/9
"I think the comment in that feature request from #67608 captures it: we are basically hunting for rare undesirable behavior and need to record on trigger for hours or days, preferably capturing all instances of the issue. The script API lets us trigger, record for a reasonable period of time, and then resume waiting for another trigger. It’s simply too data heavy to do logs for this long most of the time, considering most of the time is spent waiting for triggers.

Said another way, I’d say these devices are fundamentally used for two purposes:

development: sitting in front of hardware that’s supposed to behave in a certain way, testing that it does, and fixing it when it doesn’t
debugging: waiting seconds, minutes, hours, days, weeks, etc for a situation to occur and gathering as much information as possible from the hardware signals to figure out what the issue is, whether that is hardware, firmware, or something else.
While we spend more time using this in development, debugging is where a tool like this can save a ton of money and pay itself off many times over. Without scripting, your product only solves the development use case. With scripting, it solves both. You definitely have a sense of this given the scripting available on 1.x software, so we encourage you to consider this a required feature for 2.x and all releases going forward. It’d actually be better if this capability was built into the app GUI, but we don’t mind scripting at all if the hooks are there in the API.

Mostly unrelated: it’d be great if you could trigger on more than one line at the same time, whichever comes first."


M

Mohan Jalla

I agree with the comments; this is a must-needed update for automation. I think saleae should release the automation API and the regular software updates at once.


Avatar

Tim

(#67608)
"1. Automation is a crucial for us to capture data with the Saleae Logic Pros, and without automation the Logic Pros are of not much use for us.
2. We mainly use the Logic Pros to capture data of automated measurements that run over many hours/days; and usually these measurements involve some mechanical movements. So we need to be able to control the exact time when the capture starts/stops, when/where to export the data, the duration of the capture and the different settings of the digital/analog channels, etc..
3. Without being able to automate the above mentioned processes, we will not be able to further use the Logic Pros in our labs

Hopefully my answer would give you a clear picture of why we are sticking to Logic V1.x and not using V2.x. And please we would like to know if you have a clear time table of when and if automation will be added to Logic V2.x or any future releases."


Avatar

Tim

(#67355)
"Have way to capture parsed serial data for a long period of time. For instance, I would like to run an overnight test; however, I don't need the raw levels. I just need the output from the serial that can be saved to a CSV file for investigation. Thus, Logic could toss the live data once it has determined the serial interpretation in order to avoid running out of memory overnight."


M

Marcin

It would be highly appreciated to have Socket API available in Logic 2.x. We have started automation framework for our new product and want to employ few your devices to help in debugging. Looking at advantageous features of Logic 2.x over 1.0 we do not want to step back.


J

Justin

This is must have feature! Please add this soon.


T

Thiago

This is a must-have for the APP. Please add the API


M

Mark

I'd like to see this added to the V2 software.


  • Avatar
R

rudi

We are using the Saleae in our automated environment also, as this is super practical for capturing digital and analog signals. We control it from python. It is a main selling feature, so I do not understand why you guys do not put this feature on top of your priority list. It is a real showstopper if new devices would not even support this. We have a lot of installed base at our company.


  • Avatar
  • S
M

Marcus

The automation capabilities of 1.x are to few and restrictive to keep up with technological advancement in testing. It has been 2.5 years since an API for 2.x was requested. Please put this higher on your priority list. Thank you.


  • N
  • S
  • R
N

Nathaniel

This should be at the top of the feature list by now ...


  • R
  • N
A

any beta avail?


A

André

could also be interested in testing a beta!


Avatar

Tim

Unfortunately, we don't have a beta right now to test. We'll certainly post an update right away once something is ready.


V

Vasyl

We need this feature in the latest versoins because the "Unsupported Version" Error message and "Beta" are unacceptable in 1.2.29 version. (1.2.18 doen not support Logic Pro 16 USB Analyzer).
You must implement automation in the latest version!


  • N
Avatar

Tim

Sorry for the trouble with that... There is a workaround for the "Unsupported Version" error described below:
support.saleae.com/troubleshooting/unsupported-version

Also, 1.2.18 supports all of our logic analyzer models, including Logic Pro 16. Feel free to send me a message below if you're running into connection issues and I'll be happy to help:
contact.saleae.com/hc/en-us/requests/new


P

Phil

Another +1 from me. I have a test right now where I need to make device under test sleep for an hour, then wake and perform an action. I only want sampling during that small amount of time whilst doing the action.


  • N
P

Phil

All I currently need is a simple way to make sampling start and stop, not a full-blown API for channel programming and such.


  • N
E

Eric

Bump. Command-line scripting of capturing signals is super useful. The Logic 1 socket API did this, but poorly. It would be really nice to be able to script the Saleae Logic and would directly result in selling a lot more of them. I already use these a ton for development and advocate other people using them. Headless scripting them in CI test environments with Logic 1 via the Socket API is *very* bad though. The only way I was able to do it well was to script pressing buttons on the screen. Consider making automation a first-class citizen.


  • N
Avatar

Tim

(#64968)
"The feature I need the most is the scripting ability in the Logic 1 software. A new user interface and analysis tools is secondary for me."


  • N
Avatar

Tim

(#64454)
"Feature Request - Remote scripting server. It was possible with version 1.2.18 to set the Preference->Developer->Remote scripting server and select a socket server lisitinig port

This is not possible anymore and we cant use it in our Testenvironment. Is it possible to get this old feature again?"


  • N
C

Cagatay

Still no plans for the automation API?


  • N
  • S
Avatar

Tim

No plans to announce unfortunately. If automation is required in your application, our recommendation is to continue using our older Logic 1.x software in the meantime.


  • N
Avatar

Tim

(#64227)
"Do you have a release date for the socket API on Logic 2.0 ?
We are planning to use the saleae Pro16 for one of our project but the 1.2.29 version is instable with the socket API.

We hope the 2.0 version will offer more stability and more functionnalities (change channel name, acces directly the channels data, ....)"


  • N
Avatar

Tim

(#63568)
"Socket API automation utility requires the older Logic 1.x software: This means that we couldn’t use python Saleaelibraryforlogic 2.xv?"


  • N
Avatar

Tim

(#63137)
"As part of this effort, I'm writing a series of unit tests which are being integrated into a hardware test rack and run as part of CI. Everything needs to be automated, so I'm having to make due with the Logic 1.2.29 GUI along with several associated race conditions, configurability limitations, and other bugs in the interface. Further, this is a headless environment."


  • N
  • A
Avatar

Tim

(#62929)
"I would like Logic 2 software to automatically email a recipient to notify them that a capture has completed. Is there a way to do that, maybe with extensions or plugins?
...
The situation is that I need to run the Saleae pod remotely, so I won't know when a capture has occurred. And the event that will trigger the capture only happens once every couple days or so, so I won't be able to just babysit it."


  • N
  • M
Avatar

Tim

discuss.saleae.com/t/group-export-for-multiple-analyzers/1107/2
"Do you know when this will be implemented in Logic 2.x? "


  • N
N

Nathaniel

Socket automation, where art thou?


  • N
Avatar

Tim

discuss.saleae.com/t/linux-automation/1091
"Hi, on Linux app I’m not able to see the options to start the server for automation. Maybe is there a command line start for the server? Like ./Logic-2.3.31-master.AppImage -disablepopups -socket ?"


  • N
J

James

Bump on this! Automatically verifying signals on our boards is an essential part of our QA process.


  • N
Avatar

Tim

(#61924)
"Greetings, I am writing regarding the Automation API support for Logic 2. We are a team of 20 people performing automated tests. We had been using Logic 1.x for the Automations. We are using Logic 2.x and there are some features 1.x doesn't have. We are looking for a way to automate the Logic 2.x and I know it is not currently supported.

I wanted to check if the features is planned to be implemented any time soon. If so, Do we have a tentative timeline on when the feature would be available?"


  • N
Avatar

Tim

(#61454)
"It is a bit frustrating that you don't have any information on the release of the capture API (hopefully also in an improved version) in Logic 2.0."


  • N
Avatar

Tim

(#61628)
"Are you somehow planning, within the company, to add the automation feature also to Logic v.2? Would be nice to have it also there."


  • N
Avatar

Tim

(#61454)
"Additionally, I would like to stress the importance that you implement the data capture API on the Logic 2 software. This API should also be independent of the GUI-software (which today unnecessarily slows down repeated data capture on Logic 1.2.29)."


  • N
A

+1 for this feature. A command line front end, something like sigrok-cli sigrok.org/wiki/Sigrok-cli that would help a lot with automation


  • Avatar
  • N
C

Colin

Is there any timeline yet? All I read is we are planning it (for a year). I was under the impression this could be integrated into a CI/CD pipeline. Thanks


  • N
Avatar

Tim

No timeline yet. We internally discuss implementation ideas quite frequently. We just can't comfortably give a release date, especially since our team consists of only 3 software developers at the moment.


  • N
A

Andy

This is critical for us, we're having to use Logic 1 until this is re-implemented which is a shame because 2 is a great improvement other than this.


  • N
H

Harald

Logic 1 Socket API worked nice for my 1st automated measurement sequence (72 setups on 5 parameters, ~80 Mbyte analog CSV each -- no fun to do this manually;)

BUT: is there a way to disable that "export progress" popup box which always has the focus on the (only) "cancel" button ???

since those measurements took 2+ hours, I've been working in parallel, and whenever the export happened (80 MB csv export takes quite some time), typing ENTER or SPACE killed the export and I had to restart that measurements;-(

workaround for now: I'm using xterm and with CTRL-LeftMouseButton I can enable "Secure Keyboard" so that the keyboard focus is locked to that single xterm (e.g. for secure password input without spoofing), but that way I'm locked to a single terminal (not my usual desktop setup over hours;)

thanks for hints how to get rid of that "cancel"ing csv exports...
Harald


Avatar

Tim

I see what you mean. Sadly there's not way to remove the export dialog window in Logic 1.x. We have fixed this on Logic 2.x, since keyboard keys do not control the "Cancel" button, though this of course requires us to port over the Automation API to Logic 2.x to help in your case.

Right now, solutions like you've described (i.e. taking focus away from the main software window) seems to be best. Originally, we hadn't designed the automation API to be used in conjunction with a user continuing to use the same PC for other tasks. This brings up problems that you've mentioned, though this is certainly something we'll have to keep in mind when porting this over to Logic 2.x.


  • N
H

Harald

is there any alternative for now ?
e.g. can I run python commands within Logic 2.x which can trigger a sequence of measurements and export csv files for each ?


Avatar

Tim

Unfortunately, this feature is not yet available on Logic 2. We are seriously evaluating this though! We understand this is the most requested feature at the moment.


  • N
  • A
Avatar

Tim

(#60623)
"I have already found the idea ticket for the automation API for Logic 2, so I know it is a heavily requested feature and I would like to signal my support for it as well. I am using the exisiting API to process captured data after the fact, but I was wondering if there were any plans to include live data access with the new API.
With analyzers being restricted to the digital signals and having to modify each analyzer to get somewhat real time access the old API doesn't quite meet my needs.
Is there any information you could provide regarding the feasability or likelyhood of something like this making it into the new API or an approximate ETA of when it might be released?"


  • N
Avatar

Tim

(#60231)
"It's very unfortunate that the Logic 2 app does not have an automation API yet. What is the approximate ETA for an automation API for the Logic 2 app? Do you have any beta versions I might try? I use only very basic API calls since I use the Saleae as a simple capture device without any analysis or triggering."


  • N
Avatar

Tim

discuss.saleae.com/t/is-there-a-way-to-get-ack-when-the-capture-starts/1023/2
"To summarize, the C# API is essentially synchronous. You issue a command and must wait for the ACK/NAK reply before issuing another command. In particular, you should never issue a command while a capture is in progress.

It seems to me like this is a fault of Socket API, which doesn’t allow you to identify which reply is for which issued command (I’m guessing by looking at the code of the C# API), so I don’t see how this could be done without replying on implementation details and/or undefined behavior.

I understand that most users start the device manually and therefore get immediate feedback from the UI when the recordings start. However, I would like to stress that for the API, especially when working on test automation, getting an acknowledgement is cruicial - otherwise, all you’ve got left is the very questionable solution of waiting a fixed amount of time. So I must strongly emphasize the importance of the proposal Application / Automation API - Logic 2 - Ideas and Feature Requests - Saleae 1 and ask that a new Socket API for Logic2 be made that allows asynchronous communication and a way of determining if a capture is currently in progress."


  • N
  • A
J

Jörg

This feature is an absolut must-have. Without possibilities to automate the saleae logic or automate the datalogger the whole thing is no longer worth anything!!!


  • N
Avatar

Tim

(#59674)
"Is it possible to programmatically export .sal files to csv? I am aware that the Socket API is not yet available in Logic 2 but I am wondering if there is a way to process the .sal file independent of Logic 2 and convert it to csv?

We have a bunch of (large) .sal files saved and it takes an unnecessarily long and tedious time to individually/manually load and export them from the Logic 2 app.

By the way, I really hope that Socket API will find its way to Logic 2 soon!"


  • N
S

Stephen

please add me to the email notification once this feature is implemented.


  • N
M

Mitch

No Brainer. Must have feature, if you want to have the best analyzer on the market.


  • N
A

This is an absolute must-have! Please implement this.


  • N
S

Stephen

Please Saleae, this feature is a MUST have; used extensively to automate the collection of data under various test conditions. Scripting is a massive time saver


Avatar

Tim

(#57766)
"Hello! How can I enable remote scripting server on Logic 2 application? I know how to do it on 1.2.18 version, but can't find that option on version 2"


M

Michael

Absolutely! We have been heavily developing scripts to automate captures on our products, and would like to drop Saleae's into our CI/CD environment for captures of critical information on each build that we do. This will require this level of automation, and will result in more purchases as we grow our CI/CD system to include a Saleae on each station to capture and validate our systems. At 3x components per system all with several busses/captures, this will be a significant number of systems when we get all the infra built up and the automation API is critical for this.


D

David

An IP socket-based API would sure be nice. It would also allow people using RPi and other ARM processors to interface with Saleae. Who knows, someone outside of Saleae could even be the one to write a GUI display interface for ARM devices.


B

Benoît

agree, a must have


Avatar

Tim

(#58202)
"Feature Request - Remote control on socket like in 1.x - automatic logging"


W

William

The automation API was one of the main reasons we decided to use the saleae logic analyzers. It's SO useful. I really hope we get to see it soon in version 2!


  • Avatar
  • Avatar
  • Y
Y

Yigit

Same here. I am also excited to see automation with version 2.


Avatar

Tim

(#57894)
"We looking at v2.2.5. It has a lot of nice features that do not exist in v1.x.x. We look forward to you getting the scripting in version 2. It would go a long way with our automated testing."


C

Christophe

+1 this feature is also mandatory for us to switch from logic 1x to 2x since our continuous integration is based on this feature


  • A
Z

Zakaria

+1, This will be very helpful to build an automated validation tests.


  • W
Avatar

Tim

discuss.saleae.com/t/when-will-the-scripting-socket-be-added-to-logic-2/645/5?
"Hi All,

I also vote to increase the priority of this topic. We are also using socket API in our continuous integration system.
It is not possible for us (40 users) to switch to new Logic 2 without a remote control API.

BR"


Avatar

Tim

(#57569)
"I have one more question.
Is there a way I can do the following from a script (bourne, sh, ...) instead of running the Logic/Logic2 tool.
- Run Logic or Logic2
- Click Start or Start-Sim
- Export text or csv file with given $PATH/$FILENAME
- Kill Logic or Logic2"


Avatar

Tim

discuss.saleae.com/t/quadrature-encoder-analyser/877/6?
"When will the automation API be available with 2.x, I like the new version and would prefer not going back to 1.x?

I have almost exactly the same quadrature decoder use case as Matt so I’d like to externally control my Logic 16 via socket API to start the capture and export the data for each run, ideally also running a measurement automatically after each run."


J

Jason

Adding a vote, I would definitely use this.
You might also consider a standalone piece of software that would just act as a server to test/automation clients, so that it's not tied to UI/UX changes.


Avatar

Tim

See another discuss forum post related to this idea:
discuss.saleae.com/t/scripting-socket-api/108


Avatar

Tim

Hi, in Logic 1 it is not possible to fully configure Logic through the Socket API. We use many Saleaes in automated test setups. The tests are very diverse. Some require I2S, others SPI etc... Creating and configuring analyzers for example through the socket API is not possible in v1. We have been in contact long time about this but this feature got never implemented. Our workaround is to generate configuration files (after reverse engineering the configuration file format) and load these (through the socket API). Obviously this is a poor solution. Would it be possible to add this feature to the v2?


N

Neel

Status changed to: Open

S

Saleae

Status changed to: Under review

Avatar

Laurence Deschênes-Villeneuve

This would very useful for using a saleae device as a measurement tool on a CI worker in an embedded C code deployment pipeline. Pretty please?


  • Avatar
  • A
  • A
J

Jasper

The API was already there in the previous versions, so my work depends on it. This is actually not a vote to add the API, but to not remove it! ;)


  • S
S

Saleae

Logic 2 is completely new software. We're planning to add the API again in the future