2 Getting started .................................................................................................................... 3
1 About the driver ...................................................................................................................................... 3
2 Installing the driver ................................................................................................................................. 3
3 Connecting the logger ............................................................................................................................ 3
4 USB ADC-11 compatibility mode ........................................................................................................... 3
The PicoLog 1000 Series PC Data Loggers are medium-speed, multichannel
voltage-input devices for sampling analog data using a PC. This manual
explains how to use the Application Programming Interface to write your
own programs to control the unit. You should read it in conjunction with the
PicoLog 1000 Series User's Guide.
The following PicoLog 1000 Series Data Loggers are available:
These devices can also be used with the PicoLog data logging software and the PicoScope oscilloscope
software.
The material contained in this release is licensed, not sold. Pico Technology Limited grants a license to the
person who installs this software, subject to the conditions listed below.
Access. The licensee agrees to allow access to this software only to persons who have been informed of
these conditions and agree to abide by them.
Usage. The software in this release is for use only with Pico products or with data collected using Pico
products.
Copyright. Pico Technology Ltd. claims the copyright of, and retains the rights to, all material (software,
documents, etc.) contained in this SDK except the example programs. You may copy and distribute the SDK
without restriction, as long as you do not remove any Pico Technology copyright statements. The example
programs in the SDK may be modified, copied and distributed for the purpose of developing programs to
collect data using Pico products.
Liability. Pico Technology and its agents shall not be liable for any loss, damage or injury, howsoever
caused, related to the use of Pico Technology equipment or software, unless excluded by statute.
Fitness for purpose. As no two applications are the same, Pico Technology cannot guarantee that its
equipment or software is suitable for a given application. It is your responsibility, therefore, to ensure that
the product is suitable for your application.
Mission-critical applications. This software is intended for use on a computer that may be running other
software products. For this reason, one of the conditions of the license is that it excludes use in missioncritical applications, for example life support systems.
Viruses. This software was continuously monitored for viruses during production, but you are responsible
for virus-checking the software once it is installed.
Support. If you are dissatisfied with the performance of this software, please contact our technical support
staff, who will try to fix the problem within a reasonable time. If you are still dissatisfied, please return the
product and software to your supplier within 14 days of purchase for a full refund.
Upgrades. We provide upgrades, free of charge, from our web site at www.picotech.com. We reserve the
right to charge for updates or replacements sent out on physical media.
1.3Trademarks
Pico Technology, PicoLog and PicoScope are trademarks of Pico Technology Limited, registered in the
United Kingdom and other countries.
PicoScope and Pico Technology are registered in the U.S. Patent and Trademark Office.
Windows is a registered trademark of Microsoft Corporation in the USA and other countries.
The PicoLog 1000 Series units are supplied with a kernel driver and a DLL containing routines that you can
call from your own programs. The drivers are supported by the following operating systems:
·
Windows 7
·
Windows 8
·
Windows 10
The PicoSDK containing the drivers is available in 32-bit and 64-bit versions from
www.picotech.com/downloads. The 32-bit driver will run on a 64-bit Windows system if you write a 32-bit
application and run it under WoW64.
The DLL can be used with any programming language or application that can interface with DLLs: for
example, C, Visual Basic for Applications (VBA) and LabVIEW. Example code is available in numerous
repositories under the "picotech" organisation on GitHub. Some of these examples are fairly simple, but the
C console mode example, pl1000con.c, demonstrates most of the facilities available in the driver.
The driver supports up to 64 USB units at one time.
2.2Installing the driver
The driver is included in PicoSDK, which you can download from www.picotech.com/downloads.
Select PicoLog Data Loggers > PicoLog 1012 or PicoLog 1216 > Software > PicoSDK.
2.3Connecting the logger
Before you connect your logger, please install the driver software.
To connect the data logger, plug the cable provided into any available USB port on your PC. The first time
you connect the unit, Windows may display a New Hardware Wizard. Follow any instructions in the Wizard
and wait for the driver to be installed. Later versions of Windows display an Installing new hardware
message and complete the process automatically. The unit is then ready for use.
2.4USB ADC-11 compatibility mode
The PicoLog 1000 Series data loggers may be used as replacements for the USB ADC-11, an 11-channel
data logger previously available from Pico Technology. The 1000 Series units have all the functions of the
USB ADC-11 and some extra functions such as extra digital outputs, a PWM output and a sensor power
output.
The 1000 Series units are API-compatible with the USB ADC-11. This means that any programs that you
have already written do not need to be changed or recompiled - you simply need to update the
usbadc11.dll to the latest version supplied in PicoSDK. The 1000 Series unit will behave like a USB ADC-
11 and the extra outputs (pins 15 to 25) will be internally disconnected. You can continue to use the unit with
an old ADC-11 terminal board if you have one, or you can switch to the new Small Terminal Board (PP545).
If you wish to use the extra functions of the 1000 Series units, you must rewrite your application to use the
new PicoLog 1000 Series DLL (pl1000.dll), which is described in this manual and is available free of
charge from Pico Technology. Example code is available to help you make the transition.
BM_SINGLE: collect a single block of data and exit
·
BM_WINDOW: collect a series of overlapping blocks of data
·
BM_STREAM: collect a continuous stream of data
BM_SINGLE is useful when you wish to collect data at high speed for a short period: for example, to collect
1000 readings in 50 milliseconds. The maximum capture size in this mode is 1 million samples.
BM_WINDOW is useful when collecting several blocks of data at low speeds - for example when collecting
10,000 samples over 10 seconds. Collecting a sequence of single blocks like this would take 10 seconds for
each block, so displayed data would not be updated frequently. Using windowing, it is possible to ask for a
new block more frequently, for example every second, and to receive a block containing 9 seconds of repeat
data and 1 second of new data. The block is effectively a 10-second window that advances one second per
cycle.
BM_STREAM is useful when you need to collect data continuously for long periods. In principle, it could be
used to collect data indefinitely. Every time pl1000GetValues() is called, it returns the new readings
since the last time it was called. The noOfValues argument passed to pl1000Run() must be sufficient to
ensure that the buffer does not overflow between successive calls to pl1000GetValues(). For example, if
you call pl1000GetValues() every second and you are collecting 500 samples per second, noOfValues
must be at least 500, or preferably 1000, to allow for delays in the operating system.
3.2Scaling
The PicoLog 1000 Series devices produce values in the range 0 to maxValue, where maxValue is the value
returned by pl1000MaxValue(). To convert ADC readings to volts, multiply by 2.5 and divide by
maxValue.
For example, maxValue for the PicoLog 1216 is 4095. Therefore, an ADC reading of 132 from this device
from a represents 132 x 2.5 / 4095 = approx. 0.0806 volts.
The driver routines in the PicoLog 1000 Series API are listed, with short descriptions, in the Table of
Contents at the start of this manual.
The driver allows you to do the following:
·
Identify and open the logger
·
Take a single reading from a particular channel
·
Collect a block of samples at fixed time intervals from one or more channels
·
Set up a trigger event for a particular channel
You can specify a sampling interval from 1 microsecond to 1 second. The shortest interval that the driver
will accept depends on the capture mode selected.
The normal calling sequence to collect a block of data is as follows:
Check that the driver version is correct
Open the driver
Set trigger mode (if required)
Set sampling mode (channels and time per sample)
While you want to take measurements,
Run
While not ready
Wait
End while
... Get a block of data ...
End While
Close the driver (this happens automatically when the application terminates)
4.8pl1000OpenUnitAsync() - open the unit without
waiting for completion
PICO_STATUS pl1000OpenUnitAsync
(
int16_t * status
)
This function opens a PicoLog 1000 Series data logger without waiting for the operation to finish. You can
find out when it has finished by periodically calling pl1000OpenUnitProgress() until that function
returns a non-zero value and a valid data logger handle.
The driver can support up to 64 data loggers.
Arguments:
status, a location where the function writes a status flag:
0: if there is already an open operation in progress
1: if the open operation is initiated
Call this function with us_for_block set to the number of microseconds in which you wish to capture the
entire requested data set. The function will return the actual number of microseconds the operation will
take. You can then calculate the sampling interval i as follows:
in BM_SINGLE mode*:
i = 1 µs x us_for_block / (ideal_no_of_samples x no_of_channels)
in other modes:
i = 10 µs x us_for_block / (ideal_no_of_samples x no_of_channels)
* BM_SINGLE mode can achieve sampling intervals down to 1 µs when ideal_no_of_samples x
no_of_channels is no more than 8192. Under all other conditions, the fastest possible sampling interval
is 10 µs per channel and ideal_no_of_samples x no_of_channels may be anything up to 1000000.
Arguments:
handle, device identifier returned by pl1000OpenUnit() or pl1000OpenUnitProgress()
us_for_block, on entry: the target total time in which to collect (ideal_no_of_samples *
no_of_channels) samples, in microseconds; on exit: the time the driver will actually take to achieve this.
ideal_no_of_samples, the number of samples that you want to collect per channel. This number is
used only for timing calculations.
channels, an array of numbers identifying the channels from which you wish to capture:
[PL1000_CHANNEL_1 to PL1000_CHANNEL_12] (PicoLog 1012)
[PL1000_CHANNEL_1 to PL1000_CHANNEL_16] (PicoLog 1216)
Sampling of multiple channels is sequential.
no_of_channels, the number of channels in the channels array
This function sets up the trigger, which controls when the unit starts capturing data.
Arguments:
handle, device identifier returned by pl1000OpenUnit() or pl1000OpenUnitProgress()
enabled, whether to enable or disable the trigger:
0: disable the trigger
1: enable the trigger
auto_trigger, whether to rearm the trigger automatically after each trigger event:
0: do not auto-trigger
1: auto-trigger
auto_ms, time in milliseconds after which the unit will auto-trigger if the trigger condition is not met
channel, which channel to trigger on:
[PL1000_CHANNEL_1 to PL1000_CHANNEL_12] (PicoLog 1012)
[PL1000_CHANNEL_1 to PL1000_CHANNEL_16] (PicoLog 1216)
dir, which edge to trigger on:
0: rising edge
1: falling edge
threshold, trigger threshold (the level at which the trigger will activate) in ADC counts
hysteresis, trigger hysteresis in ADC counts. This is the difference between the upper and lower
thresholds. The signal must then pass through both thresholds in the same direction in order to activate the
trigger, so that there are fewer unwanted trigger events caused by noise. The minimum value allowed is 1.
delay, delay between the trigger event and the start of the block as a percentage of the block size. 0%
means that the trigger event is the first data value in the block, and -50% means that the trigger event is in
the middle of the block.
This function aborts data collection. It is the normal method of terminating BM_WINDOW and BM_STREAM
data collection. You can also call it to terminate a BM_SINGLE data collection early, but this will invalidate
any data that has been captured.
Arguments:
handle, device identifier returned by pl1000OpenUnit() or pl1000OpenUnitProgress()
ADC. Analog to Digital Converter. An ADC samples analog signals and converts them to digital data for
storage and processing. It is an essential component of a data logger.
DLL. Dynamic Link Library. A file containing a collection of Windows functions designed to perform a
specific class of operations. A DLL is supplied with the PicoLog Data Loggers to enable you to control the
devices from your own programs.
Driver. A small program that acts as an interface, generally between a hardware component and a computer
program. The PicoLog Data Loggers require a USB driver that runs in the Windows kernel, and a second
driver in the form of a DLL that communicates with your application.
Maximum sampling rate. A figure indicating the maximum number of samples the ADC is capable of
acquiring per second. Maximum sample rates are usually given in S/s (samples per second). The higher the
sampling rate of the ADC, the more accurately it can represent the high-frequency details in a signal.
Streaming. An operating mode in which the ADC samples data and returns it to the computer in an unbroken
stream.
USB. Universal Serial Bus. This is a standard port that enables you to connect external devices to PCs. A fullspeed USB 2.0 port operates at up to 480 megabits per second. The PicoLog 1000 Series is also compatible
with any USB port from USB 1.1 upwards.