Pico Communications PicoScope 2105, PicoScope 2104 Programming, 1 C, GUI example, Console example

Page 27

Technical reference

25

3.6Programming

3.6.1C

There are two C example programs: one is a simple GUI application, and the other is a more comprehensive console mode program that demonstrates all of the facilities of the driver.

GUI example

The GUI example program is a generic Windows application - that is, it does not use Borland AppExpert or Microsoft AppWizard. To compile the program, create a new project for an Application containing the following files:

ps2000.c

ps2000.rc

and

ps2000bc.lib (Borland 32-bit applications); or

ps2000.lib (Microsoft Visual C 32-bit applications)

The following files must be in the compilation directory:

ps2000.rch

ps2000.h

and the following file must be in the same directory as the executable.

ps2000.dll

Console example

The console example program is also a generic Windows application - that is, it does not use Borland AppExpert or Microsoft AppWizard. To compile the program, create a new project for an Application containing the following files:

ps2000con.c

and

ps2000bc.lib (Borland 32-bit applications); or

ps2000.lib (Microsoft Visual C 32-bit applications).

The following files must be in the compilation directory:

ps2000.h

and the following file must be in the same directory as the executable.

ps2000.dll

Copyright 2006 Pico Technology Limited. All rights reserved.

PS2100044-1.0

Image 27
Contents PicoScope 2104 Table of Contents Introduction Safety symbolsIntroduction OverviewFCC notice Safety warningLicence conditions CE noticeAddress WarrantyTrademarks Company detailsMinimum system requirements Product informationConnectors and controls Installation instructionsChecking the installation Input connectorSpecifications Driver error codes Technical referenceDriver Functions 1 ps2000closeunit2 ps2000flashled 3 ps2000gettimebase 4 ps2000gettimesandvalues Information returned Example 5 ps2000getunitinfo7 ps2000lastbuttonpress 6 ps2000getvalues9 ps2000ready 8 ps2000openunitPs2000runblock 11 ps2000runstreaming Code Enumeration Range Ps2000setchannel13 ps2000setets 15 ps2000stop Ps2000settriggerAdvanced features More on block modeSampling modes Voltage ranges More on streaming modeTriggering ETS Equivalent Time SamplingReading Voltage 7 AC/DC operationOversampling ScalingCombining oscilloscopes Using ETS mode Using different modesUsing block mode Using streaming modeConsole example Programming1 C GUI exampleAgilent VEE Visual BasicDelphi ExcelSoftware error codes TroubleshootingGlossary Timebase Real-time continuous modeStreaming mode Glossary PicoScope softwareETS IndexUSB IndexInterworld Electronics & Computers Inc