User Manual
Writing your own programs14
Copyright © 2010-2011 Pico Technology Ltd. All rights reserved.usbpt104pg.en
3 Writing your own programs
3.1
C
The C example is a console mode program that demonstrates the facilities of the
driver.
To compile the program, create a new project containing the following files from the
USB PT-104 SDK:
USBPT104con.c
and:
UsbPt104bc.lib (Borland 32-bit applications) or
UsbPt104.lib (Microsoft Visual C 32-bit applications)
The following file must be in the compilation directory:
UsbPt104Api.h
and the following file must be in the same directory as the executable:
USBPT104.dll
3.2
Excel
The easiest way to transfer data into Excel is to use PicoLog.
If, however, you need to do something that is not possible using PicoLog, you can
write an Excel macro that calls UsbPt104.dll to read in a set of data values. The
Excel Macro language is similar to Visual Basic.
The example USBPT104.xls reads values from all four channels every second and
assigns them to cells in the spreadsheet.
3.3
LabVIEW
The routines described here were created using LabVIEW 8.2 on Windows XP.
To use these routines, copy usbpt104.dll to your LabVIEW user.lib directory.
USBPT104.vi is a fully functional example LabVIEW application. It demonstrates how
to connect to the device using both USB and Ethernet. It also demonstrates reading all
possible measurement types from the four channels.