Skip to content

Commit eac6bc7

Browse files
committed
Update cluster example
1 parent 2559d36 commit eac6bc7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/examples/julia/cluster.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ rpc = RedPitayaCluster([URLs[1], URLs[2]])
1010
serverMode!(rpc, CONFIGURATION)
1111

1212
dec = 32
13-
modulus = 12500
13+
modulus = 12480
1414
base_frequency = 125000000
1515
samples_per_period = div(modulus, dec)
1616
periods_per_frame = 2
1717

1818
decimation!(rpc, dec)
19-
samplesPerpceriod!(rpc, samples_per_period)
19+
samplesPerPeriod!(rpc, samples_per_period)
2020
periodsPerFrame!(rpc, periods_per_frame)
2121
# In a cluster setting RedPitayas should listen to the external triggered
2222
triggerMode!(rpc, EXTERNAL)
@@ -34,7 +34,7 @@ amplitudeDAC!(rpc, 3, 1, 0.8)
3434
phaseDAC!(rpc, 1, 1, 0.0)
3535
phaseDAC!(rpc, 3, 1, pi)
3636

37-
serverMode!(rpc, MEASUREMENT)
37+
serverMode!(rpc, ACQUISITION)
3838
masterTrigger!(rpc, true)
3939

4040
uFirstPeriod = readFrames(rpc, 0, 1)
@@ -50,6 +50,7 @@ subplot(2, 1, 1)
5050
plot(vec(uFirstPeriod[:,1,:,:]))
5151
plot(vec(uFirstPeriod[:,3,:,:]))
5252
legend(("Channel 1", "Channel 3"))
53+
subplot(2, 1, 2)
5354
plot(vec(uCurrentPeriod[:,1,:,:]))
5455
plot(vec(uCurrentPeriod[:,3,:,:]))
5556
legend(("Channel 1", "Channel 3"))

0 commit comments

Comments
 (0)