PicoScope 7 Software
Available on Windows, Mac and Linux
PicoScope 7 Software
Available on Windows, Mac and Linux
OEM & custom applications
PicoScope, Pico data logger and RF products can be used as components in custom applications and OEM projects.
A to Z of PC oscilloscopes
Everything you need to know about PC oscilloscopes from Advanced Triggers to Zooming.
A to Z of Data Loggers
Everything you need to know about PC-based data loggers from Alarms to Zooming.
Application Notes
Details of some of the many applications for Pico data logger and oscilloscope products.
How do I measure...?
Find out how you can measure using Pico products
Videos
Showing you how to get the most out of PicoScope oscilloscope software.
Documentation
Up-to-date versions of the documentation supplied with your products in PDF format.
Educational Experiments
Our library of science experiments suitable for use with oscilloscope and data logging products.
PicoApps
Want to share hints, tips and code with other developers? Show your Pico-based products to the world.
Newsletter
Archive of our monthly Test and Measurement Newsletters.
Code: Select all
int16_t g_handle;
int16_t isReady;
PICO_STATUS status;
status = pl1000OpenUnit(&g_handle);
int16_t channels [] = {(int16_t) PL1000_CHANNEL_1, (int16_t) PL1000_CHANNEL_2 };
uint32_t nSamples = 1000; // Should be equal to nChannels * nSamplesPerChannel
int16_t nChannels = 2;
/*WatchList_1: status=0 ; g_handle=16384 ; channels[]={1,2} ; nChannels=2 */
uint32_t nSamplesPerChannel = 500;
uint32_t nSamplesCollected;
uint16_t* samples = (uint16_t*) calloc(nSamples, sizeof(uint16_t)); // Size of array should be equal to nChannels * nSamplesPerChannel
uint32_t usForBlock = 1000000; // 1s
uint16_t overflow = 0;
uint32_t triggerIndex = 0;
uint32_t samplingIntervalUs = 0;
// Set the trigger (disabled)
status = pl1000SetTrigger(g_handle, FALSE, 0, 0, 0, 0, 0, 0, 0);
/*WatchList_2: status=0 ; g_handle=16384 ; channels[]={1,2} ; nChannels=2 */
// Set sampling rate and channels
status = pl1000SetInterval(g_handle, &usForBlock, nSamplesPerChannel, channels, nChannels);
/*WatchList_3: status=16="PICO_NULL_PARAMETER" ; g_handle=16384 ; channels[]={2,51} ; nChannels=0 */
samplingIntervalUs = (usForBlock / (nSamplesPerChannel * nChannels));
// Run
status = pl1000Run(g_handle, nSamplesPerChannel, BM_SINGLE);
// Wait until unit is ready
isReady = 0;
while(isReady == 0){
status = pl1000Ready(g_handle, &isReady);
}
nSamplesCollected = nSamplesPerChannel;
status = pl1000GetValues(g_handle, samples, &nSamplesCollected, &overflow, &triggerIndex);
status = pl1000Stop(g_handle);
/* free memory */
free(samples);