@@ -15,6 +15,43 @@ This TSP file demos how to pass parameter values and use the sine wave generatio
1515
1616## Code Walk Through
1717
18+ The Defining file contains instrumnet commands orgainized into functions.
19+ When this file is run on the 2450, it may seem like nothing happened.
20+ When running the code in this file, it loads the functions into runtime memory.
21+ These functions are essentially your API for the task you need the 2450 to do.
22+
23+ ![ define functions] ( images/define_functions.png )
24+
25+ Below is some detail of one of the functions. It is defined to use paramters.
26+ For example, the value of src_level is used to set the current source range.
27+ The voltage_limit is used to set both the vlimit and the voltage measure range.
28+
29+ ![ define functions] ( images/define_detail.png )
30+
31+
32+ Below is part of the using TSP file. It defines some variables and passes those values to the function.
33+ It also can implement some conditional logic such as the if/then on build_list.
34+ If you choose to move to Python or another programming language, this file approximates how
35+ Python would make use of the defined functions.
36+
37+ ![ define functions] ( images/use_functions.png )
38+
39+
40+ Below shows the outcome when connected to a 330Ω resistor.
41+ The TSP files can be brought to the instrument on a thumb drive.
42+ Touch the screen where it displays 'No Script'. This will give a pop-up list
43+ of available scripts on thumb drive or stored on the instrument.
44+ Run the current_sine_wave_define.tsp once.
45+ Then run the current_sine_wave_use.tsp to generate the sine wave of current.
46+ To run again without any value changes, press TRIG button to execute it again.
47+
48+ ![ define functions] ( images/outcome.png )
49+
50+ The TSP code can also be run from TSP Toolkit extension for VSCode.
51+ In this case, the data results can be spooled to the Terminal window of TSP Toolkit.
52+
53+ ![ define functions] ( images/run_tsp_toolkit.png )
54+
1855
1956
2057
0 commit comments