User manual
PicoScope 6000 Series Programmer's Guide 87
Copyright © 2009-2013 Pico Technology Ltd. All rights reserved. ps6000pg.en r9
3.10
Programming examples
Your PicoScope SDK installation includes programming examples in various languages
and development environments.
3.10.1
C
The C example program is a comprehensive console mode program that demonstrates
all of the facilities of the driver.
To compile the program, create a new project for an Application containing the
following files: -
ps6000con.c
and:
ps6000bc.lib (Borland 32-bit applications) or
ps6000.lib (Microsoft Visual C 32-bit applications)
The following files must be in the compilation directory:
ps6000Api.h
picoStatus.h
and the following file must be in the same directory as the executable:
ps6000.dll
3.10.2
Visual Basic
The Examples/ps6000/ subdirectory of your PicoScope installation contains the
following files:
ps6000.vbp - project file
ps6000.bas - procedure prototypes
ps6000.frm - form and program
Note: The functions which return a TRUE/FALSE value, return 0 for FALSE and 1 for
TRUE, whereas Visual Basic expects 65 535 for TRUE. Check for >0 rather than
=TRUE.
3.10.3
Excel
1. Load the spreadsheet ps6000.xls
2. Select Tools | Macro
3. Select GetData
4. Select Run
Note: The Excel macro language is similar to Visual Basic. The functions which return
a TRUE/FALSE value, return 0 for FALSE and 1 for TRUE, whereas Visual Basic
expects 65 535 for TRUE. Check for >0 rather than =TRUE.