I am using the Logic 2 Automation API (logic2-automation Python package) to run automated captures from a test script called via NI TestStand.
My setup:
- Device: Logic Pro 16
- Software: Logic 2
- Python package:
logic2-automation - OS: Windows 10
What I am doing:
I start a capture programmatically using:
import saleae.automation as saleae_automation
capture = logic.start_capture(
device_configuration=saleae_automation.LogicDeviceConfiguration(
enabled_analog_channels=[0, 1, 2, 5, 6, 7],
enabled_digital_channels=[3, 4],
analog_sample_rate=6_250,
digital_sample_rate=6_250_000,
digital_threshold_volts=1.2,
glitch_filters=,
),
capture_configuration=saleae_automation.CaptureConfiguration(
capture_mode=saleae_automation.TimedCaptureMode(
duration_seconds=10.0
)
)
)
capture.wait()
capture.save_capture(filepath=“C:\captures\capture_cycle_00001.sal”)
capture.close()
The problem:
When I open the saved .sal file in Logic 2, the channel names show as generic labels:
But I want them to show as:
What I already tried:
-
Renaming channels manually in the Logic 2 UI — the names show correctly in the live UI session but when start_capture() is called via automation it opens a new blank session that ignores the UI channel names. -
Tried capture.rename_channel() — this method does not exist in the logic2-automation API and throws AttributeError: 'Capture' object has no attribute 'rename_channel'. -
Tried loading a template .sal file with logic.load_capture() before starting the capture — but start_capture() still opens a new blank session ignoring the template.
My question:
Is there any way to:
Set or rename channel names via the automation API before or after capture?Or load a device configuration that includes channel names so they persist into automated captures?Or any other workaround to get correct channel names in .sal files saved via automation?
We need the channel names to be correct so engineers can open any .sal file and immediately identify the signals without manually renaming 8 channels each time.
Any help appreciated. Thank you!
Environment:
Logic 2 version : latestlogic2-automation : latest (pip install logic2-automation)Python : 3.10.11OS : Windows 10Device : Logic Pro 16