Search the Community
Showing results for tags 'scripts'.
Found 2 results
Hello, Learning to create/manage custom scope measurements in Waveforms for the AD2. So far I have created a couple of custom measurements but do not understand how/what is actually going on regarding how they are managed. Any help would be appreciated. Here are the steps I took to create a custom measurement: Added the "stock" Custom Channel measurement Modified it Changed its name to Capacitor Value Saved the script in a directory as a txt file Subsequently: Modified the measurement script (Capacitor Value) some more Changed its name to CapVal Saved the updated script txt file Here is where I am confused: When I go to the Custom Measurement drop down menu is see BOTH custom measurement scripts listed. I had assumed that when I changed the measurement name and saved the modified script by overwriting the script text file that there would be no trace of the original script - but this is not the case. QUESTIONS: How/where are custom measurements saved? Are custom measurement scripts they stored internal to Waveforms based on their name in the measurement editor window? What does the script->save menu do - let you save for off-line editing only? How do you remove custom measurement scripts from the "add measurement" menu? What is the correct way for creating and managing custom measurement scripts? Is there documentation/resources that already exist that can be referred to? Again, any help would be appreciated. Thanks. TerryF
A few months ago I got an example of a batch script which ran fine under Waveforms 2. As I understand Waveforms 3 has a new scripting language. Could anyone here help me converting the old script (see below and attachment) to the new syntax? WaveGen.1.Mode = "Basic" WaveGen.1.Basic.Amplitude = 1 WaveGen.1.Basic.Offset= 0 WaveGen.1.Run Scope.Channels.C1.Range = 2 Scope.Channels.C1.Offset = 0 Scope.Channels.C2.Range = 2 Scope.Channels.C2.Offset = 0 echo("Scope1-Input(Hz) (V)\tScope2-Output(Hz) (V)") var hzStart = 1e3 var hzStop = 5e6 var steps = 100 var mul = Pow(10, (Lg(hzStop/hzStart)/(steps-1))) var hz = hzStart for i=1:1:steps WaveGen.1.Basic.Frequency = hz // time base = number of periods to capture / frequency Scope.Time.Base = 10/hz // wait between changing the frequency and acquisition Sleep(10) // 10ms Scope.Run Scope.Wait //echo(i+"\t"+hz +"\t"+ Scope.Measure.C1.Amplitude+"\t"+ Scope.Measure.C2.Amplitude ) echo(hz +"\t"+ Log((Scope.Measure.C2.Amplitude/Scope.Measure.C1.Amplitude),10)*20) hz *= mul end kind regards, hugo bode_amplitude.dwfbat