#!/bin/bash

# Initialise the WR2RF cards and connect to WR switch
sh wr2rf_init.sh 2
sh wr2rf_init.sh 4

# Configure the Trigger Units: TU1 frev/orbit, TU2 Bunch clk or divide RF by 5
#sh vtu_setup.sh 2
sh vtu_setup.sh 4

# Enable RF diagnostics
./wr2rf -s 2 rf-diag 1 en 50ms
./wr2rf -s 2 rf-diag 2 en 50ms
./wr2rf -s 4 rf-diag 1 en 50ms
./wr2rf -s 4 rf-diag 2 en 50ms

# Send a FTW to create an RF @ 200 MHz, and reset the RFNCO
./wr2rf -s 2 ftw-send1 reset
#./wr2rf -s 4 ftw-send1 reset

# Just one WR2RF card (slot4), on both channels, should now be producing:
# - an RF signal of 200 MHz
# - TU1 = 43 kHz
# - TU2 = 40 MHz
