The es:scope® platform is designed for testing, measuring, and adjusting the runtime variable behavior of embedded systems. It incorporates the functionality of oscilloscopes, data acquisition devices, and calibrators.
This guide explains how to use es:scope® with es:prot™.

es:scope is inspired by oscillsocopes in its design and feature set. Plot windows are used to visualize and analyze real-time signals. Thanks to hardware acceleration these can plot high data rates.

Warning: If the number of samples plotted is close to the number of samples buffered, using a trigger may lead to partially drawn plots! If you experience this, increase the number of samples buffered.

Indicators
The size of the exported data file may be larger for reasons of compatibility (e.g. conversion to type double for .mat files).
While in this mode, es:scope’s recording can be controlled using your embedded system with es:prot.
You cannot start or stop recording signals without disabling External Record in es:scope first.
It is recommended to configure the export settings first in es:scope
es:prot utility functions
es_prot_set_cmd(volatile es_prot *cp, ‘RECORD_CMD’)es_prot_set_cmd(volatile es_prot *cp, ‘NO_CMD’)// Activate recording of anomaly in q current
if (current_iq > 20) {
recording_active = true;
es_prot_set_cmd(&USB_COMM,RECORD_CMD);
}
// Deactivate recording
if (recording_active && current_iq < 19) {
es_prot_set_cmd(&USB_COMM,NO_CMD);
}
Configure the export settings
Tip: If the naming schema Numeric counter is used, the counter will stop at 999. At this point, you have the choice to reset the counter and overwrite previous files or disable External Record. If many files are to be saved over a long period of time, it is recommended to use the naming schema ‘Date and time’ instead.
Tip: The applied export settings will also be used if you click Quicksave.
es:scope has two ways of sending data to your embedded system: A calibrator and and a terminal.

With the calibrator on the left side of the commands tab you can set the value of numerical parameters which were set up on our embedded system. These are pre-configured on the embedded device using es_prot_set_tx_data_info(). This is shown in the setup.
Once you send the new variable value from es:scope, it is send to es:prot's buffer with the exchange elicited by es_prot_manager. The value from the buffer can then be used in your code for calibrations and parameter resetting.
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{
// Receive new values in regular intervals
if (htim == &htim4)
{
es_prot_manager(&USB_COMM);
p_parameter = es_prot_get_rx_value(&USB_COMM, 0);
}
}
With the terminal on the left side of the commands tab you can send a command string to the embedded system which can be accessed by means of the char array terminal_cmd in the es_prot struct. The buffer has a size of char[16];
char cmd[16];
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{
// Receive new values in regular intervals
if (htim == &htim4)
{
es_prot_manager(&USB_COMM);
memcpy(cmd, es_prot.terminal_cmd, 16); // Copy the buffer es_prot.terminal_cmd
}
}