Search the Community
Showing results for tags 'dwfbat'.
Found 1 result
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