Jump to content
  • 0

Waveforms script: how to write specific data to a file


chat

Question

Hi,

I process measured data from a few consecutive scope recordings in a small script (e.g. measured voltages at certain events). That works fine. Now I have the to idea to do quite some automated measurements and collect all relevant processed data in a single file. Could you explain (and maybe share an example) on how to write specific results (actually stored in variables) in a file? I think I need commands like fopen etc.

Thanks for any support!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi @chat,

I'll leave a caveat up front that I am not an expert in the scripting capabilities in WaveForms, but regarding your automated measurements and collecting all of the data into a single file, are you looking to simply append the data to an existing file? Or combine the data from the multiple acquisitions into whatever format and listed order you want in the file? This thread might be of help to you, though it mostly covers your first use case of measuring voltages at certain events, https://forum.digilent.com/topic/24033-analog-discovery-pro-logger-with-script/.

What do you mean by writing specific results stored in variables? Do you mean things like an RMS value over the acquisition, the single highest measured voltage value, or how many times a specific digital sequence was read (or number of times a voltage or math value crossed a threshold)?

Otherwise, the engineer who would best be able to address your question (Attila) is out of office until next year so it will be a couple of weeks before we can give you some further feedback.

Thanks,
JColvin

Link to comment
Share on other sites

  • 0

Dear @JColvin,

happy New Year and thanks for your reply. And apologies for my late reply.

In fact, with the link to the other post and the online help I managed to get my script running as desired.😃

For now nor further help is needed. Again, thanks a lot!

chat

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...