PICO PT-104 Programmer's Manual

Usb/ethernet prt
Hide thumbs Also See for PT-104:

Advertisement

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

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PT-104 and is the answer not in the manual?

Questions and answers

Summary of Contents for PICO PT-104

  • Page 1 PT-104 USB/Ethernet PRT Data Logger Programmer's Guide usbpt104pg r8...
  • Page 3: Table Of Contents

    USB PT-104 USB/Ethernet RTD Data Logger Programmer's Guide 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 ..........................
  • Page 5: Introduction

    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.
  • Page 6: Trademarks

    Introduction 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.
  • Page 7: Driver Information

    USB PT-104 USB/Ethernet RTD Data Logger Programmer's Guide Driver 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.
  • Page 8: Api Functions

    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. usbpt104pg r8 Copyright © 2010–2017 Pico Technology Ltd. All rights reserved.
  • Page 9: Usbpt104Closeunit

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

    * details, uint32_t * length, COMMUNICATION_TYPE type This function returns a list of all the attached PT-104 devices of the specified port type. details, length Arguments: a string buffer to receive a maximum of characters. The string is a comma-separated list of attached devices of the selected type.
  • Page 11: Usbpt104Getunitinfo

    USB PT-104 USB/Ethernet RTD Data Logger Programmer's Guide UsbPt104GetUnitInfo PICO_STATUS UsbPt104GetUnitInfo ( int16_t handle, int8_t * string, int16_t stringLength, int16_t * requiredSize, PICO_INFO info This function obtains information on a specified device. Arguments: handle, identifies the device whose information is required...
  • Page 12: Usbpt104Getvalue

    Once you open the driver and define some channels, the driver begins to take continuous readings from the PT-104. When you call this function, it immediately sets data to the most recent reading for the specified channel. The scaling of measurements is as follows:...
  • Page 13: Usbpt104Ipdetails

    USB PT-104 USB/Ethernet RTD Data Logger Programmer's Guide UsbPt104IpDetails PICO_STATUS UsbPt104IpDetails ( int16_t handle, int16_t * enabled, int8_t * ipaddress, uint16_t * length, uint16_t * listeningPort, IP_DETAILS_TYPE type type This function either reads or writes the IP details of a specified device. The argument controls whether the operation is a read or a write.
  • Page 14: Usbpt104Openunit

    This function obtains a handle for the PT-104 device with the given serial number. If you wish to use more than one PT-104, you must call the function once for each device. handle, output: handle of the device that was opened. This value is used to identify the Arguments: device in all further function calls.
  • Page 15: Usbpt104Openunitviaip

    Using serial number identification, only a device on the local network can be opened. If you wish to use more than one PT-104, you must call the function once for each device. To control the device directly through the Ethernet port without using the usbpt104 DLL, see Ethernet protocol.
  • Page 16: Usbpt104Setchannel

    This function configures a single channel of the specified PT-104. It can be called any time after calling UsbPt104OpenUnit. The fewer channels selected, the more frequently they will be updated. Measurement takes about 720 ms per active channel.
  • Page 17: Usbpt104Setmains

    USB PT-104 USB/Ethernet RTD Data Logger Programmer's Guide UsbPt104SetMains PICO_STATUS UsbPt104SetMains ( int16_t handle, uint16_t sixty_hertz This function is used to inform the driver of the local mains (line) frequency. This helps the driver to filter out electrical noise. handle, identifies the device to be configured Arguments: sixty_hertz, for 50 Hz set to 0;...
  • Page 18: Constants And Enumerated Types

    USBPT104_RESISTANCE_TO_10K, USBPT104_DIFFERENTIAL_TO_115MV, USBPT104_DIFFERENTIAL_TO_2500MV, USBPT104_SINGLE_ENDED_TO_115MV, USBPT104_SINGLE_ENDED_TO_2500MV, USBPT104_MAX_DATA_TYPES } USBPT104_DATA_TYPES; typedef enum enIpDetailsType IDT_GET, IDT_SET, } IP_DETAILS_TYPE; typedef enum enCommunicationType CT_USB = 0x00000001, CT_ETHERNET = 0x00000002, CT_ALL = 0xFFFFFFFF } COMMUNICATION_TYPE; usbpt104pg r8 Copyright © 2010–2017 Pico Technology Ltd. All rights reserved.
  • Page 19: Ethernet Protocol

    USB PT-104 USB/Ethernet RTD Data Logger Programmer's Guide Ethernet protocol Using the protocol described below, the PT-104 can be controlled directly through the Ethernet port without using the usbpt104 DLL. Enabling the Ethernet module By default the Ethernet module is disabled to save power. To enable it, plug the connector into a USB port and use the Ethernet settings application installed with PicoLog.
  • Page 20: Unlocked Unit Response

    This means there will be incoming data approximately every converting 0x00 720 ms. To stop all converting, send a command with data to turn off all channels. usbpt104pg r8 Copyright © 2010–2017 Pico Technology Ltd. All rights reserved.
  • Page 21: To Calculate A Resistance

    /(measurement 1 - measurement 0) · To convert to a resistance, divide result by 1 000 000.0. For other measurement types see the Protocol information in the Serial Port PT-104 User's Guide. Copyright © 2010–2017 Pico Technology Ltd. All rights reserved. usbpt104pg r8...
  • Page 22: Technical Reference

    89.010309 89.404445 89.798455 90.192339 90.586099 90.979734 91.373246 91.766634 92.159898 92.553041 92.946061 93.338960 93.731737 94.124394 94.516930 94.909346 95.301643 95.693820 96.085879 96.477819 96.869641 97.261345 97.652931 98.044401 98.435753 98.826989 99.218109 99.609112 100.000000 usbpt104pg r8 Copyright © 2010–2017 Pico Technology Ltd. All rights reserved.
  • Page 23 USB PT-104 USB/Ethernet RTD Data Logger Programmer's Guide 100.390772 100.781429 101.171970 101.562396 101.952706 102.342901 102.732980 103.122944 103.512792 103.902525 104.292142 104.681644 105.071030 105.460301 105.849456 106.238496 106.627420 107.016229 107.404922 107.793500 108.181962 108.570309 108.958540 109.346656 109.734656 110.122541 110.510310 110.897964 111.285502 111.672925 112.060232 112.447424 112.834500...
  • Page 24 133.184261 133.565100 133.945824 134.326432 134.706925 135.087302 135.467564 135.847710 136.227741 136.607656 136.987456 137.367140 137.746709 138.126162 138.505500 138.884722 139.263829 139.642820 140.021696 140.400456 140.779101 141.157630 141.536044 141.914342 142.292525 142.670592 143.048544 143.426380 143.804101 usbpt104pg r8 Copyright © 2010–2017 Pico Technology Ltd. All rights reserved.
  • Page 25 USB PT-104 USB/Ethernet RTD Data Logger Programmer's Guide 144.181706 144.559196 144.936570 145.313829 145.690972 146.068000 146.444912 146.821709 147.198390 147.574956 147.951406 148.327741 148.703960 149.080064 149.456052 149.831925 150.207682 150.583324 150.958850 151.334261 151.709556 152.084736 152.459800 152.834749 153.209582 153.584300 153.958902 154.333389 154.707760 155.082016 155.456156 155.830181 156.204090...
  • Page 26 165.514284 165.885190 166.255981 166.626656 166.997216 167.367660 167.737989 168.108202 168.478300 168.848282 169.218149 169.587900 169.957536 170.327056 170.696461 171.065750 171.434924 171.803982 172.172925 172.541752 172.910464 173.279060 173.647541 174.015906 174.384156 174.752290 175.120309 175.488212 175.856000 usbpt104pg r8 Copyright © 2010–2017 Pico Technology Ltd. All rights reserved.
  • Page 27: Index

    USB PT-104 USB/Ethernet RTD Data Logger Programmer's Guide Index Opening a unit 10 Batch number 7 Serial number 7 Calibration date 7, 16 Channel setup 12 Trademarks 2 Closing a unit 5 COMMUNICATION_TYPE type 14 USB version 7 USBPT104_CHANNELS type 14...
  • Page 28 Tel: +44 (0) 1480 396 395 Tel: +1 800 591 2796 Tel: +86 21 2226-5152 Fax: +44 (0) 1480 396 296 Fax: +1 620 272 0981 sales@picotech.com pico.china@picotech.com support@picotech.com www.picotech.com usbpt104pg r8 2017-09-21 Copyright © 2010–2017 Pico Technology Ltd. All rights reserved.

Table of Contents