I recently started using the Analog Discovery 2 and trying to setup a long measurement acquisition (e.g. 1 minute) with the scope at relatively high sampling rate (e.g. 1MHz). For this one has to play with scripting, since it is needed to do multiple acquisitions followed by data writing into a file. The acquisition seems to work, since I can for example print the data on the screen. So, data seems to be there. However, the function File(file_path/file_name.csv).write(Scope1.Channel1.data)does not give any error, while not creating the file. I would have expected an error if the file was not created. So, I am not even sure what went wrong. Could you give me some advise on how to solve this?
Also, is there a reference manual or a tutorial more detailed than the Help inside the Waveform tool?
Below my simple initial script for reference (just made by modifying an example):
Scope1.single();
print(Scope1.Channel1.data); // This shows data on the screen. So, seems data is there...
File("C:\My_dir\acquisition.csv").write(Scope1.Channel1.data); // This does not create the file in my directory.
Question
Stefano Stanzione
Dear all,
I recently started using the Analog Discovery 2 and trying to setup a long measurement acquisition (e.g. 1 minute) with the scope at relatively high sampling rate (e.g. 1MHz). For this one has to play with scripting, since it is needed to do multiple acquisitions followed by data writing into a file. The acquisition seems to work, since I can for example print the data on the screen. So, data seems to be there. However, the function File(file_path/file_name.csv).write(Scope1.Channel1.data) does not give any error, while not creating the file. I would have expected an error if the file was not created. So, I am not even sure what went wrong. Could you give me some advise on how to solve this?
Also, is there a reference manual or a tutorial more detailed than the Help inside the Waveform tool?
Below my simple initial script for reference (just made by modifying an example):
Scope1.single();
print(Scope1.Channel1.data); // This shows data on the screen. So, seems data is there...
File("C:\My_dir\acquisition.csv").write(Scope1.Channel1.data); // This does not create the file in my directory.
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