5

Automation API - Execute automation script on pre-existing session


M
Matt

I'd like a way to trigger a 'start' command in the app through the API, without changing the session settings.

I often use the Saleae logic analyzer for interactively debugging a program. The original API was great for this because I could manually tweak settings in the app, run a script that triggers a capture using the existing session settings, then view the results directly in the app, and rapidly iterate with different settings. With the new API, there doesn't appear to be a way to attach to an existing session, and the capture configurations are not geared towards the GUI. For instance, names cannot be assigned to a channel, and graph size/zoom cannot be set. It would be great if there was a way to just start a capture with the current session settings, like in the old API.

A

Activity Newest / Oldest

Avatar

Tim

discuss.saleae.com/t/automatization-changing-label/1955/12
"if I could just use the settings from the current session, that would be awesome. Use case is that I have already configured things manually and run a few times, now just want to automate running the same test over night, saving data after each trigger."


Avatar

Tim

(#86367)
"i am trying to automate the logic analyser logging. i would like to pause and resume the logging in the same session. now i use the methods start and stop which opens new session of log every time."


Avatar

Tim

discuss.saleae.com/t/starting-capture-using-script/2697
"I am using Logic 2 during development of a product. In order to get certain functionality working in hardware, I frequently follow a sequence of operations like this:

Reset an embedded device
Press “Start capture” in Logic 2
Run some shell commands that produce certain stimuli
Press “Stop capture” in Logic 2
Look at captured data to figure out what’s going on
While step 5 is inherently manual, step 1 through 4 are purely repetitive and a prime target for automation. Steps 1 and 3 are easily accomplished using a simple shell script, but I have so far not found a way to start and stop a capture in Logic 2. The Logic 2 automation API seems to only be designed for headless/automated capture without a human looking at the data, and can’t simply start a capture in an existing tab. Is there any known workaround for this?"


Avatar

Tim

(#82109)
"It might be easier for me to just use the GUI to do my setup, and then just before I start_capture, retrieve what I have done in the GUI -- OR -- be able to specify a start_capture with NO capture configuration, such as:

with manager.start_capture(device_configuration = device_configuration) as capture:

and the automation just uses what the GUI has."


Avatar

Tim

(#81465)
"Can the Automation API be used in combination with normal GUI use of Logic 2? In other words, can I run Logic 2 as I usually do, then when I’m happy with the capture etc, call the Automation API to offload data?"


Avatar

Tim

(#80369)
"I have the Python API working pretty well in one script. I was wondering if it is possible to have python scripts that just connect/disconnect and just start/stop recording. Or if these all need to be bundled into one specific python file."


Avatar

Tim

Title edited to encapsulate more use cases


Avatar

Tim

(#78303)
"We are running in a semi automated way. For example, we perform a test shot that automates several different lab equipment and then starts the saleae capture. At the end of that test shot, we want to view the data before moving to the next test shot.

So before moving to the next test shot, we want to view the data which is coming from different sources (different channels) and some windows needs to be fitted.
---
Our current program does the following:
1. Starts captures
2. Waits for capture to complete
3. Save capture
4. Close and move on to the next shot (user initiated)

What we would like is before we save the capture, or after it saves it, we want to call the API to resize a specific channel so that we can view it."


Avatar

Tim

(#77791)
"I didn't know if there was an API call I was missing that would allow me to attach to an existing session, configure the logic analyzer as required, start the recording and then detach from the session without closing it."


Avatar

Tim

Same request here via Twitter:
twitter.com/cibomahto/status/1612949819655430144