This is an old revision of the document!
Important! The following guide in experimental phase, therefore no guarantee is offered regarding its functionality.
Scopy tool supports scripting via javascript files, offering the possibility of automating instrument tasks for different types of applications (i.e control loops).
The scripts can be run in two different ways:
scopy --script my_script.js
To open the Debugger in Scopy tool, its visibility must be enbled in the Instrument Menu. To do this, open the Scopy.ini file under the following path: “C:\Users\<your_username>\AppData\Roaming\ADI”. Change the “debugger” property from the “launcher” group from to true, and then open the Scopy tool.
Connect to ADALM2000 device and open the Debugger Instrument.
To load a script press “Load Script” button and select the folder path of the file.
After the location is set, to run the script press the “Run” button placed on the left side of the “Load Script” button.
A list of supported commands by the Scopy tool.
Command | Permission | Description |
---|---|---|
exit() | Write | Exit Scopy application. |
msleep(ms) | Write | Delay for a specific amount of time (specified in milliseconds). |
printToConsole(value) | Write | Print value to the console. |
fileIO.writeToFile(value,path) | Write | Write value in a file at specified path. |
fileIO.appendToFile(value,path) | Write | Append value in a file at specified path. |
fileIO.readAll(path) | Read | Read content from a file at specified path. |
fileIO.readLine(path,lineNr) | Read | Read entire line form a file at specified path. |
Command | Permission | Values | Description |
---|---|---|---|
dio.dir[idx] | Read/Write | true(out);false(in) | Set channel direction (idx=0-15) |
dio.out[idx] | Read/Write | true(high);false(low) | Set channel output (idx=0-15) |
dio.gpi[idx] | Read | true(on);false(off) | Check if channel pin can be used as input (or is used by other instrument as output, i.e. Pattern Generator Instrument) |
dio.running | Read/Write | true(on);false(off) | Run DigitalIO instrument |
Command | Permission | Values | Description |
---|---|---|---|
power.sync | Read/Write | true(track);false(independent) | Set Power Supplies as Independent or Tracking control. |
power.tracking_percent | Read/Write | 0 - 100 (%) | Set Power Supplies Tracking ratio. |
power.dac1_enabled | Read/Write | true(on);false(off) | Enable/Disable Positive Power Supply. |
power.dac2_enabled | Read/Write | true(on);false(off) | Enable/Disable Negative Power Supply. |
power.dac1_value | Read/Write | 0 - 5 (V) | Set Positive Power Supply output value. |
power.dac2_value | Read/Write | (-5) - 0(V) | Set Negative Power Supply output value. |
Command | Permission | Values | Description |
---|---|---|---|
dmm.mode_ac_low_ch1 | Read/Write | true(on);false(off) | Set Channel 1 to AC mode (20Hz-800Hz) |
dmm.mode_ac_low_ch2 | Read/Write | true(on);false(off) | Set Channel 2 to AC mode (20Hz-800Hz) |
dmm.mode_ac_high_ch1 | Read/Write | true(on);false(off) | Set Channel 1 to AC mode (800Hz-40kHz) |
dmm.mode_ac_high_ch2 | Read/Write | true(on);false(off) | Set Channel 2 to AC mode (800Hz-40kHz) |
dmm.histogram_ch1 | Read/Write | true(on);false(off) | Enable/Disable Channel 1 History plot. |
dmm.histogram_ch2 | Read/Write | true(on);false(off) | Enable/Disable Channel 2 History plot. |
dmm.history_ch1_size_idx | Read/Write | 0 - 2 | Channel 1 History plot size(1s,10s,60s). |
dmm.history_ch2_size_idx | Read/Write | 0 - 2 | Channel 2 History plot size(1s,10s,60s). |
dmm.value_ch1 | Read | Volts | Read Channel 1 value. |
dmm.value_ch2 | Read | Volts | Read Channel 2 value. |
dmm.peak_hold_en | Read/Write | true(on);false(off) | Enable/Disable Peak Hold. |
dmm.data_logging_en | Read/Write | true(on);false(off) | Enable/Disable Data Logging. |
dmm.data_logging_timer | Read/Write | 0 - 3600(s) | Set Data Logging Time. |
dmm.data_logging_append | Read/Write | true(append);false(overwrite) | Overwrite/Append data logging to file |
dmm.running | Read/Write | true(on);false(off) | Run Voltmeter instrument |
Command | Permission | Values | Description |
---|---|---|---|
siggen.mode[idx] | Read/Write | 0 - 3 | Set Channel 1/2 (idx=0/1) Operation mode (Constant, Waveform, Buffer, Math). |
siggen.constant_volts[idx] | Read/Write | (-5) - 5 (V) | Set Channel 1/2 (idx=0/1) voltage in Constant Mode. |
siggen.waveform_type[idx] | Read/Write | 0 - 5 | Set Channel 1/2 (idx=0/1) waveform type in Waveform Mode (Sine, Square, Triangle, Trapezoidal, Rising Ramp Sawtooth, Falling Ramp Sawtooth). |
siggen.waveform_amplitude[idx] | Read/Write | 0.000001 - 5 (V) | Set Channel 1/2 (idx=0/1) waveform amplitude in Waveform Mode. |
siggen.waveform_frequency[idx] | Read/Write | 0.001 - 37500000 (Hz) | Set Channel 1/2 (idx=0/1) waveform frequency in Waveform Mode. |
siggen.waveform_offset[idx] | Read/Write | (-5) - 5 (V) | Set Channel 1/2 (idx=0/1) waveform offset in Waveform Mode. |
siggen.waveform_phase[idx] | Read/Write | 0 - 359 (deg) | Set Channel 1/2 (idx=0/1) waveform phase in Waveform Mode. |
siggen.waveform_duty[idx] | Read/Write | 0 - 100 (%) | Set Channel 1/2 (idx=0/1) waveform duty in Waveform Mode (Square). |
siggen.waveform_rise[idx] | Read/Write | 0.00000001 - 10 (s) | Set Channel 1/2 (idx=0/1) waveform rise time in Waveform Mode (Trapezoidal). |
siggen.waveform_fall[idx] | Read/Write | 0.00000001 - 10 (s) | Set Channel 1/2 (idx=0/1) waveform fall time in Waveform Mode (Trapezoidal). |
siggen.waveform_holdhigh[idx] | Read/Write | 0.00000001 - 10 (s) | Set Channel 1/2 (idx=0/1) waveform high time in Waveform Mode (Trapezoidal). |
siggen.waveform_holdlow[idx] | Read/Write | 0.00000001 - 10 (s) | Set Channel 1/2 (idx=0/1) waveform low time in Waveform Mode (Trapezoidal). |
siggen.noise_type[idx] | Read/Write | 0(None); 200 - 203 | Set Channel 1/2 (idx=0/1) Noise Type (None, Uniform, Gaussian, Laplacian, Impulse). |
siggen.noise_amplitude[idx] | Read/Write | 0.000001 - 10 (V) | Set Channel 1/2 (idx=0/1) Noise Amplitude. |
siggen.math_function[idx] | Read/Write | String | Set Channel 1/2 (idx=0/1) Math function. |
siggen.math_frequency[idx] | Read/Write | 0.001 - 37500000 (Hz) | Set Channel 1/2 (idx=0/1) Math frequency. |
siggen.buffer_file_path[idx] | Read/Write | String | Set Channel 1/2 (idx=0/1) Buffer file Path. |
siggen.buffer_amplitude[idx] | Read/Write | 0.000000001 - 10 (V) | Set Channel 1/2 (idx=0/1) Buffer amplitude. |
siggen.buffer_offset[idx] | Read/Write | (-5) - 5 (V) | Set Channel 1/2 (idx=0/1) Buffer offset. |
siggen.buffer_sample_rate[idx] | Read/Write | 0.1 - 37500000 (V) | Set Channel 1/2 (idx=0/1) Buffer sample rate. |
siggen.buffer_phase[idx] | Read/Write | 0 - 359 (deg) | Set Channel 1/2 (idx=0/1) Buffer phase. |
siggen.enabled[idx] | Read/Write | true(on);false(off) | Enabled/Disable Channel 1/2 (idx=0/1) |
siggen.running | Read/Write | true(on);false(off) | Run Signal Generator instrument. |
Command | Permission | Values | Description |
---|---|---|---|
network.min_freq | Read/Write | 1 - 30000000 (Hz) | Set Sweep Minimum Frequency. |
network.max_freq | Read/Write | 1 - 30000000 (Hz) | Set Sweep Maximum Frequency. |
network.samples_count | Read/Write | 10 - 1000 (samples) | Set Sweep Samples Count. |
network.amplitude | Read/Write | 0.000001 - 10 (V) | Set Waveform Amplitude. |
network.offset | Read/Write | (-5) - 5 (V) | Set Waveform Offset. |
network.min_mag | Read/Write | (-120) - 120 (dB) | Set Minimum Magnitude displayed. |
network.max_mag | Read/Write | (-120) - 120 (dB) | Set Maximum Magnitude displayed. |
network.min_phase | Read/Write | (-180) - 180 (deg) | Set Minimum Phase displayed. |
network.max_phase | Read/Write | (-180) - 180 (deg) | Set Maximum Phase displayed. |
network.log_freq | Read/Write | true(log)/false(lin) | Set Logarithmic/Linear plot scale display. |
network.ref_channel | Read/Write | 1;2 | Set Channel 1/2 as reference channel. |
network.line_thickness | Read/Write | 0-9 | Set plot line thickness (0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5) |
network.cursors | Read/Write | true(on);false(off) | Enable/Disable Plot Cursors. |
network.cursors_position | Read/Write | 0 - 3 | Change Cursors Table position on plot. |
network.cursors_transparency | Read/Write | 0 - 100 (%) | Change Cursors Table transparency on plot. |
network.running | Read/Write | true(on);false(off) | Run Network Analyzer instrument. |
Command | Permission | Values | Description |
---|---|---|---|
osc.channels[idx].enabled | Read/Write | true(on);false(off) | Enable/Disable Channel 1/2 (idx=0/1) |
osc.channels[idx].volts_per_div | Read/Write | 0.001 - 10 (V) | Set Channel 1/2 (idx=0/1) Volts/Div value for the plot. |
osc.channels[idx].ac_coupling | Read/Write | true(on); false(off) | Enable/Disable Channel 1/2 (idx=0/1) AC Coupling. |
osc.channels[idx].period | Read | (s) | Read Channel 1/2 (idx=0/1) signal's period. |
osc.channels[idx].mean | Read | (V) | Read Channel 1/2 (idx=0/1) signal's mean value. |
osc.channels[idx].cycle_mean | Read | (V) | Read Channel 1/2 (idx=0/1) signal's cycle mean value. |
osc.channels[idx].rms | Read | (V) | Read Channel 1/2 (idx=0/1) signal's RMS value. |
osc.channels[idx].cycle_rms | Read | (V) | Read Channel 1/2 (idx=0/1) signal's Cycle RMS value. |
osc.channels[idx].ac_rms | Read | (V) | Read Channel 1/2 (idx=0/1) signal's AC RMS value. |
osc.channels[idx].area | Read | (V) | Read Channel 1/2 (idx=0/1) signal's Area value. |
osc.channels[idx].cycle_area | Read | (V) | Read Channel 1/2 (idx=0/1) signal's Cycle Area value. |
osc.channels[idx].min | Read | (V) | Read Channel 1/2 (idx=0/1) signal's min value. |
osc.channels[idx].max | Read | (V) | Read Channel 1/2 (idx=0/1) signal's max value. |
osc.channels[idx].amplitude | Read | (V) | Read Channel 1/2 (idx=0/1) signal's amplitude value. |
osc.channels[idx].peak_to_peak | Read | (V) | Read Channel 1/2 (idx=0/1) signal's peak-to-peak value. |
osc.channels[idx].low | Read | (V) | Read Channel 1/2 (idx=0/1) signal's low value. |
osc.channels[idx].high | Read | (V) | Read Channel 1/2 (idx=0/1) signal's high value. |
osc.channels[idx].middle | Read | (V) | Read Channel 1/2 (idx=0/1) signal's middle value. |
osc.channels[idx].pos_overshoot | Read | (%) | Read Channel 1/2 (idx=0/1) signal's positive overshoot value. |
osc.channels[idx].neg_overshoot | Read | (%) | Read Channel 1/2 (idx=0/1) signal's negative overshoot value. |
osc.channels[idx].rise | Read | (s) | Read Channel 1/2 (idx=0/1) signal's rise time value. |
osc.channels[idx].fall | Read | (s) | Read Channel 1/2 (idx=0/1) signal's fall time value. |
osc.channels[idx].pos_width | Read | (s) | Read Channel 1/2 (idx=0/1) signal's positive width value. |
osc.channels[idx].neg_width | Read | (s) | Read Channel 1/2 (idx=0/1) signal's negative width value. |
osc.channels[idx].pos_duty | Read | (s) | Read Channel 1/2 (idx=0/1) signal's positive duty cycle value. |
osc.channels[idx].neg_duty | Read | (s) | Read Channel 1/2 (idx=0/1) signal's negative duty cycle value. |
osc.time_base | Read/Write | 0.0000001 - 1 (s) | Set Oscilloscope time base. |
osc.time_position | Read/Write | (-5) - 5 (s) | Set Oscilloscope time position. |
osc.measure_all | Read/Write | true(on); false(off) | Enable/Disable Display All Measurements. |
osc.measure | Read/Write | true(on); false(off) | Enable/Disable Measure Feature . |
osc.measure_all | Read/Write | true(on); false(off) | Enable/Disable Display All Measurements. |
osc.counter | Read/Write | true(on); false(off) | Enable/Disable Counter feature for Measurements. |
osc.statistics | Read/Write | true(on); false(off) | Enable/Disable Statistics feature for Measurements. |
osc.cursors | Read/Write | true(on); false(off) | Enable/Disable Cursors on plot. |
osc.horizontal_cursors | Read/Write | true(on); false(off) | Enable/Disable Horizontal Cursors on plot. |
osc.vertical_cursors | Read/Write | true(on); false(off) | Enable/Disable Vertical Cursors on plot. |
osc.cursors_position | Read/Write | 0-3 | Set Cursors Table position on plot. |
osc.cursors_transparency | Read/Write | 0-100 (%) | Set Cursors Table transparency on plot. |
osc.auto_trigger | Read/Write | true(auto); false(normal) | Set Trigger mode to Auto/Normal. |
osc.internal_trigger | Read/Write | true(on); false(off) | Enable/Disable Internal Trigger. |
osc.external_trigger | Read/Write | true(on); false(off) | Enable/Disable External Trigger. |
osc.trigger_source | Read/Write | 0;1 | Select Channel 1/2 (0/1) as Trigger Source. |
osc.trigger_level | Read/Write | (-25) - 25 (V) | Set Trigger Level. |
osc.trigger_hysteresis | Read/Write | 0 - 2.5 (V) | Set Trigger Hysteresis. |
osc.running | Read/Write | true(on);false(off) | Run Oscilloscope instrument. |
Command | Permission | Values | Description |
---|---|---|---|
pattern.running | Read/Write | true(on);false(off) | Run Pattern Generator instrument. |
Command | Permission | Values | Description |
---|---|---|---|
logic.running | Read/Write | true(on);false(off) | Run Logic Analyzer instrument. |
Command | Permission | Values | Description |
---|---|---|---|
spectrum.running | Read/Write | true(on);false(off) | Run Spectrum Analyzer instrument. |