20180825a - Testing interleaved acqs for a tentative 128Msps

#!/usr/bin/python
import spidev
import RPi.GPIO as GPIO
import time
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import json
import time
from pyUn0 import *
%matplotlib inline
pyexiv2 does not exist on RPi
x = us_spi()
x.JSON["firmware_version"]="e_un0"
x.JSON["experiment"]["description"]="Testing if the lib works"
x.JSON["experiment"]["probe"]="piezo"
x.JSON["experiment"]["target"] = "a reflector few cms away"
x.JSON["V"]="48"
x.JSON["N"] = 1 # Experiment ID
x.init()                                    # Inits the FPGA

Curve = x.CreateDACCurve(300,900,True)[0]   # Sets the DAC, 50mV to 850mv
pyUn0.py:149: RuntimeWarning: This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.
  GPIO.setup(CS_FLASH,GPIO.OUT)


Reset GPIO 23 - Low 1s
Reset GPIO 23 - High 0.2s
spi.cshigh is False
spi mode is 1
spi maxspeed is 2000000hz
Setting up the DAC
x.JSON["N"] = 1
x.setMultiLines(True)                        # Multi lines acquisition    
x.setNLines(50)                            # Setting the number of lines
x.setMsps(0)                                 # Acquisition Freq
A = x.setTimings(200,100,2000,5000,105000)    # Settings the series of pulses
Remember to indicate how many lines
Number of lines: 50
Acquisition frequency set at 64.0 Msps
Pulse width: 200  ns --  0x14
Pulses delay: 300  ns --  0x1e
Poff: 2300  ns --  0x0 0xe6
Delay between: 5000 ns --  0x2 0x80
Acquisition length:  105000 ns --  0x34 0x80
setPulseTrain Lacq 105000
NAcq = 320000
x.JSON["data"] = x.doAcquisition()
x.JSON["N"] = x.JSON["N"] + 1
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
Took 60.78 seconds to transfer.
for 640002 transfers of data
20180825a-1.json: file saved.


results matching ""

    No results matching ""