Hello, I'm learning how to use the ADP3450. The main thing that is interesting for me is the control of the scope and the wave generator through script.
For now, I just wanted to control the waves out of the wave generator through code. I tried the example "Scope and Wavegen" in Waveforms following the provided guide in the site.
I then used this example and the Help section in Waveforms to try play with the different parameters. I tried hard to find better documentation of the various functions in the Help section without success. At the end I just did a long session of trial and error.
The result is this code
clear()
if(!('Wavegen' in this) || !('Scope' in this)) throw "Please open a Scope and a Wavegen instrument";
Wavegen.Channel1.Mode.text = "Basic";
Wavegen.Channel1.Basic.Type.text = "sine";
Wavegen.Channel1.Basic.Phase = 0;
Wavegen.Channel1.Basic.Offset = 0;
Wavegen.Channel1.Basic.Frequency = 1000;
Wavegen.Channel1.Basic.Amplitude = 1;
Wavegen.Channel2.Mode.text = "Basic";
Wavegen.Channel2.Basic.Type.text = "sine";
Wavegen.Channel2.Basic.Phase = 0;
Wavegen.Channel2.Basic.Offset = 0;
Wavegen.Channel2.Basic.Frequency = 1000;
Wavegen.Channel2.Basic.Amplitude = 1;
Scope.Trigger.Trigger.text = "Repeated";
Wavegen1.run();
Wavegen.run();
Scope.run();
The only thing I achieved is changing the shape of the wave form and the mode of use of the wave generator with the lines:
Wavegen.Channel1.Mode.text = "Basic";
Wavegen.Channel1.Basic.Type.text = "sine";
I'm not able to change any other parameter like offset, phase, frequency, amplitude. The only way to change this values is through graphic interface. I don't get any error from Waveforms
How can I fix this code to let it work?
Is it possible to have an extensive manual on the functions? (for example, how to present the value of phase, if in radians or degrees. How to present the value of frequency and so on)
PS
I configured the device so that the wavegen channels 1 and 2 feed the oscilloscope channels 1 and 2 of the ADP3450
Question
Albertu95
Hello, I'm learning how to use the ADP3450. The main thing that is interesting for me is the control of the scope and the wave generator through script.
For now, I just wanted to control the waves out of the wave generator through code. I tried the example "Scope and Wavegen" in Waveforms following the provided guide in the site.
I then used this example and the Help section in Waveforms to try play with the different parameters. I tried hard to find better documentation of the various functions in the Help section without success. At the end I just did a long session of trial and error.
The result is this code
clear() if(!('Wavegen' in this) || !('Scope' in this)) throw "Please open a Scope and a Wavegen instrument"; Wavegen.Channel1.Mode.text = "Basic"; Wavegen.Channel1.Basic.Type.text = "sine"; Wavegen.Channel1.Basic.Phase = 0; Wavegen.Channel1.Basic.Offset = 0; Wavegen.Channel1.Basic.Frequency = 1000; Wavegen.Channel1.Basic.Amplitude = 1; Wavegen.Channel2.Mode.text = "Basic"; Wavegen.Channel2.Basic.Type.text = "sine"; Wavegen.Channel2.Basic.Phase = 0; Wavegen.Channel2.Basic.Offset = 0; Wavegen.Channel2.Basic.Frequency = 1000; Wavegen.Channel2.Basic.Amplitude = 1; Scope.Trigger.Trigger.text = "Repeated"; Wavegen1.run(); Wavegen.run(); Scope.run();
The only thing I achieved is changing the shape of the wave form and the mode of use of the wave generator with the lines:
Wavegen.Channel1.Mode.text = "Basic";
Wavegen.Channel1.Basic.Type.text = "sine";
I'm not able to change any other parameter like offset, phase, frequency, amplitude. The only way to change this values is through graphic interface. I don't get any error from Waveforms
How can I fix this code to let it work?
Is it possible to have an extensive manual on the functions? (for example, how to present the value of phase, if in radians or degrees. How to present the value of frequency and so on)
PS
I configured the device so that the wavegen channels 1 and 2 feed the oscilloscope channels 1 and 2 of the ADP3450
I took the information to try the device from:
https://digilent.com/reference/test-and-measurement/guides/waveforms-script-editor
https://digilent.com/reference/test-and-measurement/analog-discovery-pro-3x50/start
https://digilent.com/reference/software/waveforms/waveforms-3/reference-manual
https://digilent.com/reference/software/waveforms/waveforms-3/reference-manual?redirect=1#code
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now