81

Application / Automation API


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

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


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.


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.


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.


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.


  • 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?"


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."


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."


  • 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!!!


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!"


S

Stephen

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


M

Mitch

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


A

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


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
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