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.
Post by jboxfordni »
Code: Select all
#include "windows.h"
#include
#include
#include
#include "ps2000aAPI.h"
typedef struct
{
int16_t DCcoupled;
int16_t range;
int16_t enabled;
}CHANNEL_SETTINGS;
typedef struct
{
int16_t handle;
PS2000A_RANGE firstRange;
PS2000A_RANGE lastRange;
uint8_t signalGenerator;
uint8_t ETS;
int16_t channelCount;
int16_t maxValue;
CHANNEL_SETTINGS channelSettings[PS2000A_MAX_CHANNELS];
int16_t digitalPorts;
int16_t awgBufferSize;
double awgDACFrequency;
} UNIT;
PICO_STATUS openDevice(UNIT* unit)
{
PICO_STATUS status = ps2000aOpenUnit(&(unit->handle), NULL);
return status;
}
void CloseDevice(UNIT* unit)
{
ps2000aCloseUnit(unit->handle);
}
int main()
{
UNIT unit;
PICO_STATUS status = openDevice(&unit);
if (status != PICO_OK)
{
std::cout << "unit not found: " << status << std::endl;
return -1;
}
// continue with setup here
CloseDevice(&unit);
return 0;
}
Post by jboxfordni »