load_wrpg_stl

Usage
usage: load_wrpg_stl.py [-h] [--stl STL] [--trg TRG] [--shots SHOTS] uut

Positional Arguments

uut

uut

Named Arguments

--stl

stl file

Default: “none”

--trg

shot trigger: WrtdImmediate or WRTT

Default: “”WrtdImmediate”

--shots

run a series of shots, with immediate trigger

Default: 0

Outline:

configure and run White Rabbit Pulse Generator on uut

./load_wrpg_stl.py –stl=file uut

WRTD: White Rabbit Trigger Distribution WRTT: White Rabbit Time Trigger. WRPG: White Rabbit Pulse Generator

Ext-Trg -> WRTD -> WRTT -> WRPG

WRTD detects an external trigger input, snaps the TAI time, broadcasts a WRTD message for a short time in the future (50ms). When the specified TAI time is reached, all ACQ2106 units issue pulse WRTT We set up the WRPG to trigger on the WRTT

Full sequence:

  1. Activate package 99-custom_wrpg

    On the UUT

    mv /mnt/packages.opt/99-custom_wrpg* /mnt/packages
    sync;sync;reboot
    
  2. A standard ACQ2106_WR box boots with WRTD running

    We typically connect a 2Hz signal to the WRTD INPUT port. Check it’s running: 2Hz count on TRG.d0

  3. Actually, a free-running trigger is NOT helpful, stop it

    If you have active control of the WRTD INPUT, stop the signal Else, it’s easy to stop the WRTTD output by stopping the wrtd rx process

    nc localhost 4280
    ^T
    ^X
    

    Check that the 2Hz clock on TRG.d0 stops.

  4. Configure a transient capture to trigger on TRG.d0
    From cs-studio:

    Capture|Transient [DEFAULT POST] [setMode] ARM The ADC sits in ARM mode.

    Or use an external client program. Ensure that

    UUT:1:TRG=enable UUT:1:TRG:DX=d0 UUT:1:TRG:SENSE=rising

    Set a waterfall display:

    /usr/local/epics/scripts/set.AI.waterfall

  5. Configure the GPG to use TRG.d0

    ACQ400GPG.OPI | set GPG_TRG Or use an external client program. Ensure that UUT:0:GPG_TRG=enable UUT:0:GPG_TRG:DX=d0 UUT:0:GPG_TRG:SENSE=rising

  6. Load the STL, using this program

    ./load_wrpg_stl.py –stl=STL/ramp_1step_64samp.stl uut

  7. Enable the WRTD INPUT.

    ^X again on the 4280 session will allow the WRTT signal to restart.

    Both the GPG and the ADC will trigger on the next WRTT, and at the end of the shot you should see the preprogrammed pulse train.

Limits:

  1. Number of DO lines: 32 (Single DIO482 in Site 6)

  2. Time resolution: 1usec (clocks on WR 1MHz)

  3. Maximum number of states: 512

  4. Maximum delay per state: 2^24 = 16s

  5. Maximum theoretical delay: > 8192s with 1usec resolution.

In practise, we don’t expect delays > 600s.

load_stl_file(uut, stl_file)[source]
class SendsWrtd[source]

Bases: object

__init__(uut)[source]
class EnablesWrtt[source]

Bases: object

__init__(uut)[source]
tee_shots(args, uut, shot)[source]
run_wrpg(args)[source]
get_parser()[source]