salaestart.exe [ -port <port> ] [ -delay <ms> ]
<port> Port number configured in the Salae software (omit for default)
<ms> Number of milliseconds to wait before commencing the capture (omit for none)
Immediately trigger a new capture in an existing Salae Logic window
salaestart.exe -delay 5000
Trigger a new capture after five seconds
powershell Start-Process -FilePath “C:\Tools\salaestart.exe” -ArgumentList '-delay 5000’
Trigger a new capture after five seconds, without blocking subsequent script commands or build steps (for IDE’s like Atmel Studio 7).
The link above includes a single-file Windows binary and full C# source code. It would probably be straightforward to port this to Linux or other platforms. If you’re still on XP, you’ll need Microsoft .NET Framework 4.5.
I have an embedded programming workflow that automatically builds my firmware and uploads it to my microcontroller when I hit a button in the IDE. I got tired of manually hitting the Start button each time to take a new capture and see the latest results.
So I wrote this simple command-line program that invokes the Salae Socket API C# Wrapper to trigger a new capture (more API docs here). You need to open Salae Logic first and set up your capture, but after that the existing application instance and capture tab are reused.
Be sure to enable the scripting socket server in the Logic application (under Options | Preferences | Developer):
After writing this I found out Salae has a simple Python script that does something similar. Apparently it can be used like this:
python saleae_cli.py --capture-count 5 --capture-duration 0.1
I kept this post up anyway, for other Windows luddites who don’t want to wade into Python.