Jump to content

Jolle

Members
  • Posts

    3
  • Joined

  • Last visited

Community Answers

  1. Jolle's post in Data sampling with USB-231 while controlling other instruments was marked as the answer   
    Maybe it helped I eventually have been able to do what I was looking for. My script might not be the prettiest and it will crash in case one forgets to connect the equipment, but I find it much easier to read and understand, so in case someone else are looking for what I did, I hope it will help them. It might cause problems if anyone tries to acquire data with large number of samples in which case one should look into JRys example.
    The script creates a memory buffer 1,2 times the necessary based on sample_time and sample rate. It then starts the data acquisition and sleeps in sample_time seconds and then stops sampling after which is takes out the data from the memory buffer. I have inserted comments at the places I start and stop the DC load for my application. When the sampling has ended the data is rounded to three digits and returned to the data_set variable which is plotted using matplotlib.

    USB-231_analog_sampling.py
×
×
  • Create New...