Skip to content

NA500: trigger a TTL pulse on the BNC output - #23

Merged
cboulay merged 3 commits into
masterfrom
cboulay/na500-bnc-output
Nov 8, 2026
Merged

cboulay merged 3 commits into
masterfrom
cboulay/na500-bnc-output

Conversation

@cboulay

@cboulay cboulay commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • EGIAmpClient::triggerBncOut(widthUs) fires one TTL pulse on the GES 500's BNC output: manual mode (cmd_SetBncOutMode 1), pulse width (100–1600 µs, the range Net Station offers), then cmd_SetTriggerBncManualOut. Mode and width are sent once per connection, so a trigger normally costs one command round trip.
  • GUI: new BNC Trigger button (1 ms pulse), enabled while linked to an NA500.
  • Mock (--amp-type NA500): accepts the BNC-out commands, logs each pulse, and loops it back to the BNC input so it shows up in the _DIN stream.
  • AmpServerConnection::sendCommand is now serialized (UI thread and impedance scan thread can send concurrently).
  • Fix: GUI Unlink left Shutdown Amp Server disabled and the impedance checkbox enabled.

Test plan

  • GES 500 (fw 0.4.9), BNC out cabled to BNC in: 0 BNC-in events in 10 s without triggers; 30 triggers → exactly 30 events, each within ±1 ms of the command
  • Same check against the NA500 mock
  • GUI BNC Trigger button tested by hand
  • Pulse measured with a USB-1608FS-Plus at 100 kHz: 0 to 5.0 V, 30/30 pulses, width about 6.7% (16/15) longer than set at every setting from 100 to 1600 µs (documented; the app sends the width as is, like Net Station)

🤖 Generated with Claude Code

EGIAmpClient::triggerBncOut(widthUs) puts the NA500's BNC output in manual
mode (cmd_SetBncOutMode 1), sets the pulse width (100-1600 us, the range Net
Station offers) and fires it with cmd_SetTriggerBncManualOut. Mode and width
are sent once per connection, so a trigger normally costs one command round
trip. The GUI gets a "BNC Trigger" button (1 ms pulse), enabled while linked
to an NA500.

AmpServerConnection::sendCommand is now serialized: the UI thread and the
impedance scan thread can send commands concurrently.

The NA500 mock accepts the BNC-out commands, logs each pulse, and loops it
back to its BNC input so it appears in the _DIN stream.

Also fixes Unlink in the GUI leaving "Shutdown Amp Server" disabled and the
impedance checkbox enabled.

Verified on a GES 500 (fw 0.4.9) with BNC out cabled to BNC in: 0 BNC-in
events in 10 s without triggers; 30 triggers produced exactly 30 events,
each within +/-1 ms of the command.

Co-Authored-By: Claude <noreply@anthropic.com>
@cboulay
cboulay added this pull request to stack #25 November 7, 2026 23:12
cboulay and others added 2 commits November 7, 2026 18:39
GitHub no longer runs the macos-14 image ("The configuration
'macos-14-arm64-us-default' is not supported").

Co-Authored-By: Claude <noreply@anthropic.com>
0 to 5.0 V, about 6.7% (16/15) longer than the set width, measured with a
USB-1608FS-Plus at 100 kHz on a GES 500 (fw 0.4.9).

Co-Authored-By: Claude <noreply@anthropic.com>
@cboulay
cboulay merged commit 3eff2d0 into master Nov 8, 2026
6 checks passed
@cboulay
cboulay deleted the cboulay/na500-bnc-output branch November 8, 2026 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant