I'm a coding newbie trying to to use Javascript to produce a pulse of arbitrary length and capture the whole pulse (and a little bit before and after) in one csv file. To do this, I need to make Scope1's recording buffer size longer, and set Scope 1 to be triggered by Wavegen1, but get the following errors with both the Wavegen and Scope Windows open:
Scope1.BufferSize.value = 1;
RESULT: TypeError: Result of expression 'Scope1.BufferSize' [undefined] is not an object.
Scope1.Source.text = "Wavegen 1"; //OR
Scope1.Source.text = "Wavegen1";
RESULT OF BOTH: TypeError: Result of expression 'Scope1.Source' [undefined] is not an object.
I'm guessing these functions are deprecated, since while they do appear in the help menu, they don't appear in the Ctrl+Space autofill menu. Does anyone know how to change the the individual buffer size for recording in javascipt, and set the source or Scope1, or is this something I have to go into the C++ SDK to do?
Reading other forums code, at least the BufferSize variable is claimed to work fine, in code like here:
Even with just copying Andras's code, I've run into the same compiler errors; I've reinstalled waveforms on at least two computers with separate Analog Discovery 2 devices and hit the same wall. Is there some declaration I must make beforehand before certain Scope1 members can be accessed?
Question
Ayyyyyyy
I'm a coding newbie trying to to use Javascript to produce a pulse of arbitrary length and capture the whole pulse (and a little bit before and after) in one csv file. To do this, I need to make Scope1's recording buffer size longer, and set Scope 1 to be triggered by Wavegen1, but get the following errors with both the Wavegen and Scope Windows open:
Scope1.BufferSize.value = 1;
RESULT: TypeError: Result of expression 'Scope1.BufferSize' [undefined] is not an object.
Scope1.Source.text = "Wavegen 1"; //OR
Scope1.Source.text = "Wavegen1";
RESULT OF BOTH: TypeError: Result of expression 'Scope1.Source' [undefined] is not an object.
I'm guessing these functions are deprecated, since while they do appear in the help menu, they don't appear in the Ctrl+Space autofill menu. Does anyone know how to change the the individual buffer size for recording in javascipt, and set the source or Scope1, or is this something I have to go into the C++ SDK to do?
Reading other forums code, at least the BufferSize variable is claimed to work fine, in code like here:
Even with just copying Andras's code, I've run into the same compiler errors; I've reinstalled waveforms on at least two computers with separate Analog Discovery 2 devices and hit the same wall. Is there some declaration I must make beforehand before certain Scope1 members can be accessed?
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.