I have written some Matlab code that drives a pico 4226 as both test signal generator and data acquisition.
What I wanted to do was start a block mode data capture and then adjust the frequency / amplitude of the built in sig gen during the capture.
%set sig gen to base frequency and amplitude
%start scope capture
ps4000RunBlock (for a few seconds)
%change sig gen setting to new amplitude or frequency
%grab the data
%wait until the capture is complete
%pull in the data
The matlab program stops, whilst waiting for a response from the PicoScope, when the ps4000SetSigGenBuiltIn command is issued after the ps4000RunBlock command. It seems the PicoScope won't talk to matlab until it's finished acquiring data.
Is it actually possible to send a command to the AWG whilst running a block mode capture? Is so how?