Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
learn:instrumentation:tutorials:analog-discovery-studio-script-editor:start [2019/06/24 20:00] – Arthur Brown | learn:instrumentation:tutorials:analog-discovery-studio-script-editor:start [2020/07/28 17:26] – Arthur Brown | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Using the Script Editor ====== | + | ====== Using the Script Editor |
- | {{: | + | <WRAP round important 660px> |
- | + | This guide has been replaced by [[learn/instrumentation/tutorials/waveforms-script-editor/ | |
- | ===== Introduction ===== | + | |
- | This guide explains the use of the //Script Editor// instrument in WaveForms. This instrument is used to create and run scripts that can control all of the other instruments in WaveForms. | + | |
- | ---- | + | |
- | ===== Prerequisites ===== | + | |
- | * A Digilent Test & Measurement Device | + | |
- | * A Computer with WaveForms Software Installed | + | |
- | + | ||
- | ---- | + | |
- | + | ||
- | ==== 1. Opening the Script Editor ==== | + | |
- | + | ||
- | <WRAP group> | + | |
- | <WRAP column half> | + | |
- | === 1.1 === | + | |
- | Plug in the Test & Measurement Device, then start WaveForms | + | |
- | + | ||
- | If no device is connected | + | |
- | + | ||
- | **Note:** //" | + | |
- | + | ||
- | **Note:** //The Device Manager can be opened by clicking on the " | + | |
</ | </ | ||
- | <WRAP column half> | ||
- | {{ : | ||
- | </ | ||
- | </ | ||
- | ---- | ||
- | <WRAP group>< | ||
- | === 1.2 === | ||
- | Once the Welcome page loads, in the instrument panel at the left side of the window, click on the **Script** button to open the //Script Editor// instrument. | ||
- | </ | ||
- | {{ : | ||
- | </ | ||
- | ---- | ||
- | |||
- | <WRAP group> | ||
- | <WRAP column half> | ||
- | |||
- | === 1.3 === | ||
- | When the //Script Editor// has opened, it will display the script editor (1), the output panel (2) below the editor, and the control toolbar (3) at the top. | ||
- | |||
- | </ | ||
- | <WRAP column half> | ||
- | {{ : | ||
- | </ | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ==== 2. Using the Script Editor ==== | ||
- | |||
- | //This section walks through how to use the //Script Editor | ||
- | |||
- | <WRAP group> | ||
- | <WRAP column half> | ||
- | |||
- | === 2.1 Hardware Setup === | ||
- | To demonstrate the //Script Editor//, the //Scope// and //Wavegen// instruments will be used. | ||
- | |||
- | First, connect the Test & Measurement scope channel 1 pin (orange wire) to the device' | ||
- | |||
- | </ | ||
- | <WRAP column half> | ||
- | |||
- | {{ : | ||
- | |||
- | </ | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | <WRAP group> | ||
- | <WRAP column half> | ||
- | |||
- | === 2.2 Software Setup === | ||
- | For the //Script Editor// to make use of the instruments, | ||
- | |||
- | </ | ||
- | <WRAP column half> | ||
- | |||
- | {{: | ||
- | |||
- | </ | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | <WRAP group> | ||
- | <WRAP column half> | ||
- | |||
- | === 2.3 Running the Script === | ||
- | |||
- | Return to the Scripts page by clicking on its tab in the bar at the top of the screen. | ||
- | |||
- | Upon launch, the Script editor contains an example script that controls the //Wavegen// and //Scope// instruments. | ||
- | |||
- | Click the Run ({{: | ||
- | |||
- | Print statements and uncaught errors are shown in the output panel. | ||
- | |||
- | </ | ||
- | <WRAP column half> | ||
- | |||
- | {{: | ||
- | |||
- | </ | ||
- | </ | ||
- | |||
- | <WRAP group> | ||
- | <WRAP column half> | ||
- | |||
- | === 2.4 Debugging === | ||
- | |||
- | If in the process of writing a script, the script needs to be stepped through to find errors, the Script Editor' | ||
- | |||
- | Debugging is done inside WaveForms itself, allowing the user to step through the execution of the script. The debugger is accessed by clicking the Debug ({{: | ||
- | |||
- | </ | ||
- | <WRAP column half> | ||
- | |||
- | {{: | ||
- | |||
- | </ | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ==== 3. Script Editor User Interface Overview ==== | ||
- | //This section walks through the different controls and features present in the //Script Editor. | ||
- | |||
- | <WRAP group> | ||
- | <WRAP column half> | ||
- | |||
- | === 3.1 The Control Toolbar === | ||
- | The control toolbar contains menus and control interfaces used to configure the //Script Editor//, listed below: | ||
- | * //Debug//: Opens a QT Script Debugger window. | ||
- | * //Run//: Executes the script. | ||
- | * //Stop//: Stops debugging or execution of the script. For **Stop** to work, the code needs to use the // | ||
- | * //Abort//: Forces the execution to halt immediately. | ||
- | * //Zoom In// & //Zoom Out//; Used to increase or reduce the font size of the code editor respectively. | ||
- | * // | ||
- | </ | ||
- | <WRAP column half> | ||
- | |||
- | {{: | ||
- | |||
- | </ | ||
- | </ | ||
- | ---- | ||
- | <WRAP group> | ||
- | <WRAP column half> | ||
- | |||
- | === 3.2 The Menu Bar === | ||
- | |||
- | **File** is used to open an existing WaveForms //Script Editor// project, save the current //Script Editor// project, or close the //Script Editor// | ||
- | |||
- | </ | ||
- | <WRAP column half> | ||
- | |||
- | {{: | ||
- | |||
- | </ | ||
- | </ | ||
- | |||
- | <WRAP group> | ||
- | <WRAP column half> | ||
- | |||
- | **Control** accesses the Debug, Run, Stop and Abort actions. | ||
- | |||
- | </ | ||
- | <WRAP column half> | ||
- | |||
- | {{: | ||
- | |||
- | </ | ||
- | </ | ||
- | |||
- | <WRAP group> | ||
- | <WRAP column half> | ||
- | |||
- | **View** has options to enable the Output panel, code completion or add a plot panel. | ||
- | |||
- | </ | ||
- | <WRAP column half> | ||
- | |||
- | {{: | ||
- | |||
- | </ | ||
- | </ | ||
- | ---- | ||
- | <WRAP group> | ||
- | <WRAP column half> | ||
- | |||
- | === 3.3 The Script Editor === | ||
- | |||
- | The Script Editor is an editor where the JavaScript code can be viewed and edited. | ||
- | |||
- | </ | ||
- | <WRAP column half> | ||
- | |||
- | {{: | ||
- | |||
- | </ | ||
- | </ | ||
- | ---- | ||
- | <WRAP group> | ||
- | <WRAP column half> | ||
- | |||
- | === 3.4 Output Panel === | ||
- | |||
- | The output panel contains the results of print() statements and error messages. | ||
- | |||
- | </ | ||
- | <WRAP column half> | ||
- | |||
- | {{: | ||
- | |||
- | </ | ||
- | </ | ||
- | ---- | ||
- | <WRAP group> | ||
- | <WRAP column half> | ||
- | === 3.5 WaveForms Help Tab === | ||
- | Accessed via **Help** in the tab bar, the WaveForms Help Tab contains reference materials for all WaveForms instruments. | ||
- | |||
- | Section 4, //" | ||
- | |||
- | </ | ||
- | <WRAP column half> | ||
- | {{ : | ||
- | </ | ||
- | </ | ||
- | |||
- | ==== Next Steps ==== | ||
- | |||
- | For more guides on how to use the Digilent Test & Measurement Device, return to the device' | ||
- | |||
- | For more information on WaveForms visit the [[reference: | ||
- | |||
- | For technical support, please visit the [[https:// | ||
- | {{tag>analog-discovery-studio tutorial}} | + | {{tag>to-be-removed}} |