Skip to content

Commit

Permalink
Merge pull request #29 from Lightsaver7/master
Browse files Browse the repository at this point in the history
General update
  • Loading branch information
Lightsaver7 committed Apr 5, 2023
2 parents 10a658d + 7c687d4 commit 4035ffc
Show file tree
Hide file tree
Showing 27 changed files with 190 additions and 178 deletions.
57 changes: 26 additions & 31 deletions appsFeatures/examples/acqRF-exm1.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _trig_threshold_example:

Triggering with treshold on channel
###################################

Expand All @@ -7,11 +9,8 @@ Triggering with treshold on channel
Description
***********

This example shows how to acquire 16k samples of a signal on fast analog inputs. The signal will be acquired when the internal trigger condition is met. The time length of the acquired signal depends on the time scale of a buffer that can be set with a decimation factor. The decimations and time scales of a buffer are given in the |sample rate and decimation|. Voltage and frequency ranges depend on the Red Pitaya model. 

.. |sample rate and decimation| raw:: html
This example shows how to acquire 16k samples of a signal on fast analog inputs. The signal will be acquired when the internal trigger condition is met. The time length of the acquired signal depends on the time scale of a buffer that can be set with a decimation factor. The decimations and time scales of a buffer are given in the :ref:`sample rate and decimation <s_rate_and_dec>`. Voltage and frequency ranges depend on the Red Pitaya model. 

<a href="https://redpitaya.readthedocs.io/en/latest/appsFeatures/examples/acqRF-samp-and-dec.html#sampling-rate-and-decimations" target="_blank">table</a>

Required hardware
*****************
Expand Down Expand Up @@ -104,7 +103,7 @@ The code is written in MATLAB. In the code, we use SCPI commands and TCP client
end
end
% % WILL BE IMPLEMENTED IN FUTURE BETA
% % UNIFIED OS
% % wait for fill adc buffer
% while 1
% fill_state = writeread(RP,'ACQ:TRIG:FILL?')
Expand Down Expand Up @@ -200,7 +199,7 @@ The code is written in MATLAB. In the code, we use SCPI commands and TCP client
end
% % WILL BE IMPLEMENTED IN FUTURE BETA
% % UNIFIED OS
% % wait for fill adc buffer
% while 1
% fill_state = writeread(RP,'ACQ:TRIG:FILL?')
Expand Down Expand Up @@ -299,7 +298,7 @@ The code is written in MATLAB. In the code, we use SCPI commands and TCP client
end
end
% % WILL BE IMPLEMENTED IN FUTURE BETA
% % UNIFIED OS
% % wait for fill adc buffer
% while 1
% fill_state = writeread(RP,'ACQ:TRIG:FILL?')
Expand Down Expand Up @@ -394,7 +393,7 @@ The code is written in MATLAB. In the code, we use SCPI commands and TCP client
end
end
% % WILL BE IMPLEMENTED IN FUTURE BETA
% % UNIFIED OS
% % wait for fill adc buffer
% while 1
% fill_state = writeread(RP,'ACQ:TRIG:FILL?')
Expand Down Expand Up @@ -439,11 +438,7 @@ Code - C
.. note::

Although the C code examples don't require the use of the SCPI server, we have included them here to demonstrate how the same functionality can be achieved with different programming languages. 
Instructions on how to compile the code are |compiling and running C|.

.. |compiling and running C| raw:: html

<a href="https://redpitaya.readthedocs.io/en/latest/developerGuide/software/build/comC.html#compiling-and-running-c-applications" target="_blank">here</a>
Instructions on how to compile the code are :ref:`here <comC>`.

.. tabs::

Expand Down Expand Up @@ -505,7 +500,7 @@ Code - C
}
}
/* FUTURE BETA
/* UNIFIED OS
bool fillState = false;
while(!fillState){
rp_AcqGetBufferFillState(&fillState);
Expand Down Expand Up @@ -571,7 +566,7 @@ Code - C
}
}
/* FUTURE BETA
/* UNIFIED OS
bool fillState = false;
while(!fillState){
rp_AcqGetBufferFillState(&fillState);
Expand Down Expand Up @@ -608,7 +603,7 @@ Using just SCPI commands:

.. code-block:: python
#!/usr/bin/python3
#!/usr/bin/env python3
import sys
import redpitaya_scpi as scpi
Expand All @@ -631,7 +626,7 @@ Using just SCPI commands:
if rp_s.rx_txt() == 'TD':
break
## FUTURE BETA
## UNIFIED OS
# while 1:
# rp_s.tx_txt('ACQ:TRIG:FILL?')
# if rp_s.rx_txt() == '1':
Expand All @@ -650,7 +645,7 @@ Using just SCPI commands:

.. code-block:: python
#!/usr/bin/python3
#!/usr/bin/env python3
import sys
import redpitaya_scpi as scpi
Expand All @@ -674,7 +669,7 @@ Using just SCPI commands:
if rp_s.rx_txt() == 'TD':
break
## FUTURE BETA
## UNIFIED OS
# while 1:
# rp_s.tx_txt('ACQ:TRIG:FILL?')
# if rp_s.rx_txt() == '1':
Expand All @@ -693,7 +688,7 @@ Using just SCPI commands:

.. code-block:: python
#!/usr/bin/python3
#!/usr/bin/env python3
import sys
import redpitaya_scpi as scpi
Expand All @@ -717,7 +712,7 @@ Using just SCPI commands:
if rp_s.rx_txt() == 'TD':
break
## FUTURE BETA
## UNIFIED OS
# while 1:
# rp_s.tx_txt('ACQ:TRIG:FILL?')
# if rp_s.rx_txt() == '1':
Expand All @@ -736,7 +731,7 @@ Using just SCPI commands:

.. code-block:: python
#!/usr/bin/python3
#!/usr/bin/env python3
import sys
import redpitaya_scpi as scpi
Expand All @@ -761,7 +756,7 @@ Using just SCPI commands:
if rp_s.rx_txt() == 'TD':
break
## FUTURE BETA
## UNIFIED OS
# while 1:
# rp_s.tx_txt('ACQ:TRIG:FILL?')
# if rp_s.rx_txt() == '1':
Expand Down Expand Up @@ -796,15 +791,15 @@ Using just SCPI commands:
plot.show()
Using functions (will be implemented soon):
Using functions:

.. tabs::

.. tab:: ASCII/VOLTS mode

.. code-block:: python
#!/usr/bin/python3
#!/usr/bin/env python3
import sys
import redpitaya_scpi as scpi
Expand All @@ -828,7 +823,7 @@ Using functions (will be implemented soon):
if rp_s.rx_txt() == 'TD':
break
## FUTURE BETA
## UNIFIED OS
# while 1:
# rp_s.tx_txt('ACQ:TRIG:FILL?')
# if rp_s.rx_txt() == '1':
Expand All @@ -846,7 +841,7 @@ Using functions (will be implemented soon):

.. code-block:: python
#!/usr/bin/python3
#!/usr/bin/env python3
import sys
import redpitaya_scpi as scpi
Expand All @@ -871,7 +866,7 @@ Using functions (will be implemented soon):
if rp_s.rx_txt() == 'TD':
break
## FUTURE BETA
## UNIFIED OS
# while 1:
# rp_s.tx_txt('ACQ:TRIG:FILL?')
# if rp_s.rx_txt() == '1':
Expand All @@ -888,7 +883,7 @@ Using functions (will be implemented soon):

.. code-block:: python
#!/usr/bin/python3
#!/usr/bin/env python3
import sys
import redpitaya_scpi as scpi
Expand All @@ -913,7 +908,7 @@ Using functions (will be implemented soon):
if rp_s.rx_txt() == 'TD':
break
## FUTURE BETA
## UNIFIED OS
# while 1:
# rp_s.tx_txt('ACQ:TRIG:FILL?')
# if rp_s.rx_txt() == '1':
Expand Down Expand Up @@ -956,7 +951,7 @@ Using functions (will be implemented soon):
if rp_s.rx_txt() == 'TD':
break
## FUTURE BETA
## UNIFIED OS
# while 1:
# rp_s.tx_txt('ACQ:TRIG:FILL?')
# if rp_s.rx_txt() == '1':
Expand Down
18 changes: 7 additions & 11 deletions appsFeatures/examples/acqRF-exm2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@ Description

This example shows how to instantly acquire 16k samples of a signal on fast analog inputs.
The time length of the acquired signal depends on the time scale of a buffer that can be set with a decimation factor.
The decimations and time scales of a buffer are given in the |sample rate and decimation|.
The decimations and time scales of a buffer are given in the :ref:`sample rate and decimation <s_rate_and_dec>`.
Voltage and frequency ranges depend on the Red Pitaya model. 

.. |sample rate and decimation| raw:: html

<a href="https://redpitaya.readthedocs.io/en/latest/appsFeatures/examples/acqRF-samp-and-dec.html#sampling-rate-and-decimations" target="_blank">table</a>


Required hardware
*****************
Expand Down Expand Up @@ -98,7 +94,7 @@ Code - MATLAB®
end
end
% % FUTURE BETA
% % UNIFIED OS
% % wait for fill adc buffer
% while 1
% fill_state = writeread(RP,'ACQ:TRIG:FILL?')
Expand Down Expand Up @@ -138,7 +134,7 @@ Using just SCPI commands:

.. code-block:: python
#!/usr/bin/python3
#!/usr/bin/env python3
import sys
import redpitaya_scpi as scpi
Expand All @@ -157,7 +153,7 @@ Using just SCPI commands:
if rp_s.rx_txt() == 'TD':
break
## FUTURE BETA
## UNIFIED OS
# while 1:
# rp_s.tx_txt('ACQ:TRIG:FILL?')
# if rp_s.rx_txt() == '1':
Expand All @@ -172,11 +168,11 @@ Using just SCPI commands:
plot.ylabel('Voltage')
plot.show()
Using functions (will be implemented soon):
Using functions:

.. code-block:: python
#!/usr/bin/python3
#!/usr/bin/env python3
import sys
import redpitaya_scpi as scpi
Expand All @@ -199,7 +195,7 @@ Using functions (will be implemented soon):
if rp_s.rx_txt() == 'TD':
break
## FUTURE BETA
## UNIFIED OS
# while 1:
# rp_s.tx_txt('ACQ:TRIG:FILL?')
# if rp_s.rx_txt() == '1':
Expand Down
18 changes: 7 additions & 11 deletions appsFeatures/examples/acqRF-exm3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ Triggering on external trigger
Description
***********

This example shows how to acquire 16k samples of a signal on fast analog inputs. The signal will be acquired when the external trigger condition is met. The time length of the acquired signal depends on the time scale of a buffer that can be set with a decimation factor. The decimations and time scales of a buffer are given in the |sample rate and decimation|. Voltage and frequency ranges depend on the Red Pitaya model. 

.. |sample rate and decimation| raw:: html

<a href="https://redpitaya.readthedocs.io/en/latest/appsFeatures/examples/acqRF-samp-and-dec.html#sampling-rate-and-decimations" target="_blank">table</a>
This example shows how to acquire 16k samples of a signal on fast analog inputs. The signal will be acquired when the external trigger condition is met. The time length of the acquired signal depends on the time scale of a buffer that can be set with a decimation factor. The decimations and time scales of a buffer are given in the :ref:`sample rate and decimation <s_rate_and_dec>`. Voltage and frequency ranges depend on the Red Pitaya model. 


Required hardware
Expand Down Expand Up @@ -96,7 +92,7 @@ Code - MATLAB®
end
end
% % FUTURE BETA
% % UNIFIED OS
% % wait for fill adc buffer
% while 1
% fill_state = writeread(RP,'ACQ:TRIG:FILL?')
Expand Down Expand Up @@ -136,7 +132,7 @@ Using just SCPI commands:

.. code-block:: python
#!/usr/bin/python3
#!/usr/bin/env python3
import sys
import redpitaya_scpi as scpi
Expand All @@ -155,7 +151,7 @@ Using just SCPI commands:
if rp_s.rx_txt() == 'TD':
break
## FUTURE BETA
## UNIFIED OS
# while 1:
# rp_s.tx_txt('ACQ:TRIG:FILL?')
# if rp_s.rx_txt() == '1':
Expand All @@ -171,11 +167,11 @@ Using just SCPI commands:
plot.show()
Using functions (will be implemented soon):
Using functions:

.. code-block:: python
#!/usr/bin/python3
#!/usr/bin/env python3
import sys
import redpitaya_scpi as scpi
Expand All @@ -198,7 +194,7 @@ Using functions (will be implemented soon):
if rp_s.rx_txt() == 'TD':
break
## FUTURE BETA
## UNIFIED OS
# while 1:
# rp_s.tx_txt('ACQ:TRIG:FILL?')
# if rp_s.rx_txt() == '1':
Expand Down

0 comments on commit 4035ffc

Please sign in to comment.