11using RedPitayaDAQServer
2- using PyPlot
2+ using CairoMakie
33
44# obtain the URL of the RedPitaya
55include (" config.jl" )
@@ -37,9 +37,8 @@ masterTrigger!(rp, true)
3737
3838uFirstPeriod = readFrames (rp, 0 , 6 )
3939
40-
41- fr = currentFrame (rp)
42- uCurrentPeriod = readFrames (rp, fr, 6 )
40+ sleep (0.5 )
41+ uCurrentPeriod = readFrames (rp, currentFrame (rp), 6 )
4342
4443# Start ramp down asynchronously
4544# Note that we might not see the actual ramping in this example, see seqRamping.jl for that
@@ -52,11 +51,10 @@ masterTrigger!(rp, false)
5251serverMode! (rp, CONFIGURATION)
5352enableRamping! (rp, 1 , false )
5453
55- figure (1 )
56- clf ()
5754# Frame dimensions are [samples, chan, periods, frames]
58- plot (vec (uCurrentPeriod[:,1 ,:,:]))
59- plot (vec (uFirstPeriod[:,1 ,:,:]))
60- plot (vec (uLastPeriod[:,1 ,:,:]))
61- legend ((" regular" , " start" , " end" ))
62- savefig (" images/asyncRamping.png" )
55+ plot = lines (vec (uCurrentPeriod[:,1 ,:,:]), label = " regular" )
56+ lines! (plot. axis, vec (uFirstPeriod[:,1 ,:,:]), label = " start" )
57+ lines! (plot. axis, vec (uLastPeriod[:,1 ,:,:]), label = " end" )
58+ axislegend (plot. axis)
59+ save (joinpath (@__DIR__ (), " images" , " asyncRamping.png" ), plot)
60+ plot
0 commit comments