I start with a sample of a config file:
Sample invocation (in Linux):
Code: Select all
# hi! I'm the start of a command file... d12 vb0 vc0 vd0 va200 # set up generator as a calibration resource (10 mV RMS) gws gf500000 gv14.14 # intend to get 125 MSPS i 3 #b31250000i |./anyprocess > data.txt
Source code is attached (based on ps5000acon from 2017), where the binary name is picocontrol.
Code: Select all
$ ./picocontrol control.txt PicoScope 5000 Series (A API) Driver Example Program Enumerating Units... *** A command batch file control.txt will be executed after enumeration *** Found one device, opening... Driver Version: PS5000A Lc@ USB Version: 2.0 Hardware Version: 1 Variant Info: 5443A Serial: EV369/079 Cal Date: 06Jan17 Kernel Version: 0.0 Digital HW Version: 1 Analogue HW Version: 1 Firmware 1: 22.214.171.124 Firmware 2: 126.96.36.199 Handle: 1 Device opened successfully, cycle 1 setTrigger:ps5000aSetTriggerChannelDirections ------ 0x0000000d *** Enter '?' for a list of commands *** # hi! I'm the start of a command file... Resolution selected: 12 bits Channel B switched off Channel C switched off Channel D switched off Channel A range: 200 mV # set up generator as a calibration resource (10 mV RMS) Waveform is set to Sine Frequency set to 500000 Hz Peak Voltage set to 14.140000 mV # intend to get 125 MSPS Timebase used 3 = 8ns sample interval #b31250000i |./anyprocess > data.txt End of batch processing. Switched to interactive mode. > ? Command Summary: T - Triggered block E - Collect a block of data using ETS A - ADC counts/mV R - Collect set of rapid captures S - Immediate streaming W - Triggered streaming D - Set resolution [8 | 12 | 14 | 15 | 16] bits I - Set timebase V - Set voltages (FS-range) in mV B - Immediate block G - Signal generator (optional) [ Wave | Freq. | Volt/Ampl.] X - Exit *** Enter '
?' for specific command help *** >
The block data handler is modified such that you can pipe the captured data to another process.