20180831a - Trying a probe with linear transformator - Server

#!/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"]="f_un0"
x.JSON["experiment"]["description"]="Trying a probe with linear transformator"
x.JSON["experiment"]["probe"]="kretzaw145ba"
x.JSON["experiment"]["target"] = "spam"
x.JSON["V"]="74"
x.JSON["N"] = 1 # Experiment ID
x.init()                                    # Inits the FPGA
x.JSON["N"] = 1 
Curve = x.CreateDACCurve(200,500,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
Curve = x.CreateDACCurve(500,800,True)[0]
Setting up the DAC
x.setPeriodAcq(10000000)
Period between two acquisitions: 1000000 us -- 0xf 0x42 0x40





10000000
x.setMultiLines(True)                        # Multi lines acquisition    
x.setNLines(160)                            # Setting the number of lines
x.setMsps(3)                                 # Acquisition Freq
A = x.setTimings(200,100,7000,11000,205000)    # Settings the series of pulses
Remember to indicate how many lines
Number of lines: 160
Acquisition frequency set at 16.0 Msps
Pulse width: 200  ns --  0x14
Pulses delay: 300  ns --  0x1e
Poff: 7300  ns --  0x2 0xda
Delay between: 11000 ns --  0x5 0x80
Acquisition length:  205000 ns --  0x66 0x80
setPulseTrain Lacq 205000
NAcq = 496640
x.JSON["data"] = x.doAcquisition()
x.JSON["N"] = x.JSON["N"] + 1
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
Took 93.47 seconds to transfer.
for 993282 transfers of data
20180831a-6.json: file saved.


results matching ""

    No results matching ""