• Content Count

  • Joined

  • Last visited

  1. Hi I want to record approx 50-1000 us long square wave signals from a separate waveform generator with Analog Discovery (Portable Analog Circuit Design Kit) via Matlab. The official Matlab code for recording with an Analog Discovery does not work ( Instead, the program is continuously busy when executing startForeground(s) and does not produce results. The official Matlab code for waveform generation and acquisition at the same time ( ) works but allows only for a lower sample rate and takes too long to start measuring for my experiment. Which is why I would prefer to only record rather than outputting zero and recording the actual target signal simultaneously. My Matlab code is s = daq.createSession('digilent'); ch = s.addAnalogInputChannel('ad1', 1, 'Voltage'); s.Rate = 1e6; s.Channels.Range = [-2.5 2.5]; s.DurationInSeconds = 2; [data, timestamps, triggerTime] = startForeground(s); figure plot(timestamps, data); xlabel('Time (seconds)') ylabel('Voltage (Volts)') title(['Clocked Data Triggered on: ' datestr(triggerTime)]) Additional Info: I use the 1+ and 1- pins of the Analog Discovery, the support package Digilent Analog Discovery 15.2.0 is installed, MATLAB version R2015b.