PICO PT-104 Manuel

Programmer's Guide
usbpt104pg r8
USB/Ethernet PRT Data Logger
PT-104


IUSB PT-104 USB/Ethernet RTD Data Logger Programmer's Guide
Copyright © 2010–2017 Pico Technology Ltd. All rights reserved. usbpt104pg r8
Contents
1 Introduction ......................................................................................................................... 1
1 Overview ................................................................................................................................................. 1
2 Legal information ................................................................................................................................... 1
3 Trademarks ............................................................................................................................................ 2
2 Driver information ............................................................................................................... 3
3 API functions ...................................................................................................................... 4
1 UsbPt104CloseUnit ................................................................................................................................ 5
2 UsbPt104Enumerate .............................................................................................................................. 6
3 UsbPt104GetUnitInfo ............................................................................................................................. 7
4 UsbPt104GetValue ................................................................................................................................. 8
5 UsbPt104IpDetails ................................................................................................................................. 9
6 UsbPt104OpenUnit .............................................................................................................................. 10
7 UsbPt104OpenUnitViaIp ...................................................................................................................... 11
8 UsbPt104SetChannel ........................................................................................................................... 12
9 UsbPt104SetMains .............................................................................................................................. 13
4 Constants and enumerated types ................................................................................... 14
5 Ethernet protocol .............................................................................................................. 15
1 Enabling the Ethernet module ............................................................................................................. 15
2 Finding Ethernet PT-104s .................................................................................................................... 15
1 Commands ............................................................................................................................... 15
3 Unlocked unit response ....................................................................................................................... 16
4 Locked unit responses ......................................................................................................................... 16
5 To calculate a resistance ..................................................................................................................... 17
6 Technical reference .......................................................................................................... 18
Index ..................................................................................................................................... 23


USB PT-104 USB/Ethernet RTD Data Logger Programmer's Guide 1
Copyright © 2010–2017 Pico Technology Ltd. All rights reserved. usbpt104pg r8
1 Introduction
1.1 Overview
The PT-104 is a four-channel, high-resolution data logger for use with
PT100 and PT1000 type platinum resistance thermometer (PRT) sensors.
As well as temperature, it can also be used to measure resistance and
voltage.
Additional information
For instructions on connecting and using the device, and setting it up with
the PicoLog software, please see the PT-104 Data Logger User's Guide
available on www.picotech.com.
1.2 Legal information
The material contained in this release is licensed, not sold. Pico Technology 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 Limited claims the copyright of, and retains the rights to, all material (software,
documents etc.) contained in this release. You may copy and distribute the entire release in its original state,
but must not copy individual items within the release other than for backup purposes.
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. 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 usage in mission-
critical applications, for example life support systems.
Viruses. This software was continuously monitored for viruses during production. However, 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.

Introduction2
Copyright © 2010–2017 Pico Technology Ltd. All rights reserved.usbpt104pg r8
1.3 Trademarks
Pico Technology, and PicoLog are trademarks of Pico Technology Limited, registered in the United Kingdom
and other countries.
PicoLog 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.

USB PT-104 USB/Ethernet RTD Data Logger Programmer's Guide 3
Copyright © 2010–2017 Pico Technology Ltd. All rights reserved. usbpt104pg r8
2Driver information
The USB PT-104 driver is available in 32-bit and 64-bit versions of the PicoSDK from www.picotech.com.
Example code is available from repositories under the "picotech" organization in GitHub.
The driver is supplied as a Windows DLL, usbpt104.dll, which can be used with many programming
languages.

API functions4
Copyright © 2010–2017 Pico Technology Ltd. All rights reserved.usbpt104pg r8
3API functions
These are the API functions provided by the driver:
UsbPt104CloseUnit
Close the port (do this each time you finish using the device!)
UsbPt104Enumerate
Get list of attached devices.
UsbPt104GetUnitInfo
Retrieve information about this PT-104.
UsbPt104GetValue
Get the most recent data reading from a channel.
UsbPt104IpDetails
Read or write IP settings.
UsbPt104OpenUnit
Open the device through its USB interface.
UsbPt104OpenUnitViaIp
Open the device through its Ethernet interface.
UsbPt104SetChannel
Specify the sensor type and filtering for a channel.
UsbPt104SetMains
Change the mains noise filtering setting to 60 Hz. The default is 50 Hz.
The normal calling sequence for these functions is as follows:
Load driver
Open unit
Set channels
While you want to read data
Get data
End while
Close unit
Unload driver*
* Happens automatically when application is terminated.

USB PT-104 USB/Ethernet RTD Data Logger Programmer's Guide 5
Copyright © 2010–2017 Pico Technology Ltd. All rights reserved. usbpt104pg r8
3.1 UsbPt104CloseUnit
PICO_STATUS UsbPt104CloseUnit (
int16_t handle
)
This function disconnects the driver from the device.
Arguments:
handle, identifies the device to close
Returns:
defined in PicoStatus.h

API functions6
Copyright © 2010–2017 Pico Technology Ltd. All rights reserved.usbpt104pg r8
3.2 UsbPt104Enumerate
PICO_STATUS UsbPt104Enumerate (
int8_t * details,
uint32_t * length,
COMMUNICATION_TYPE type
)
This function returns a list of all the attached PT-104 devices of the specified port type.
Arguments:
details, a string buffer to receive a maximum of length characters. The string is a
comma-separated list of attached devices of the selected type. The buffer must be
long enough to accommodate the expected string.
USB devices are listed in this format:
USB:Serial Number
Example: USB:CT264/118
Ethernet devices are listed in this format:
IP:Serial Number[IP Address:port]
Example: IP:CT264/118[192.168.1.253:6500]
length,
input:
the length of the details buffer
output:
the length of the information string returned
type, the communication type used by the PT-104. Can be any of the following
enumerated types:
CT_USB = 0x00000001 (lists only USB-connected devices)
CT_ETHERNET = 0x00000002 (lists only Ethernet-connected devices)
CT_ALL = 0xFFFFFFFF (lists all devices regardless of connection type)
Returns:
defined in PicoStatus.h
Autres manuels pour PT-104
2
Table des matières
Autres manuels PICO Autre



















