You are on page 1of 368

Labview Manual

2011 Phidgets Inc.

Labview Manual
2011 Phidgets Inc.
All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic, or mechanical, including photocopying, recording, taping, or information storage and retrieval systems - without the written permission of the publisher. Products that are referred to in this document may be either trademarks and/or registered trademarks of the respective owners. The publisher and the author make no claim to these trademarks. While every precaution has been taken in the preparation of this document, the publisher and the author assume no responsibility for errors or omissions, or for damages resulting from the use of information contained in this document or from the use of programs and source code that may accompany it. In no event shall the publisher and the author be liable for any loss of profit or any other commercial damage caused or alleged to have been caused directly or indirectly by this document. Printed: April 2011 in Canada

Content

Table of Contents
Part 1 Part 2 Welcome to Phidgets Introduction 11 12

1 Understanding ................................................................................................................................... Phidgets 13 2 Platform ................................................................................................................................... Support 14

Part 3

Programming Concept

15

1 Getting ................................................................................................................................... Started 16 2 Event................................................................................................................................... Handler 19 3 Multiple ................................................................................................................................... Devices 22

Part 4

Phidgets Common

23

1 ErrorHandler ................................................................................................................................... 24 2 PhidgetClose ................................................................................................................................... 25 3 PhidgetDelete ................................................................................................................................... 26 4 PhidgetEventCloseOnError ................................................................................................................................... 27 5 PhidgetEventCreateOnError ................................................................................................................................... 28 6 PhidgetEventExeOnError ................................................................................................................................... 29 7 PhidgetGetDeviceClass ................................................................................................................................... 30 8 PhidgetGetDeviceID ................................................................................................................................... 31 9 PhidgetGetDeviceLabel ................................................................................................................................... 32 10 PhidgetGetDeviceName ................................................................................................................................... 33 11 PhidgetGetDeviceType ................................................................................................................................... 34 12 PhidgetGetDeviceVersion ................................................................................................................................... 35 13 PhidgetGetServerStatus ................................................................................................................................... 36 14 PhidgetLibraryVersion ................................................................................................................................... 37 15 PhidgetOpen ................................................................................................................................... 38 16 PhidgetOpenRemote ................................................................................................................................... 39 17 PhidgetOpenRemoteIP ................................................................................................................................... 40 18 PhidgetServerAddress ................................................................................................................................... 41 19 PhidgetServiceID ................................................................................................................................... 42 20 PhidgetSetDeviceLabel ................................................................................................................................... 43 21 SubVIs ................................................................................................................................... 44
_AttachCHK .......................................................................................................................................................... 45 _ChkError .......................................................................................................................................................... 46 _Close .......................................................................................................................................................... 47 _Delete .......................................................................................................................................................... 48 _Open .......................................................................................................................................................... 49 _OpenRem ote .......................................................................................................................................................... 50 2011 Phidgets Inc.

Content

_OpenRem oteIP .......................................................................................................................................................... 51 _SerialReturn.......................................................................................................................................................... 52 _WaitAttach .......................................................................................................................................................... 53 EventCloseIntDouble .......................................................................................................................................................... 54 EventCloseIntInt .......................................................................................................................................................... 55 EventExeIntDouble .......................................................................................................................................................... 56 EventExeIntInt .......................................................................................................................................................... 57

Part 5

Specific Modules

58

1 Phidget ................................................................................................................................... Accelerometer 59


AcceAxisCount .......................................................................................................................................................... 60 AcceCreate .......................................................................................................................................................... 61 AcceEventClose .......................................................................................................................................................... 62 AcceEventCreate .......................................................................................................................................................... 63 AcceEventExe.......................................................................................................................................................... 64 AcceGetData .......................................................................................................................................................... 65 AcceGetMax .......................................................................................................................................................... 66 AcceGetMin .......................................................................................................................................................... 67 AcceGetTrigger .......................................................................................................................................................... 68 AcceOpen .......................................................................................................................................................... 69 AcceSetTrigger .......................................................................................................................................................... 70

2 Phidget ................................................................................................................................... Advanced Servo 71


AdvServoCount .......................................................................................................................................................... 73 AdvServoCreate .......................................................................................................................................................... 74 AdvServoEventClose .......................................................................................................................................................... 75 AdvServoEventCreateCrtChange .......................................................................................................................................................... 76 AdvServoEventCreatePosChange .......................................................................................................................................................... 77 AdvServoEventCreateVelChange .......................................................................................................................................................... 78 AdvServoEventExe .......................................................................................................................................................... 79 AdvServoGetAcce .......................................................................................................................................................... 80 AdvServoGetAcceMax .......................................................................................................................................................... 81 AdvServoGetAcceMin .......................................................................................................................................................... 82 AdvServoGetCurrent .......................................................................................................................................................... 83 AdvServoGetEngaged .......................................................................................................................................................... 84 AdvServoGetPos .......................................................................................................................................................... 85 AdvServoGetPosMax .......................................................................................................................................................... 86 AdvServoGetPosMin .......................................................................................................................................................... 87 AdvServoGetRam .......................................................................................................................................................... pingState 88 AdvServoGetServoType .......................................................................................................................................................... 89 AdvServoGetVel .......................................................................................................................................................... 90 AdvServoGetVellm .......................................................................................................................................................... t 91 AdvServoGetVelm .......................................................................................................................................................... ax 92 AdvServoGetVelm .......................................................................................................................................................... in 93 AdvServoOpen .......................................................................................................................................................... 94 AdvServoSetAcce .......................................................................................................................................................... 95 AdvServoSetEngaged .......................................................................................................................................................... 96 AdvServoSetPos .......................................................................................................................................................... 97 AdvServoSetPosMax .......................................................................................................................................................... 98 AdvServoSetPosMin .......................................................................................................................................................... 99 AdvServoSetRam .......................................................................................................................................................... pingState 100 AdvServoSetServoParam .......................................................................................................................................................... eters 101 AdvServoSetServoType .......................................................................................................................................................... 102 AdvServoSetVellm .......................................................................................................................................................... t 103 2011 Phidgets Inc.

Content

AdvServoStoppedState .......................................................................................................................................................... 104

3 Phidget ................................................................................................................................... Encoder 105


EncoderCreate .......................................................................................................................................................... 106 EncoderEventCloseInput .......................................................................................................................................................... 107 EncoderEventClosePosition .......................................................................................................................................................... 108 EncoderEventCreateInput .......................................................................................................................................................... 109 EncoderEventCreatePosition .......................................................................................................................................................... 110 EncoderEventExeInput .......................................................................................................................................................... 111 EncoderEventExePosition .......................................................................................................................................................... 112 EncoderGetCount .......................................................................................................................................................... 113 EncoderGetEnabledState .......................................................................................................................................................... 114 EncoderGetIndexPosition .......................................................................................................................................................... 115 EncoderGetInputCount .......................................................................................................................................................... 116 EncoderGetInputState .......................................................................................................................................................... 117 EncoderGetPosition .......................................................................................................................................................... 118 EncoderOpen .......................................................................................................................................................... 119 EncoderSetEnabled .......................................................................................................................................................... 120 EncoderSetPosition .......................................................................................................................................................... 121

4 Phidget ................................................................................................................................... InterfaceKit 122


IFCreate .......................................................................................................................................................... 123 IFEventClose.......................................................................................................................................................... 124 IFEventCreateInput .......................................................................................................................................................... 125 IFEventCreateOutput .......................................................................................................................................................... 126 IFEventCreateSensor .......................................................................................................................................................... 127 IFEventExe .......................................................................................................................................................... 128 IFGetDataRate .......................................................................................................................................................... 129 IFGetDataRateMax .......................................................................................................................................................... 130 IFGetDataRateMin .......................................................................................................................................................... 131 IFGetInputCount .......................................................................................................................................................... 132 IFGetInputState .......................................................................................................................................................... 133 IFGetOutputCount .......................................................................................................................................................... 134 IFGetOutputState .......................................................................................................................................................... 135 IFGetRatio .......................................................................................................................................................... 136 IFGetSensorCount .......................................................................................................................................................... 137 IFGetSensorValue .......................................................................................................................................................... 138 IFGetSensorValueRaw .......................................................................................................................................................... 139 IFGetTrig .......................................................................................................................................................... 140 IFOpen .......................................................................................................................................................... 141 IFSetDataRate .......................................................................................................................................................... 142 IFSetOutputState .......................................................................................................................................................... 143 IFSetRatio .......................................................................................................................................................... 144 IFSetTrig .......................................................................................................................................................... 145

5 Phidget ................................................................................................................................... IR 146


IRCreate .......................................................................................................................................................... 147 IREventCloseOnCode .......................................................................................................................................................... 148 IREventCloseOnLearn .......................................................................................................................................................... 149 IREventCloseOnRaw .......................................................................................................................................................... Data 150 IREventCreateOnCode .......................................................................................................................................................... 151 IREventCreateOnLearn .......................................................................................................................................................... 152 IREventCreateOnRaw .......................................................................................................................................................... Data 153 IREventExeOnCode .......................................................................................................................................................... 154 IREventExeOnLearn .......................................................................................................................................................... 155 IREventExeOnRaw .......................................................................................................................................................... Data 156 2011 Phidgets Inc.

Content

IRGetLastCode .......................................................................................................................................................... 157 IRGetLastLearnedCode .......................................................................................................................................................... 158 IRGetRaw Data .......................................................................................................................................................... 159 IROpen .......................................................................................................................................................... 160 IRTransm it .......................................................................................................................................................... 161 IRTransm itRaw .......................................................................................................................................................... 162 IRTransm itRepeat .......................................................................................................................................................... 163

6 Phidget ................................................................................................................................... LED 164


LEDCount .......................................................................................................................................................... 165 LEDCreate .......................................................................................................................................................... 166 LEDGetBrightness .......................................................................................................................................................... 167 LEDGetCurrentLim .......................................................................................................................................................... it 168 LEDGetVoltage .......................................................................................................................................................... 169 LEDOpen .......................................................................................................................................................... 170 LEDSetBrightness .......................................................................................................................................................... 171 LEDSetCurrentLim .......................................................................................................................................................... it 172 LEDSetVoltage .......................................................................................................................................................... 173

7 Phidget ................................................................................................................................... Motor Control 174


MCCreate .......................................................................................................................................................... 175 MCEventCloseInput .......................................................................................................................................................... 176 MCEventCloseVelocityCurrent .......................................................................................................................................................... 177 MCEventCreateCurrent .......................................................................................................................................................... 178 MCEventCreateInput .......................................................................................................................................................... 179 MCEventCreateVelocity .......................................................................................................................................................... 180 MCEventExeInput .......................................................................................................................................................... 181 MCEventExeVelocityCurrent .......................................................................................................................................................... 182 MCGetAcceleration .......................................................................................................................................................... 183 MCGetAccelerationMax .......................................................................................................................................................... 184 MCGetAccelerationMin .......................................................................................................................................................... 185 MCGetCurrent .......................................................................................................................................................... 186 MCGetInputCount .......................................................................................................................................................... 187 MCGetInputState .......................................................................................................................................................... 188 MCGetMotorCount .......................................................................................................................................................... 189 MCGetVelocity .......................................................................................................................................................... 190 MCOpen .......................................................................................................................................................... 191 MCSetAcceleration .......................................................................................................................................................... 192 MCSetVelocity .......................................................................................................................................................... 193

8 Phidget ................................................................................................................................... PH Sensor 194


PHCreate .......................................................................................................................................................... 195 PHEventClose .......................................................................................................................................................... 196 PHEventCreate .......................................................................................................................................................... 197 PHEventExe .......................................................................................................................................................... 198 PHGetPH .......................................................................................................................................................... 199 PHGetPHMax.......................................................................................................................................................... 200 PHGetPHMin .......................................................................................................................................................... 201 PHGetPHTrigger .......................................................................................................................................................... 202 PHGetPotential .......................................................................................................................................................... 203 PHGetPotentialMax .......................................................................................................................................................... 204 PHGetPotentialMin .......................................................................................................................................................... 205 PHOpen .......................................................................................................................................................... 206 PHSetTem perature .......................................................................................................................................................... 207 PHSetTrig .......................................................................................................................................................... 208

9 Phidget ................................................................................................................................... RFID 209


2011 Phidgets Inc.

Content

RFIDCreate .......................................................................................................................................................... 210 RFIDEventClose .......................................................................................................................................................... 211 RFIDEventCloseOutput .......................................................................................................................................................... 212 RFIDEventCreateOutput .......................................................................................................................................................... 213 RFIDEventCreateTag .......................................................................................................................................................... 214 RFIDEventCreateTagLost .......................................................................................................................................................... 215 RFIDEventExe .......................................................................................................................................................... 216 RFIDEventExeOutput .......................................................................................................................................................... 217 RFIDGetAntennaState .......................................................................................................................................................... 218 RFIDGetLastTag .......................................................................................................................................................... 219 RFIDGetLEDState .......................................................................................................................................................... 220 RFIDGetOutputCount .......................................................................................................................................................... 221 RFIDGetOutputState .......................................................................................................................................................... 222 RFIDGetTagState .......................................................................................................................................................... 223 RFIDOpen .......................................................................................................................................................... 224 RFIDSetAntennaState .......................................................................................................................................................... 225 RFIDSetLEDState .......................................................................................................................................................... 226 RFIDSetOutputState .......................................................................................................................................................... 227

10 Phidget ................................................................................................................................... Servo 228


ServoCount .......................................................................................................................................................... 229 ServoCreate.......................................................................................................................................................... 230 ServoEventClose .......................................................................................................................................................... 231 ServoEventCreate .......................................................................................................................................................... 232 ServoEventExe .......................................................................................................................................................... 233 ServoGetEngaged .......................................................................................................................................................... 234 ServoGetPos .......................................................................................................................................................... 235 ServoGetPosMax .......................................................................................................................................................... 236 ServoGetPosMin .......................................................................................................................................................... 237 ServoGetServoType .......................................................................................................................................................... 238 ServoOpen .......................................................................................................................................................... 239 ServoSetEngaged .......................................................................................................................................................... 240 ServoSetPos.......................................................................................................................................................... 241 ServoSetServoParam .......................................................................................................................................................... eters 242 ServoSetServoType .......................................................................................................................................................... 243

11 Phidget ................................................................................................................................... Spatial 244


SpatialCreate .......................................................................................................................................................... 245 SpatialEventClose .......................................................................................................................................................... 246 SpatialEventCreate .......................................................................................................................................................... 247 SpatialEventExe .......................................................................................................................................................... 248 SpatialGetAcce .......................................................................................................................................................... 249 SpatialGetAcceAxisCount .......................................................................................................................................................... 250 SpatialGetAcceMax .......................................................................................................................................................... 251 SpatialGetAcceMin .......................................................................................................................................................... 252 SpatialGetAngRate .......................................................................................................................................................... 253 SpatialGetAngRateMax .......................................................................................................................................................... 254 SpatialGetAngRateMin .......................................................................................................................................................... 255 SpatialGetCom .......................................................................................................................................................... passAxisCount 256 SpatialGetDataRate .......................................................................................................................................................... 257 SpatialGetDataRateMax .......................................................................................................................................................... 258 SpatialGetDataRateMin .......................................................................................................................................................... 259 SpatialGetGyroAxisCount .......................................................................................................................................................... 260 SpatialGetMagField .......................................................................................................................................................... 261 SpatialGetMagFieldMax .......................................................................................................................................................... 262

2011 Phidgets Inc.

Content

SpatialGetMagFieldMin .......................................................................................................................................................... 263 SpatialOpen .......................................................................................................................................................... 264 SpatialResetCom .......................................................................................................................................................... passCorrectionParam eters 265 SpatialSetCom .......................................................................................................................................................... passCorrectionParam eters 266 SpatialSetDataRate .......................................................................................................................................................... 267 SpatialZeroGyro .......................................................................................................................................................... 268

12 Phidget ................................................................................................................................... Stepper 269


StepperCreate .......................................................................................................................................................... 271 StepperEventCloseCurrentVelocity .......................................................................................................................................................... 272 StepperEventCloseInput .......................................................................................................................................................... 273 StepperEventClosePosition .......................................................................................................................................................... 274 StepperEventClosePosition71 .......................................................................................................................................................... 275 StepperEventCreateCurrent .......................................................................................................................................................... 276 StepperEventCreateInput .......................................................................................................................................................... 277 StepperEventCreatePosition .......................................................................................................................................................... 278 StepperEventCreatePosition71 .......................................................................................................................................................... 279 StepperEventCreateVelocity .......................................................................................................................................................... 280 StepperEventExeCurrentVelocity .......................................................................................................................................................... 281 StepperEventExeInput .......................................................................................................................................................... 282 StepperEventExePosition .......................................................................................................................................................... 283 StepperEventExePosition71 .......................................................................................................................................................... 284 StepperGetAcceleration .......................................................................................................................................................... 285 StepperGetAccelerationMax .......................................................................................................................................................... 286 StepperGetAccelerationMin .......................................................................................................................................................... 287 StepperGetCurrent .......................................................................................................................................................... 288 StepperGetCurrentLim .......................................................................................................................................................... it 289 StepperGetCurrentMax .......................................................................................................................................................... 290 StepperGetCurrentMin .......................................................................................................................................................... 291 StepperGetCurrentPosition .......................................................................................................................................................... 292 StepperGetCurrentPosition71 .......................................................................................................................................................... 293 StepperGetEngaged .......................................................................................................................................................... 294 StepperGetPositionMax .......................................................................................................................................................... 295 StepperGetPositionMax71 .......................................................................................................................................................... 296 StepperGetPositionMin .......................................................................................................................................................... 297 StepperGetPositionMin71 .......................................................................................................................................................... 298 StepperGetTargetPosition .......................................................................................................................................................... 299 StepperGetTargetPosition71 .......................................................................................................................................................... 300 StepperGetVelocity .......................................................................................................................................................... 301 StepperGetVelocityLim .......................................................................................................................................................... it 302 StepperGetVelocityMax .......................................................................................................................................................... 303 StepperGetVelocityMin .......................................................................................................................................................... 304 StepperInputCount .......................................................................................................................................................... 305 StepperInputState .......................................................................................................................................................... 306 StepperMotorCount .......................................................................................................................................................... 307 StepperOpen .......................................................................................................................................................... 308 StepperSetAcceleration .......................................................................................................................................................... 309 StepperSetCurrentLim .......................................................................................................................................................... it 310 StepperSetCurrentPosition .......................................................................................................................................................... 311 StepperSetCurrentPosition71 .......................................................................................................................................................... 312 StepperSetEngaged .......................................................................................................................................................... 313 StepperSetTargetPosition .......................................................................................................................................................... 314 StepperSetTargetPosition71 .......................................................................................................................................................... 315 StepperSetVelocityLim .......................................................................................................................................................... it 316 StepperStoppedState .......................................................................................................................................................... 317 2011 Phidgets Inc.

Content

13 Phidget ................................................................................................................................... Temperature Sensor 318


Tem pCreate.......................................................................................................................................................... 319 Tem pEventClose .......................................................................................................................................................... 320 Tem pEventCreate .......................................................................................................................................................... 321 Tem pEventExe .......................................................................................................................................................... 322 Tem pGetAm.......................................................................................................................................................... bient 323 Tem pGetAm.......................................................................................................................................................... bientMax 324 Tem pGetAm.......................................................................................................................................................... bientMin 325 Tem pGetPotential .......................................................................................................................................................... 326 Tem pGetPotentialMax .......................................................................................................................................................... 327 Tem pGetPotentialMin .......................................................................................................................................................... 328 Tem pGetTem .......................................................................................................................................................... perature 329 Tem pGetTem .......................................................................................................................................................... peratureMax 330 Tem pGetTem .......................................................................................................................................................... peratureMin 331 Tem pGetTherm .......................................................................................................................................................... ocoupleType 332 Tem pGetTrigger .......................................................................................................................................................... 333 Tem pInputCount .......................................................................................................................................................... 334 Tem pOpen .......................................................................................................................................................... 335 Tem pSetTherm .......................................................................................................................................................... ocoupleType 336 Tem pSetTrigger .......................................................................................................................................................... 337

14 Phidget ................................................................................................................................... TextLCD 338


TextCreate .......................................................................................................................................................... 339 TextGetBacklightState .......................................................................................................................................................... 340 TextGetBrightness .......................................................................................................................................................... 341 TextGetColum .......................................................................................................................................................... nCount 342 TextGetContrast .......................................................................................................................................................... 343 TextGetCursorBlinkState .......................................................................................................................................................... 344 TextGetCursorState .......................................................................................................................................................... 345 TextGetRow Count .......................................................................................................................................................... 346 TextOpen .......................................................................................................................................................... 347 TextSetBacklightState .......................................................................................................................................................... 348 TextSetBrightness .......................................................................................................................................................... 349 TextSetCharacter .......................................................................................................................................................... 350 TextSetContrast .......................................................................................................................................................... 351 TextSetCursorBlinkState .......................................................................................................................................................... 352 TextSetCursorState .......................................................................................................................................................... 353 TextSetDisplayChar .......................................................................................................................................................... 354 TextSetDisplayString .......................................................................................................................................................... 355

15 Phidget ................................................................................................................................... TextLED 356 16 Phidget ................................................................................................................................... Weight Sensor 357

Part 6

Phidgets Constants

358

1 ServoType ................................................................................................................................... 359 2 ThermocoupleType ................................................................................................................................... 360 3 CodeInfo ................................................................................................................................... 361 4 IREncoding ................................................................................................................................... 362 5 IRLength ................................................................................................................................... 363

2011 Phidgets Inc.

Content

Index

364

2011 Phidgets Inc.

Welcome to Phidgets

11

Welcome to Phidgets

LabVIEW Help
November 2010, Version 0.1-021110 This help system includes information about LabVIEW programming for each Phidget device. It contains programming concepts, step-by-step instructions, and reference information about VIs, functions and palettes. To navigate this help system, use the Contents, Index , and Search tabs to the left of this windows. Phidgets are an easy to use set of building blocks for low cost sensing and control from your PC. Using the Universal Serial Bus (USB) as the basis for all Phidgets, the complexity is managed behind this easy to use and robust Application Program Interface (API) library. This help system may link to Portable Document Format (PDF) versions of documents. You must have Adobe Reader installed to view or search the PDF versions of these manuals. Note: (Mac OS X) Phidgets recommends that you use Safari 1.3.2 or later or Firefox 1.0.2 or later to view the Help. (Linux) Phidgets recommends that you use Mozilla 1.2 or later or Firefox 1.0.2 or later to view the Help. For more information about this help, refer to the following topics: Introduction Programming Concept Phidgets Common Specific Modules Phidgets Constant

2011 Phidgets Inc.

12

Introduction

Introduction
Phidgets are an easy to use set of building blocks for low cost sensing and control from your PC. Using the Universal Serial Bus (USB) as the basis for all Phidgets, the complexity is managed behind this easy to use and robust Application Program Interface (API) library. This manual documents the Phidgets software programming model in National Instruments Labview language. The Programming Concept should be the first section to be read for someone beginning to use Phidgets. After the concepts described are understood, users can read Phidgets Common and Specific Modules for function reference and device documentation in general. Note that these sections are light on function documentation - generally only containing specific reference information and basic function information. For a more detailed introduction, please refer to Understanding Phidgets and Platform Support.

2011 Phidgets Inc.

Introduction

13

2.1

Understanding Phidgets

Hardware Model
All Phidgets are connected to the computer using USB. Most computers support up to 127 USB devices (or more), so it is easy to connect as many Phidgets as are required for almost any project. Phidgets can be connected either directly to a computer or through Hubs, but there are some limitations. The maximum cable length for USB is 15 feet. This is a maximum distance between device and computer, even if there are one or more Hubs in between. There are cable extenders available on the market, but these can be unreliable and are not endorsed by Phidgets Inc. Users should never try to run USB over anything other then a certified USB cable, and should never try to run it longer than the spec. Phidgets run as USB 1.1 low speed or full speed devices, and are supported by both USB 1.1 and USB 2.0 hosts.

Software Model
The Phidgets Labview library is written under the C library - phidget21, which implements the low-level protocols necessary to communicate with the Phidgets, and exports a unified interface to the software programmer. This also makes the Phidgets Labview library cross-platform. The Phidget Labview library contains only glue logic for interfacing with the C library, thus making maintenance much easier. It should be noted the library employs threading and events extensively. (See Programming Concept for more information.)

2011 Phidgets Inc.

14

Introduction

2.2

Platform Support Operating System Support


Windows Microsoft Windows 2000 and later are supported, including 64-bit editions. The Windows libraries are installed using an MSI installer that can be found on the Phidgets web site. This installs the C library, the .NET library, the COM library, the Java library, the Phidget Web Service and the Phidget Control Panel. The Phidget Control Panel is represented by a Ph icon that runs in the system tray (usually on the right end of the Windows task bar). This program can be used to list and control any Phidgets attached to the system, and to control the Web Service. Mac OS X Mac OS X 10.3.9 and newer on Intel and PPC are supported. The Mac libraries are distributed in a .dmg and are installed using a standard Mac package installer. This installs the C library, the Kernel driver, the Java library, the Phidget Web Service and the Phidget Preference Pane. The Phidget Preference Pane is a preference pane which resides in System Preferences. This program can be used to list and control any Phidgets attached to the system, and to control the Web Service. Linux Linux version 2.4 is supported, including 64-bit editions, but 2.6.7 or newer is recommended. The Linux libraries are distributed as source. The source for the C library, with optional JNI (Java support) extensions and the source for the Phidget Web Service are available as a .tar.gz. The included Makefile makes it easy to build and install the libraries on most Linux distribution. Other Other Operating System support is not currently available.

Labview Version Support


The Phidgets Labview library supports 32-bit Labview version 7.1.1 or higher. It also supports 64-bit Labview version 2009 or higher. Note: If you use Labview 64-bit, you need to install the Phidgets Labview 64-bit library.

2011 Phidgets Inc.

Programming Concept

15

Programming Concept
This manual is designed such that both novice and expert users can quickly reference the various Phidget LabVIEW functions. The manual is subdivided into 6 sections: Getting Started, Event Handler, Multiple Devices, Phidgets Common, Specific Modules and Phidgets Constants. Each section is defined as follow: Getting Started: tells users how to communicate with phidgets and perform some basic functions. Use the Getting Started manual as a tutorial to familiarize yourself with Phidget LabVIEW functions and basic features you use to build data acquisition and instrument control applications. Event Handler: needs only be used in applications that need to receive events. Use the Event Handler manual as a tutorial to learn how to construct the event and use the handler. Multiple Devices: needs only be used in applications that involve multiple phidgets. Use the Multiple Devices manual as a tutorial to configure and control many phidgets in one VI. Phidgets Common: contains the common functions for all phidgets. Specific Modules: contains all the functions for specific phidgets. Phidgets Constants: explains all Phidgets pre-defined constants.

Note: It is important for user to upgrade the Phidgets21 library to the most recent version. Click here to check and download the latest version library.

2011 Phidgets Inc.

16

Programming Concept

3.1

Getting Started
Phidgets are an easy to use set of building blocks for low cost sensing and control from your PC. Using the Universal Serial Bus (USB) as the basis for all Phidgets, the complexity is managed behind this easy to use and robust Application Program Interface (API) library. As such, the Phidgets Labview VI features a very simple and easy-to-use set of VIs. At the simplest level, all you have to do to control a Phidget is explained in this section. For illustration purposes, Phidget Accelerometer will be used.

Note: For a more specific illustration on different phidgets, users can refer to different examples accordingly.

2011 Phidgets Inc.

Programming Concept

17

Open the diagram of the "Single control example.vi" under the "Accelerometer" folder.

Phidgets can be programmed into 3 steps:


<Step1> Initialize the Phidget. This includes opening a Phidget hardware, creating a Phidget handler or setting up parameters of a Phidget.

Users can also acquire other information in this step. For more details, please refer to the example called "Remote Example.vi" under "TemperatureSensor" folder.

2011 Phidgets Inc.

18

Programming Concept

If users want to open Phidgets over the network, a PhidgetOpenRemote and AcceCreate functions will be called instead of AcceOpen.

<Step2> Perform any execution related with the Phidget. This includes data acquisition, device control, event execution etc.

<Step3> Close the Phidget. This may include closing the device, releasing all the resources or freeing a Phidget handle and an error handler.

2011 Phidgets Inc.

Programming Concept

19

3.2

Event Handler
This demonstrates how to call a Phidgets event and how to use them. For illustration purposes, Phidget Spatial will be used.

Note: For a more specific illustration on different phidgets, users can refer to different examples accordingly.

2011 Phidgets Inc.

20

Programming Concept

Open the diagram of the "Spatial event example.vi" under the "Spatial" folder.

Phidgets Event can be programmed into 3 steps:


<Step1> Create an event handler.

<Step2> Perform any event execution related with the Phidget.

2011 Phidgets Inc.

Programming Concept

21

<Step3> Close the related event.

Note: When execute an event, please make sure "create", "execute" and "close" the same event. For example, user wants to run an Event called A. He has to place "CreateEventA.vi", "ExeEventA.vi" and "CloseEventA.vi" on the block diagram. He cannot place "CloseEventB.vi" instead of "CloseEventA.vi". However, for some Phidgets event, they share same VIs. (For more details, please refer to specific Phidgets.)

Phidget Error Event:


Another useful example will be "Temp On Error.vi" under "TemperatureSensor" folder. In this example, the error event is actually located in "Common Functions" folder. It will detect asynchronous errors from Phidgets.

Note: Phidgets can also support multiple events. For an example, please refer to "Event handler example.vi" under the "InterfaceKit" folder.

2011 Phidgets Inc.

22

Programming Concept

3.3

Multiple Devices
Phidgets Labview can control multiple phidgets. As long as the handlers are different, different phidgets can run in parallel. For a more detailed illustration, please refer to the example of "Multiple control example (Parallel).vi" and "Multiple control example (Advanced).vi" under the "Accelerometer" folder.

Note: Another example will be "TemperatureDisplay.vi" under "TextLCD" folder. This example shows how to combined use different phidgets.

2011 Phidgets Inc.

Phidgets Common

23

Phidgets Common
This section describes the VI functions used by all Phidgets. The SubVI folder contains advanced LabVIEW VIs

ErrorHandler PhidgetClose PhidgetDelete PhidgetEventCloseOnError PhidgetEventCreateOnError PhidgetEventExeOnError PhidgetGetDeviceClass PhidgetGetDeviceID PhidgetGetDeviceLabel PhidgetGetDeviceName PhidgetGetDeviceType PhidgetGetDeviceVersion PhidgetGetServerStatus PhidgetLibraryVersion PhidgetOpen PhidgetOpenRemote PhidgetOpenRemoteIP PhidgetServerAddress PhidgetServiceID PhidgetSetDeviceLabel SubVIs (Folder)

2011 Phidgets Inc.

24

Phidgets Common

4.1

ErrorHandler
Description:
Create a Phidget Error handle.

Connector Pane:

Controls and Indicators:


Input Describes error conditions that occur before this node runs.

Output ON if error occurs. Contains error information.

2011 Phidgets Inc.

Phidgets Common

25

4.2

PhidgetClose
Description:
Close a Phidget handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Contains error information.

2011 Phidgets Inc.

26

Phidgets Common

4.3

PhidgetDelete
Description:
Delete a Phidget handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Contains error information.

2011 Phidgets Inc.

Phidgets Common

27

4.4

PhidgetEventCloseOnError
Description:
Close the the error handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

28

Phidgets Common

4.5

PhidgetEventCreateOnError
Description:
Set up an error event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

Phidgets Common

29

4.6

PhidgetEventExeOnError
Description:
This is called when an asynchronous error occurs.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Same as the Event Registration Refnum In. Returns the event status. (Executed is T; Not executed is F) The error code to get the description of. Contain the error description string. Contains error information.

2011 Phidgets Inc.

30

Phidgets Common

4.7

PhidgetGetDeviceClass
Description:
Get the class of a Phidget.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the device class constant. Contains error information.

2011 Phidgets Inc.

Phidgets Common

31

4.8

PhidgetGetDeviceID
Description:
Get the device ID of a Phidget.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the device ID constant. Contains error information.

2011 Phidgets Inc.

32

Phidgets Common

4.9

PhidgetGetDeviceLabel
Description:
Get the label of a Phidget.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the device label. Contains error information.

2011 Phidgets Inc.

Phidgets Common

33

4.10

PhidgetGetDeviceName
Description:
Get the specific name of a Phidget.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the device name. Contains error information.

2011 Phidgets Inc.

34

Phidgets Common

4.11

PhidgetGetDeviceType
Description:
Get the type (class) of a Phidget.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the device type. Contains error information.

2011 Phidgets Inc.

Phidgets Common

35

4.12

PhidgetGetDeviceVersion
Description:
Get the firmware version of a Phidget.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the device version. Contains error information.

2011 Phidgets Inc.

36

Phidgets Common

4.13

PhidgetGetServerStatus
Description:
Get the connected to server status of a remotely opened Phidget. This will fail if the Phidget was opened locally.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the server status. Possible values are 0 for unattached, 1 for attached and others for undefined. The server status. Contains error information.

2011 Phidgets Inc.

Phidgets Common

37

4.14

PhidgetLibraryVersion
Description:
Get the library version. This contains a version number and a build date.

Connector Pane:

Controls and Indicators:


Input Describes error conditions that occur before this node runs.

Output Returns the library version. Contains error information.

2011 Phidgets Inc.

38

Phidgets Common

4.15

PhidgetOpen
Description:
Open a Phidget locally.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Serial number. Specify -1 to open any. Time to wait for the attachment. Specify 0 to wait forever. (Default is 5000) Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the serial number. Returns the device status. (Attached is T; Not attached is F) Contains error information.

2011 Phidgets Inc.

Phidgets Common

39

4.16

PhidgetOpenRemote
Description:
Open a Phidget remotely by ServerID. Note that this requires Bonjour (mDNS) to be running on both the host and the server.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Serial number. Specify -1 to open any. Time to wait for the attachment. Specify 0 to wait forever. (Default is 5000) Server ID. Specify NULL to open any. Password. Can be NULL if the server is running without password. Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the serial number. Returns the device status. (Attached is T; Not attached is F) Contains error information.

2011 Phidgets Inc.

40

Phidgets Common

4.17

PhidgetOpenRemoteIP
Description:
Open a Phidget remotely by address and port.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Serial number. Specify -1 to open any. Time to wait for the attachment. Specify 0 to wait forever. (Default is 5000) Address. This can be a hostname or IP address. Password. Can be NULL if the server is running without password. Port number. Default is 5001. Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the serial number. Returns the device status. (Attached is T; Not attached is F) Contains error information.

2011 Phidgets Inc.

Phidgets Common

41

4.18

PhidgetServerAddress
Description:
Get the address and port of a remotely opened Phidget. This will fail if the Phidget was opened locally.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the address. Returns the port number. Contains error information.

2011 Phidgets Inc.

42

Phidgets Common

4.19

PhidgetServiceID
Description:
Get the server ID of a remotely opened Phidget. This will fail if the Phidget was opened locally.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the server ID. Contains error information.

2011 Phidgets Inc.

Phidgets Common

43

4.20

PhidgetSetDeviceLabel
Description:
Set the label of a Phidget. Note that this is not supported on very old Phidgets, and not yet supported in Windows.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. The label to be set. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

44

Phidgets Common

4.21

SubVIs
This contains a set of advanced LabVIEW VIs that provide a firmware access to all phidgets. This should not be direct accessed by users.

_AttachCHK _ChkError _Close _Delete _Open _OpenRemote _OpenRemoteIP _SerialReturn _WaitAttach EventCloseIntDouble EventCloseIntInt EventExeIntDouble EventExeIntInt

2011 Phidgets Inc.

Phidgets Common

45

4.21.1 _AttachCHK Description:


Get the attach state of a Phidget.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The attach state (Boolean type). Contains error information.

2011 Phidgets Inc.

46

Phidgets Common

4.21.2 _ChkError Description:


Check the error of a Phidget.

Connector Pane:

Controls and Indicators:


Input Describes error conditions that occur before this node runs. The error code to get the description of.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Phidgets Common

47

4.21.3 _Close Description:


Close a Phidget device.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

48

Phidgets Common

4.21.4 _Delete Description:


Delete a Phidget handler.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Contains error information.

2011 Phidgets Inc.

Phidgets Common

49

4.21.5 _Open Description:


Open a Phidget device.

Connector Pane:

Controls and Indicators:


Input Device # identification. Serial number. Specify -1 to open any. (Default: -1) Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

50

Phidgets Common

4.21.6 _OpenRemote Description:


Open a Phidget remotely by ServerID. Note that this requires Bonjour (mDNS) to be running on both the host and the server.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Serial number. Specify -1 to open any. Server ID. Specify NULL to open any. Password. Can be NULL if the server is running without password. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Phidgets Common

51

4.21.7 _OpenRemoteIP Description:


Open a Phidget remotely by address and port.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Serial number. Specify -1 to open any. Address. This can be a hostname or IP address. Password. Can be NULL if the server is running without password. Port number. Default is 5001. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

52

Phidgets Common

4.21.8 _SerialReturn Description:


Return the serial number of a Phidget.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the serial number. Contains error information.

2011 Phidgets Inc.

Phidgets Common

53

4.21.9 _WaitAttach Description:


Wait until a Phidget attached.

Connector Pane:

Controls and Indicators:


Input Device # identification. Time to wait for the attachment. Specify 0 to wait forever. (Default is 5000) Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

54

Phidgets Common

4.21.10 EventCloseIntDouble Description:


Close the event handler which contains an integer and a double event variables. This should not be directly accessed by users.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Phidgets Common

55

4.21.11 EventCloseIntInt Description:


Close the event handler which contains an integer and an integer event variables. This should not be directly accessed by users.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

56

Phidgets Common

4.21.12 EventExeIntDouble Description:


Call the event handler which contains an integer and a double event variables. This should not be directly accessed by users.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Same as the Event Registration Refnum In. Returns the event status. (Executed is T; Not executed is F) The integer. The double. Contains error information.

2011 Phidgets Inc.

Phidgets Common

57

4.21.13 EventExeIntInt Description:


Call the event handler which contains an integer and an integer event variables. This should not be directly accessed by users.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Same as the Event Registration Refnum In. Returns the event status. (Executed is T; Not executed is F) The integer. The integer. Contains error information.

2011 Phidgets Inc.

58

Specific Modules

Specific Modules
This section describes each of the VI function used by different Phidgets. All the VI functions are located in its dll folder correspondingly. Note: Refer to the Product manual for your Phidget and the C Programming Manual for more detailed, language unspecific API documentation.

Please select a specified module accordingly.

Phidget Accelerometer Phidget Advanced Servo Phidget Encoder Phidget InterfaceKit Phidget IR Phidget LED Phidget Motor Control Phidget PH Sensor Phidget RFID Phidget Servo Phidget Spatial Phidget Stepper Phidget Temperature Sensor Phidget TextLCD Phidget TextLED (Discontinued) Phidget Weight Sensor (Discontinued)

2011 Phidgets Inc.

Specific Modules

59

5.1

Phidget Accelerometer
This contains VI functions for Phidget Accelerometer. See the product manual for more specific API details, supported functionality, units, etc.

AcceAxisCount AcceCreate AcceEventClose AcceEventCreate AcceEventExe AcceGetData AcceGetMax AcceGetMin AcceGetTrigger AcceOpen AcceSetTrigger

2011 Phidgets Inc.

60

Specific Modules

5.1.1

AcceAxisCount Description:
Get the number of acceleration axes supported by this accelerometer.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The axis count. Contains error information.

2011 Phidgets Inc.

Specific Modules

61

5.1.2

AcceCreate Description:
Create a Phidget Accelerometer handle.

Connector Pane:

Controls and Indicators:


Input Describes error conditions that occur before this node runs.

Output Device # identification. Contains error information.

2011 Phidgets Inc.

62

Specific Modules

5.1.3

AcceEventClose Description:
Close the acceleration change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

63

5.1.4

AcceEventCreate Description:
Set up an acceleration change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

64

Specific Modules

5.1.5

AcceEventExe Description:
This is called when the acceleration changes by more then the change trigger.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Same as the Event Registration Refnum In. Returns the event status. (Executed is T; Not executed is F) The acceleration index. The acceleration. Contains error information.

2011 Phidgets Inc.

Specific Modules

65

5.1.6

AcceGetData Description:
Get the current acceleration data of an axis.

Connector Pane:

Controls and Indicators:


Input Device # identification. The acceleration index. (x, y, z) Describes error conditions that occur before this node runs.

Output Same as the Device In. The acceleration. Contains error information.

2011 Phidgets Inc.

66

Specific Modules

5.1.7

AcceGetMax Description:
Get the maximum acceleration supported by an axis.

Connector Pane:

Controls and Indicators:


Input Device # identification. The acceleration index. (x, y, z) Describes error conditions that occur before this node runs.

Output Same as the Device In. The maximum acceleration. Contains error information.

2011 Phidgets Inc.

Specific Modules

67

5.1.8

AcceGetMin Description:
Get the minimum acceleration supported by an axis.

Connector Pane:

Controls and Indicators:


Input Device # identification. The acceleration index. (x, y, z) Describes error conditions that occur before this node runs.

Output Same as the Device In. The minimum acceleration. Contains error information.

2011 Phidgets Inc.

68

Specific Modules

5.1.9

AcceGetTrigger Description:
Get the change trigger for an axis.

Connector Pane:

Controls and Indicators:


Input Device # identification. The acceleration index. (x, y, z) Describes error conditions that occur before this node runs.

Output Same as the Device In. The change trigger. Contains error information.

2011 Phidgets Inc.

Specific Modules

69

5.1.10 AcceOpen Description:


Open a Phidget Accelerometer.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Serial number. Specify -1 to open any. Time to wait for the attachment. Specify 0 to wait forever. (Default is 5000) Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the serial number. Returns the device status. (Attached is T; Not attached is F) Contains error information.

2011 Phidgets Inc.

70

Specific Modules

5.1.11 AcceSetTrigger Description:


Set the change trigger for an axis.

Connector Pane:

Controls and Indicators:


Input Device # identification. The change trigger. The acceleration index. (x, y, z) Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

71

5.2

Phidget Advanced Servo


This contains VI functions for Phidget Advanced Servo. See the product manual for more specific API details, supported functionality, units, etc.

AdvServoCount AdvServoCreate AdvServoEventClose AdvServoEventCreateCrtChange AdvServoEventCreatePosChange AdvServoEventCreateVelChange AdvServoEventExe AdvServoGetAcce AdvServoGetAcceMax AdvServoGetAcceMin AdvServoGetCurrent AdvServoGetEngaged AdvServoGetPos AdvServoGetPosMax AdvServoGetPosMin AdvServoGetRampingState AdvServoGetServoType AdvServoGetVel AdvServoGetVellmt AdvServoGetVelmax AdvServoGetVelmin AdvServoOpen AdvServoSetAcce AdvServoSetEngaged
2011 Phidgets Inc.

72

Specific Modules

AdvServoSetPos AdvServoSetPosMax AdvServoSetPosMin AdvServoSetRampingState AdvServoSetServoParameters AdvServoSetServoType AdvServoSetVellmt AdvServoStoppedState

2011 Phidgets Inc.

Specific Modules

73

5.2.1

AdvServoCount Description:
Gets the number of motors supported by this controller.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The motor count. Contains error information.

2011 Phidgets Inc.

74

Specific Modules

5.2.2

AdvServoCreate Description:
Create a Phidget Advanced Servo handle.

Connector Pane:

Controls and Indicators:


Input Describes error conditions that occur before this node runs.

Output Device # identification. Contains error information.

2011 Phidgets Inc.

Specific Modules

75

5.2.3

AdvServoEventClose Description:
Close the Phidget Advanced Servo event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

76

Specific Modules

5.2.4

AdvServoEventCreateCrtChange Description:
Set up a current change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

Specific Modules

77

5.2.5

AdvServoEventCreatePosChange Description:
Set up a postion change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

78

Specific Modules

5.2.6

AdvServoEventCreateVelChange Description:
Set up a velocity change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

Specific Modules

79

5.2.7

AdvServoEventExe Description:
This is called when the Phidget Advanced Servo event changes.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Same as the Event Registration Refnum In. The motor index. The return value of related event. (E.g.: For a position change event, this value is position.) Returns the event status. (Executed is T; Not executed is F) Contains error information.

2011 Phidgets Inc.

80

Specific Modules

5.2.8

AdvServoGetAcce Description:
Get the last set acceleration of a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The acceleration. Contains error information.

2011 Phidgets Inc.

Specific Modules

81

5.2.9

AdvServoGetAcceMax Description:
Get the maximum acceleration supported by a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The maximum acceleration. Contains error information.

2011 Phidgets Inc.

82

Specific Modules

5.2.10 AdvServoGetAcceMin Description:


Get the minimum acceleration supported by a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The minimum acceleration. Contains error information.

2011 Phidgets Inc.

Specific Modules

83

5.2.11 AdvServoGetCurrent Description:


Get the current current draw for a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The current. Contains error information.

2011 Phidgets Inc.

84

Specific Modules

5.2.12 AdvServoGetEngaged Description:


Get the engaged state of a motor. This is whether the motor is powered or not.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The engaged state. Possible values are 0 for False, 1 for True and others for undefined. The engaged state. Possible values are True for Engaged and False for Not Engaged. Contains error information.

2011 Phidgets Inc.

Specific Modules

85

5.2.13 AdvServoGetPos Description:


Get the current position of a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The position. Contains error information.

2011 Phidgets Inc.

86

Specific Modules

5.2.14 AdvServoGetPosMax Description:


Get the maximum position that a motor can go to.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The maximum current. Contains error information.

2011 Phidgets Inc.

Specific Modules

87

5.2.15 AdvServoGetPosMin Description:


Get the minimum position that a motor can go to.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The minimum position. Contains error information.

2011 Phidgets Inc.

88

Specific Modules

5.2.16 AdvServoGetRampingState Description:


Get the speed ramping state for a motor. This is whether or not velocity and acceleration are used.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The speed ramping state. Possible values are 0 for False, 1 for True and others for undefined. The speed ramping state (Boolean type). Contains error information.

2011 Phidgets Inc.

Specific Modules

89

5.2.17 AdvServoGetServoType Description:


Get the servo type of a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the servo type. This is an enum. Please refer to Phigets Constant -> ServoType Contains error information.

2011 Phidgets Inc.

90

Specific Modules

5.2.18 AdvServoGetVel Description:


Get the current velocity of a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The current velocity. Contains error information.

2011 Phidgets Inc.

Specific Modules

91

5.2.19 AdvServoGetVellmt Description:


Get the last set velocity limit of a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The velocity limit. Contains error information.

2011 Phidgets Inc.

92

Specific Modules

5.2.20 AdvServoGetVelmax Description:


Get the maximum velocity that can be set for a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The maximum velocity. Contains error information.

2011 Phidgets Inc.

Specific Modules

93

5.2.21 AdvServoGetVelmin Description:


Get the minimum velocity that can be set for a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The minimum velocity. Contains error information.

2011 Phidgets Inc.

94

Specific Modules

5.2.22 AdvServoOpen Description:


Open a PhidgetAdvancedServo.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Serial number. Specify -1 to open any. Time to wait for the attachment. Specify 0 to wait forever. (Default is 5000) Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the serial number. Returns the device status. (Attached is T; Not attached is F) Contains error information.

2011 Phidgets Inc.

Specific Modules

95

5.2.23 AdvServoSetAcce Description:


Set the acceleration for a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. The acceleration. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

96

Specific Modules

5.2.24 AdvServoSetEngaged Description:


Set the engaged state of a motor. This is whether the motor is powered or not.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Set the engage state. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

97

5.2.25 AdvServoSetPos Description:


Set the position of a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. The position. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

98

Specific Modules

5.2.26 AdvServoSetPosMax Description:


Set the maximum position that a motor can go to.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. The maximum position. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

99

5.2.27 AdvServoSetPosMin Description:


Set the minimum position that a motor can go to.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. The minimum position. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

100

Specific Modules

5.2.28 AdvServoSetRampingState Description:


Set the speed ramping state for a motor. This is whether or not velocity and acceleration are used.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. The speed ramping state. ( 0 = False 1 = True ) Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

101

5.2.29 AdvServoSetServoParameters Description:


Set the servo parameters of a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. The minimum supported PCM in microseconds. The maximum supported PCM in microseconds. The degrees of rotation defined by the given PCM range. The maximum velocity in degrees/second. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

102

Specific Modules

5.2.30 AdvServoSetServoType Description:


Set the servo type of a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. The servo type. This is an enum. Please refer to Phigets Constant -> ServoType Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

103

5.2.31 AdvServoSetVellmt Description:


Set the velocity limit for a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. The velocity limit. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

104

Specific Modules

5.2.32 AdvServoStoppedState Description:


Get the stopped state of a motor. This is true when the motor is not moving and there are no outstanding commands.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The stopped state. Possible values are 0 for False, 1 for True and others for undefined. The stopped state (Boolean type). Possible values are True for Stopped and False for Not Stopped. Contains error information.

2011 Phidgets Inc.

Specific Modules

105

5.3

Phidget Encoder
This contains VI functions for Phidget Encoder. See the product manual for more specific API details, supported functionality, units, etc.

EncoderCreate EncoderEventCloseInput EncoderEventClosePosition EncoderEventCreateInput EncoderEventCreatePosition EncoderEventExeInput EncoderEventExePosition EncoderGetCount EncoderGetEnabledState EncoderGetIndexPosition EncoderGetInputCount EncoderGetInputState EncoderGetPosition EncoderOpen EncoderSetEnabled EncoderSetPosition

2011 Phidgets Inc.

106

Specific Modules

5.3.1

EncoderCreate Description:
Create a Phidget Encoder handle.

Connector Pane:

Controls and Indicators:


Input Describes error conditions that occur before this node runs.

Output Device # identification. Contains error information.

2011 Phidgets Inc.

Specific Modules

107

5.3.2

EncoderEventCloseInput Description:
Close the input change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

108

Specific Modules

5.3.3

EncoderEventClosePosition Description:
Close the encoder position change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

109

5.3.4

EncoderEventCreateInput Description:
Set up an input change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

110

Specific Modules

5.3.5

EncoderEventCreatePosition Description:
Set up an encoder position change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

Specific Modules

111

5.3.6

EncoderEventExeInput Description:
This is called when the acceleration changes by more then the change trigger.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Same as the Event Registration Refnum In. Returns the event status. (Executed is T; Not executed is F) The input index. The input state value. Possible values are 0 for False, 1 for True and others for undefined. Contains error information.

2011 Phidgets Inc.

112

Specific Modules

5.3.7

EncoderEventExePosition Description:
This is called when an encoder position changes.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Same as the Event Registration Refnum In. Returns the event status. (Executed is T; Not executed is F) The encoder index. The time in ms since the last position change event. The current position of the encoder. (This is a relative not absolute position.) Contains error information.

2011 Phidgets Inc.

Specific Modules

113

5.3.8

EncoderGetCount Description:
Get the number of encoders supported by this board.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The encoder input count. Contains error information.

2011 Phidgets Inc.

114

Specific Modules

5.3.9

EncoderGetEnabledState Description:
Get the enabled state of an encoder. This is whether the encoder is powered or not. Please note that 1057 doesn't support this function.

Connector Pane:

Controls and Indicators:


Input Device # identification. The encoder index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The enabled state. Possible values are 0 for False, 1 for True and others for undefined. The enabled state (Boolean type). Possible values are True for Enabled and False for Not Enabled (Disabled). Contains error information.

2011 Phidgets Inc.

Specific Modules

115

5.3.10 EncoderGetIndexPosition Description:


Get the position of the last index pulse, as referenced to Phidget Encoder -> EncoderGetPosition. The function will return an error (EPHIDGET_UNKNOWN) if there hasn't been an index event, or if the encoder doesn't support index.

Connector Pane:

Controls and Indicators:


Input Device # identification. The encoder index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The index position. Contains error information.

2011 Phidgets Inc.

116

Specific Modules

5.3.11 EncoderGetInputCount Description:


Get the number of digital inputs supported by this board.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The input count. Contains error information.

2011 Phidgets Inc.

Specific Modules

117

5.3.12 EncoderGetInputState Description:


Get the state of a digital input.

Connector Pane:

Controls and Indicators:


Input Device # identification. The input index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The input state. Possible values are 0 for False, 1 for True and others for undefined. The input state (Boolean type). Possible values are True for Engaged and False for Not Engaged. Contains error information.

2011 Phidgets Inc.

118

Specific Modules

5.3.13 EncoderGetPosition Description:


Get the current position of an encoder.

Connector Pane:

Controls and Indicators:


Input Device # identification. The encoder index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The current position. Contains error information.

2011 Phidgets Inc.

Specific Modules

119

5.3.14 EncoderOpen Description:


Open a PhidgetEncoder.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Serial number. Specify -1 to open any. Time to wait for the attachment. Specify 0 to wait forever. (Default is 5000) Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the serial number. Returns the device status. (Attached is T; Not attached is F) Contains error information.

2011 Phidgets Inc.

120

Specific Modules

5.3.15 EncoderSetEnabled Description:


Set the enabled state of an encoder. This is whether the encoder is powered or not. Please note that 1057 doesn't support this function.

Connector Pane:

Controls and Indicators:


Input Device # identification. The encoder index. The encoder state. ( 0 = False 1 = True ) Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

121

5.3.16 EncoderSetPosition Description:


Set the position of an encoder.

Connector Pane:

Controls and Indicators:


Input Device # identification. The encoder index. The new position. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

122

Specific Modules

5.4

Phidget InterfaceKit
This contains VI functions for Phidget InterfaceKit. See the product manual for more specific API details, supported functionality, units, etc.

IFCreate IFEventClose IFEventCreateInput IFEventCreateOutput IFEventCreateSensor IFEventExe IFGetDataRate IFGetDataRateMax IFGetDataRateMin IFGetInputCount IFGetInputState IFGetOutputCount IFGetOutputState IFGetRatio IFGetSensorCount IFGetSensorValue IFGetSensorValueRaw IFGetTrig IFOpen IFSetDataRate IFSetOutputState IFSetRatio IFSetTrig

2011 Phidgets Inc.

Specific Modules

123

5.4.1

IFCreate Description:
Create a Phidget InterfaceKit handle.

Connector Pane:

Controls and Indicators:


Input Describes error conditions that occur before this node runs.

Output Device # identification. Contains error information.

2011 Phidgets Inc.

124

Specific Modules

5.4.2

IFEventClose Description:
Close the Phidget InterfaceKit event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

125

5.4.3

IFEventCreateInput Description:
Set up a digital input change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

126

Specific Modules

5.4.4

IFEventCreateOutput Description:
Set up a digital output change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

Specific Modules

127

5.4.5

IFEventCreateSensor Description:
Set up a sensor change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

128

Specific Modules

5.4.6

IFEventExe Description:
This is called when the Phidget Advanced Servo event changes.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Same as the Event Registration Refnum In. The input, output or sensor index. The return value of related event. (E.g. for sensor change event, this value is sensor reading.) Returns the event status. (Executed is T; Not executed is F) Contains error information.

2011 Phidgets Inc.

Specific Modules

129

5.4.7

IFGetDataRate Description:
Get the data rate for an analog input.

Connector Pane:

Controls and Indicators:


Input Device # identification. The sensor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The data rate for an analog input in ms. Contains error information.

2011 Phidgets Inc.

130

Specific Modules

5.4.8

IFGetDataRateMax Description:
Get the maximum supported data rate for an analog input.

Connector Pane:

Controls and Indicators:


Input Device # identification. The sensor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The maximum data rate for an analog input in ms. Contains error information.

2011 Phidgets Inc.

Specific Modules

131

5.4.9

IFGetDataRateMin Description:
Get the minimum supported data rate for an analog input.

Connector Pane:

Controls and Indicators:


Input Device # identification. The sensor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The minimum data rate for an analog input in ms. Contains error information.

2011 Phidgets Inc.

132

Specific Modules

5.4.10 IFGetInputCount Description:


Get the number of digital inputs supported by this board.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The ditial input count. Contains error information.

2011 Phidgets Inc.

Specific Modules

133

5.4.11 IFGetInputState Description:


Get the state of a digital input.

Connector Pane:

Controls and Indicators:


Input Device # identification. The input index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The input state. Possible values are 0 for False, 1 for True and others for undefined. The input state (Boolean type). Contains error information.

2011 Phidgets Inc.

134

Specific Modules

5.4.12 IFGetOutputCount Description:


Get the number of digital outputs supported by this board.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The ditial output count. Contains error information.

2011 Phidgets Inc.

Specific Modules

135

5.4.13 IFGetOutputState Description:


Get the state of a digital output.

Connector Pane:

Controls and Indicators:


Input Device # identification. The output index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The output state. Possible values are 0 for False, 1 for True and others for undefined. The output state (Boolean type). Contains error information.

2011 Phidgets Inc.

136

Specific Modules

5.4.14 IFGetRatio Description:


Get the ratio metric state for this board.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The ratio metric state. Possible values are 0 for False, 1 for True and others for undefined. The ratio metric state (Boolean type). Contains error information.

2011 Phidgets Inc.

Specific Modules

137

5.4.15 IFGetSensorCount Description:


Get the number of sensor (analog) inputs supported by this board.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The sensor input count. Contains error information.

2011 Phidgets Inc.

138

Specific Modules

5.4.16 IFGetSensorValue Description:


Get a sensor value (0-1000).

Connector Pane:

Controls and Indicators:


Input Device # identification. The sensor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The sensor value. Contains error information.

2011 Phidgets Inc.

Specific Modules

139

5.4.17 IFGetSensorValueRaw Description:


Get a sensor raw value (12-bit).

Connector Pane:

Controls and Indicators:


Input Device # identification. The sensor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The sensor value. Contains error information.

2011 Phidgets Inc.

140

Specific Modules

5.4.18 IFGetTrig Description:


Get a sensor change trigger.

Connector Pane:

Controls and Indicators:


Input Device # identification. The sensor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The change trigger. Contains error information.

2011 Phidgets Inc.

Specific Modules

141

5.4.19 IFOpen Description:


Open a PhidgetInterfaceKit.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Serial number. Specify -1 to open any. Time to wait for the attachment. Specify 0 to wait forever. (Default is 5000) Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the serial number. Returns the device status. (Attached is T; Not attached is F) Contains error information.

2011 Phidgets Inc.

142

Specific Modules

5.4.20 IFSetDataRate Description:


Set the data rate for an analog input.

Connector Pane:

Controls and Indicators:


Input Device # identification. The sensor index. Data rate in ms. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

143

5.4.21 IFSetOutputState Description:


Set the state of a digital output.

Connector Pane:

Controls and Indicators:


Input Device # identification. The output index. The output state. ( 0 = False 1 = True ) Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

144

Specific Modules

5.4.22 IFSetRatio Description:


Set the ratio metric state for this board.

Connector Pane:

Controls and Indicators:


Input Device # identification. The ratio metric state. ( 0 = False 1 = True ) Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

145

5.4.23 IFSetTrig Description:


Set a sensor change trigger.

Connector Pane:

Controls and Indicators:


Input Device # identification. The sensor index. The change trigger. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

146

Specific Modules

5.5

Phidget IR
This contains VI functions for Phidget IR. See the product manual for more specific API details, supported functionality, units, etc.

IRCreate IREventCloseOnCode IREventCloseOnLearn IREventCloseOnRawData IREventCreateOnCode IREventCreateOnLearn IREventCreateOnRawData IREventExeOnCode IREventExeOnLearn IREventExeOnRawData IRGetLastCode IRGetLastLearnedCode IRGetRawData IROpen IRTransmit IRTransmitRaw IRTransmitRepeat

2011 Phidgets Inc.

Specific Modules

147

5.5.1

IRCreate Description:
Create a Phidget IR handle.

Connector Pane:

Controls and Indicators:


Input Describes error conditions that occur before this node runs.

Output Device # identification. Contains error information.

2011 Phidgets Inc.

148

Specific Modules

5.5.2

IREventCloseOnCode Description:
Close the Phidget IR OnCode event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

149

5.5.3

IREventCloseOnLearn Description:
Close the Phidget IR OnLearn event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

150

Specific Modules

5.5.4

IREventCloseOnRawData Description:
Close the Phidget IR OnRawData event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

151

5.5.5

IREventCreateOnCode Description:
Set up a Phidget IR OnCode event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

152

Specific Modules

5.5.6

IREventCreateOnLearn Description:
Set up a Phidget IR OnLearn event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

Specific Modules

153

5.5.7

IREventCreateOnRawData Description:
Set up a Phidget IR OnRawData event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

154

Specific Modules

5.5.8

IREventExeOnCode Description:
This is called when a code has been received that could be automatically decoded. Data is return as an array with MSB in index 0. Bit count and a repeat flag are also returned. Repeats are detected as either the same code repeated in < 100ms or as a special repeat code.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Same as the Event Registration Refnum In. A user array to store the code data in. The bit count of the code. Returns the repeats. Returns the event status. (Executed is T; Not executed is F) Contains error information.

2011 Phidgets Inc.

Specific Modules

155

5.5.9

IREventExeOnLearn Description:
This is called when a code has been received for long enough to be learned. The returned CodeInfo structure can be used to retransmit the same code.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Same as the Event Registration Refnum In. A user array to store the code data in. This contains all information needed to transmit a code. Please refer to Phigets Constant -> CodeInfo Returns the event status. (Executed is T; Not executed is F) Contains error information.

2011 Phidgets Inc.

156

Specific Modules

5.5.10 IREventExeOnRawData Description:


This is called when raw data has been read from the device. Raw data always starts with a space and ends with a pulse.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Same as the Event Registration Refnum In. A user array for raw data to be written into. Returns the event status. (Executed is T; Not executed is F) Contains error information.

2011 Phidgets Inc.

Specific Modules

157

5.5.11 IRGetLastCode Description:


Get the last code that was received.

Connector Pane:

Controls and Indicators:


Input Device # identification. Length of the user array - should be at least 16. This is set to the amount of data actually written to the array. Describes error conditions that occur before this node runs.

Output Same as the Device In. A user array to store the code data in. Set to the bit count of the code. Length of the user array. Contains error information.

2011 Phidgets Inc.

158

Specific Modules

5.5.12 IRGetLastLearnedCode Description:


Get the last code that was learned.

Connector Pane:

Controls and Indicators:


Input Device # identification. Length of the user array - should be at least 16. This is set to the amount of data actually written to the array. Describes error conditions that occur before this node runs.

Output Same as the Device In. A user array to store the code data in. The CodeInfo structure for the learned code. Please refer to Phigets Constant -> CodeInfo Length of the user array. Contains error information.

2011 Phidgets Inc.

Specific Modules

159

5.5.13 IRGetRawData Description:


Read any available raw data. This should be polled continuously (every 20ms) to avoid missing data. Read data always starts with a space and ends with a pulse.

Connector Pane:

Controls and Indicators:


Input Device # identification. The maximum amount of data to read. This is set to the actual amount of data read. Describes error conditions that occur before this node runs.

Output Same as the Device In. A user array for raw data to be written into. The amount of data to read. Contains error information.

2011 Phidgets Inc.

160

Specific Modules

5.5.14 IROpen Description:


Open a PhidgetIR.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Serial number. Specify -1 to open any. Time to wait for the attachment. Specify 0 to wait forever. (Default is 5000) Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the serial number. Returns the device status. (Attached is T; Not attached is F) Contains error information.

2011 Phidgets Inc.

Specific Modules

161

5.5.15 IRTransmit Description:


Transmit a code according to the settings in a CodeInfo structure.

Connector Pane:

Controls and Indicators:


Input Device # identification. The code to send. Data is transmitted MSBit first. MSByte is in array index 0. LSBit is right justified, so MSBit may be in bit positions 0-7 in array index 0 depending on the bit count. The CodeInfo structure specifying to to send the code. Anything left as null to select default is filled in for the user. Please refer to Phigets Constant -> CodeInfo Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

162

Specific Modules

5.5.16 IRTransmitRaw Description:


Transmit RAW data as a series of pulses and spaces.

Connector Pane:

Controls and Indicators:


Input Device # identification. The data to send. The array must start and end with a pulse and each element is a positive time in us. The length of the data array. Maximum length is 1024, but streams should be kept much shorter, ie. < 100ms between gaps. The Carrier Frequency in Hz. leave as 0 for default. The Duty Cycle (10-50). Leave as 0 for default. The gap time in us. This guarantees a gap time (no transmitting) after the data is sent, but can be set to 0. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

163

5.5.17 IRTransmitRepeat Description:


Transmits a repeat of the last transmitted code. Depending of the CodeInfo structure, this may be a retransmission of the code itself, or there may be a special repeat code.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

164

Specific Modules

5.6

Phidget LED
This contains VI functions for Phidget LED. See the product manual for more specific API details, supported functionality, units, etc.

LEDCount LEDCreate LEDGetBrightness LEDGetCurrentLimit LEDGetVoltage LEDOpen LEDSetBrightness LEDSetCurrentLimit LEDSetVoltage

2011 Phidgets Inc.

Specific Modules

165

5.6.1

LEDCount Description:
Get the number of LEDs supported by this board.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The LED count. Contains error information.

2011 Phidgets Inc.

166

Specific Modules

5.6.2

LEDCreate Description:
Create a Phidget LED handle.

Connector Pane:

Controls and Indicators:


Input Describes error conditions that occur before this node runs.

Output Device # identification. Contains error information.

2011 Phidgets Inc.

Specific Modules

167

5.6.3

LEDGetBrightness Description:
Get the brightness of an LED.

Connector Pane:

Controls and Indicators:


Input Device # identification. The LED index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The LED brightness (0-100). Contains error information.

2011 Phidgets Inc.

168

Specific Modules

5.6.4

LEDGetCurrentLimit Description:
Get the current limit. This is for all outputs.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The current limit. Contains error information.

2011 Phidgets Inc.

Specific Modules

169

5.6.5

LEDGetVoltage Description:
Get the output voltage. This is for all outputs.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The output voltage. Contains error information.

2011 Phidgets Inc.

170

Specific Modules

5.6.6

LEDOpen Description:
Open a Phidget LED.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Serial number. Specify -1 to open any. Time to wait for the attachment. Specify 0 to wait forever. (Default is 5000) Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the serial number. Returns the device status. (Attached is T; Not attached is F) Contains error information.

2011 Phidgets Inc.

Specific Modules

171

5.6.7

LEDSetBrightness Description:
Set the brightness of an LED.

Connector Pane:

Controls and Indicators:


Input Device # identification. The LED index. The LED brightness (0-100). Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

172

Specific Modules

5.6.8

LEDSetCurrentLimit Description:
Set the current limit. This is for all outputs.

Connector Pane:

Controls and Indicators:


Input Device # identification. The current limit. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

173

5.6.9

LEDSetVoltage Description:
Set the output voltage. This is for all outputs.

Connector Pane:

Controls and Indicators:


Input Device # identification. The output voltage. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

174

Specific Modules

5.7

Phidget Motor Control


This contains VI functions for Phidget Motor Control. See the product manual for more specific API details, supported functionality, units, etc.

MCCreate MCEventCloseInput MCEventCloseVelocityCurrent MCEventCreateCurrent MCEventCreateInput MCEventCreateVelocity MCEventExeInput MCEventExeVelocityCurrent MCGetAcceleration MCGetAccelerationMax MCGetAccelerationMin MCGetCurrent MCGetInputCount MCGetInputState MCGetMotorCount MCGetVelocity MCOpen MCSetAcceleration MCSetVelocity

2011 Phidgets Inc.

Specific Modules

175

5.7.1

MCCreate Description:
Create a Phidget Motor Control handle.

Connector Pane:

Controls and Indicators:


Input Describes error conditions that occur before this node runs.

Output Device # identification. Contains error information.

2011 Phidgets Inc.

176

Specific Modules

5.7.2

MCEventCloseInput Description:
Close the Phidget Motor Control input change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

177

5.7.3

MCEventCloseVelocityCurrent Description:
Close the Phidget Motor Control velocity/current change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

178

Specific Modules

5.7.4

MCEventCreateCurrent Description:
Set up a current change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

Specific Modules

179

5.7.5

MCEventCreateInput Description:
Set up an input change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

180

Specific Modules

5.7.6

MCEventCreateVelocity Description:
Set up a velocity change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

Specific Modules

181

5.7.7

MCEventExeInput Description:
This is called when a digital input changes.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Same as the Event Registration Refnum In. The input index. The return value of input state. Returns the event status. (Executed is T; Not executed is F) Contains error information.

2011 Phidgets Inc.

182

Specific Modules

5.7.8

MCEventExeVelocityCurrent Description:
This is called when the velocity or current changes.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Same as the Event Registration Refnum In. The motor index. The return value of related event. (E.g. for velocity change event, this value is velocity reading.) Returns the event status. (Executed is T; Not executed is F) Contains error information.

2011 Phidgets Inc.

Specific Modules

183

5.7.9

MCGetAcceleration Description:
Get the last set acceleration of a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The acceleration. Contains error information.

2011 Phidgets Inc.

184

Specific Modules

5.7.10 MCGetAccelerationMax Description:


Get the maximum acceleration supported by a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The maximum acceleration. Contains error information.

2011 Phidgets Inc.

Specific Modules

185

5.7.11 MCGetAccelerationMin Description:


Get the minimum acceleration supported by a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The minimum acceleration. Contains error information.

2011 Phidgets Inc.

186

Specific Modules

5.7.12 MCGetCurrent Description:


Get the current current draw for a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The current. Contains error information.

2011 Phidgets Inc.

Specific Modules

187

5.7.13 MCGetInputCount Description:


Get the number of digital inputs supported by this board.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The digital input count. Contains error information.

2011 Phidgets Inc.

188

Specific Modules

5.7.14 MCGetInputState Description:


Get the state of a digital input.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The input state. Possible values are 0 for False, 1 for True and others for undefined. Contains error information.

2011 Phidgets Inc.

Specific Modules

189

5.7.15 MCGetMotorCount Description:


Get the number of motors supported by this controller.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The motor count. Contains error information.

2011 Phidgets Inc.

190

Specific Modules

5.7.16 MCGetVelocity Description:


Get the current velocity of a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The current velocity. Contains error information.

2011 Phidgets Inc.

Specific Modules

191

5.7.17 MCOpen Description:


Open a Phidget Motor Control.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Serial number. Specify -1 to open any. Time to wait for the attachment. Specify 0 to wait forever. (Default is 5000) Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the serial number. Returns the device status. (Attached is T; Not attached is F) Contains error information.

2011 Phidgets Inc.

192

Specific Modules

5.7.18 MCSetAcceleration Description:


Set the last set acceleration of a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. The acceleration. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

193

5.7.19 MCSetVelocity Description:


Set the velocity of a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. The velocity. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

194

Specific Modules

5.8

Phidget PH Sensor
This contains VI functions for Phidget PH Sensor. See the product manual for more specific API details, supported functionality, units, etc.

PHCreate PHEventClose PHEventCreate PHEventExe PHGetPH PHGetPHMax PHGetPHMin PHGetPHTrigger PHGetPotential PHGetPotentialMax PHGetPotentialMin PHOpen PHSetTemperature PHSetTrig

2011 Phidgets Inc.

Specific Modules

195

5.8.1

PHCreate Description:
Create a Phidget PH Sensor handle.

Connector Pane:

Controls and Indicators:


Input Describes error conditions that occur before this node runs.

Output Device # identification. Contains error information.

2011 Phidgets Inc.

196

Specific Modules

5.8.2

PHEventClose Description:
Close the Phidget PH Sensor change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

197

5.8.3

PHEventCreate Description:
Set up a PH change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

198

Specific Modules

5.8.4

PHEventExe Description:
This is called when the PH changes by more then the change trigger.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Same as the Event Registration Refnum In. The PH. Returns the event status. (Executed is T; Not executed is F) Contains error information.

2011 Phidgets Inc.

Specific Modules

199

5.8.5

PHGetPH Description:
Get the sensed PH.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The PH. Contains error information.

2011 Phidgets Inc.

200

Specific Modules

5.8.6

PHGetPHMax Description:
Get the maximum PH that the sensor could report.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The maximum PH. Contains error information.

2011 Phidgets Inc.

Specific Modules

201

5.8.7

PHGetPHMin Description:
Get the minimum PH that the sensor could report.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The minimum PH. Contains error information.

2011 Phidgets Inc.

202

Specific Modules

5.8.8

PHGetPHTrigger Description:
Get the PH change trigger.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The change trigger. Contains error information.

2011 Phidgets Inc.

Specific Modules

203

5.8.9

PHGetPotential Description:
Get the sensed potential.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The potential. Contains error information.

2011 Phidgets Inc.

204

Specific Modules

5.8.10 PHGetPotentialMax Description:


Get the maximum potential that can be sensed.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The maximum potential. Contains error information.

2011 Phidgets Inc.

Specific Modules

205

5.8.11 PHGetPotentialMin Description:


Get the minimum potential that can be sensed.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The minimum potential. Contains error information.

2011 Phidgets Inc.

206

Specific Modules

5.8.12 PHOpen Description:


Open a Phidget PH Sensor.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Serial number. Specify -1 to open any. Time to wait for the attachment. Specify 0 to wait forever. (Default is 5000) Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the serial number. Returns the device status. (Attached is T; Not attached is F) Contains error information.

2011 Phidgets Inc.

Specific Modules

207

5.8.13 PHSetTemperature Description:


Set the temperature to be used for PH calculations.

Connector Pane:

Controls and Indicators:


Input Device # identification. The temperature (degrees celcius). By default this is 20. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

208

Specific Modules

5.8.14 PHSetTrig Description:


Set the PH change trigger.

Connector Pane:

Controls and Indicators:


Input Device # identification. The change trigger. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

209

5.9

Phidget RFID
This contains VI functions for Phidget RFID. See the product manual for more specific API details, supported functionality, units, etc.

RFIDCreate RFIDEventClose RFIDEventCloseOutput RFIDEventCreateOutput RFIDEventCreateTag RFIDEventCreateTagLost RFIDEventExe RFIDEventExeOutput RFIDGetAntennaState RFIDGetLastTag RFIDGetLEDState RFIDGetOutputCount RFIDGetOutputState RFIDGetTagState RFIDOpen RFIDSetAntennaState RFIDSetLEDState RFIDSetOutputState

2011 Phidgets Inc.

210

Specific Modules

5.9.1

RFIDCreate Description:
Create a Phidget RFID handle.

Connector Pane:

Controls and Indicators:


Input Describes error conditions that occur before this node runs.

Output Device # identification. Contains error information.

2011 Phidgets Inc.

Specific Modules

211

5.9.2

RFIDEventClose Description:
Close the Phidget RFID Tag or TagLost event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

212

Specific Modules

5.9.3

RFIDEventCloseOutput Description:
Close the Phidget RFID output change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

213

5.9.4

RFIDEventCreateOutput Description:
Set up an output change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

214

Specific Modules

5.9.5

RFIDEventCreateTag Description:
Set up a tag change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

Specific Modules

215

5.9.6

RFIDEventCreateTagLost Description:
Set up a tag lost change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

216

Specific Modules

5.9.7

RFIDEventExe Description:
This is called when the Phidget RFID Tag or TagLost event changes. Tag Event is called when a tag is first detected by the reader. TagLost Event is called when a tag is no longer detected by the reader.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Same as the Event Registration Refnum In. The tag. Returns the event status. (Executed is T; Not executed is F) Contains error information.

2011 Phidgets Inc.

Specific Modules

217

5.9.8

RFIDEventExeOutput Description:
This is called when an output changes.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Same as the Event Registration Refnum In. The output index. The output state. Possible values are 0 for False, 1 for True and others for undefined. Returns the event status. (Executed is T; Not executed is F) Contains error information.

2011 Phidgets Inc.

218

Specific Modules

5.9.9

RFIDGetAntennaState Description:
Get the state of the antenna.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The antenna state. Possible values are 0 for False, 1 for True and others for undefined. The antenna state. Contains error information.

2011 Phidgets Inc.

Specific Modules

219

5.9.10 RFIDGetLastTag Description:


Get the last tag read by the reader. This tag may or may not still be on the reader.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The tag. This must be an unsigned char array of size 5. Contains error information.

2011 Phidgets Inc.

220

Specific Modules

5.9.11 RFIDGetLEDState Description:


Get the state of the onboard LED.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The LED state. Possible values are 0 for False, 1 for True and others for undefined. The LED state. Contains error information.

2011 Phidgets Inc.

Specific Modules

221

5.9.12 RFIDGetOutputCount Description:


Get the number of outputs supported by this board.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The output count. Contains error information.

2011 Phidgets Inc.

222

Specific Modules

5.9.13 RFIDGetOutputState Description:


Get the state of an output.

Connector Pane:

Controls and Indicators:


Input Device # identification. The output index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The output state. Possible values are 0 for False, 1 for True and others for undefined. The output state. Contains error information.

2011 Phidgets Inc.

Specific Modules

223

5.9.14 RFIDGetTagState Description:


Get the tag present status. This is whether or not a tag is being read by the reader.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The tag state. Possible values are 0 for False, 1 for True and others for undefined. The tag state. Contains error information.

2011 Phidgets Inc.

224

Specific Modules

5.9.15 RFIDOpen Description:


Open a Phidget RFID.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Serial number. Specify -1 to open any. Time to wait for the attachment. Specify 0 to wait forever. (Default is 5000) Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the serial number. Returns the device status. (Attached is T; Not attached is F) Contains error information.

2011 Phidgets Inc.

Specific Modules

225

5.9.16 RFIDSetAntennaState Description:


Set the state of the antenna. Note that the antenna must be enabled before tags will be read.

Connector Pane:

Controls and Indicators:


Input Device # identification. Set the antenna state. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

226

Specific Modules

5.9.17 RFIDSetLEDState Description:


Set the state of the onboard LED.

Connector Pane:

Controls and Indicators:


Input Device # identification. Set the LED state. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

227

5.9.18 RFIDSetOutputState Description:


Set the state of an output.

Connector Pane:

Controls and Indicators:


Input Device # identification. The output index. Set the output state. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

228

Specific Modules

5.10

Phidget Servo
This contains VI functions for Phidget Servo. See the product manual for more specific API details, supported functionality, units, etc.

ServoCount ServoCreate ServoEventClose ServoEventCreate ServoEventExe ServoGetEngaged ServoGetPos ServoGetPosMax ServoGetPosMin ServoGetServoType ServoOpen ServoSetEngaged ServoSetPos ServoSetServoParameters ServoSetServoType

2011 Phidgets Inc.

Specific Modules

229

5.10.1 ServoCount Description:


Gets the number of motors supported by this controller.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The motor count. Contains error information.

2011 Phidgets Inc.

230

Specific Modules

5.10.2 ServoCreate Description:


Create a Phidget Servo handle.

Connector Pane:

Controls and Indicators:


Input Describes error conditions that occur before this node runs.

Output Device # identification. Contains error information.

2011 Phidgets Inc.

Specific Modules

231

5.10.3 ServoEventClose Description:


Close the Phidget Servo event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

232

Specific Modules

5.10.4 ServoEventCreate Description:


Set up a postion change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

Specific Modules

233

5.10.5 ServoEventExe Description:


This is called when the Phidget Advanced Servo event changes.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Same as the Event Registration Refnum In. The motor index. The return value of the position. Returns the event status. (Executed is T; Not executed is F) Contains error information.

2011 Phidgets Inc.

234

Specific Modules

5.10.6 ServoGetEngaged Description:


Get the engaged state of a motor. This is whether the motor is powered or not.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The engaged state. Possible values are 0 for False, 1 for True and others for undefined. The engaged state (Boolean type). Possible values are True for Engaged and False for Not Engaged. Contains error information.

2011 Phidgets Inc.

Specific Modules

235

5.10.7 ServoGetPos Description:


Get the current position of a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The position. Contains error information.

2011 Phidgets Inc.

236

Specific Modules

5.10.8 ServoGetPosMax Description:


Get the maximum position that a motor can go to.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The maximum current. Contains error information.

2011 Phidgets Inc.

Specific Modules

237

5.10.9 ServoGetPosMin Description:


Get the minimum position that a motor can go to.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The minimum position. Contains error information.

2011 Phidgets Inc.

238

Specific Modules

5.10.10 ServoGetServoType Description:


Get the servo type of a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the servo type. This is an enum. Please refer to Phigets Constant -> ServoType Contains error information.

2011 Phidgets Inc.

Specific Modules

239

5.10.11 ServoOpen Description:


Open a PhidgetServo.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Serial number. Specify -1 to open any. Time to wait for the attachment. Specify 0 to wait forever. (Default is 5000) Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the serial number. Returns the device status. (Attached is T; Not attached is F) Contains error information.

2011 Phidgets Inc.

240

Specific Modules

5.10.12 ServoSetEngaged Description:


Set the engaged state of a motor. This is whether the motor is powered or not.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Set the engage state. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

241

5.10.13 ServoSetPos Description:


Set the position of a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. The position. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

242

Specific Modules

5.10.14 ServoSetServoParameters Description:


Set the servo parameters of a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. The minimum supported PCM in microseconds. The maximum supported PCM in microseconds. The degrees of rotation defined by the given PCM range. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

243

5.10.15 ServoSetServoType Description:


Set the servo type of a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. The servo type. This is an enum. Please refer to Phigets Constant -> ServoType Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

244

Specific Modules

5.11

Phidget Spatial
This contains VI functions for Phidget Spatial. See the product manual for more specific API details, supported functionality, units, etc.

SpatialCreate SpatialEventClose SpatialEventCreate SpatialEventExe SpatialGetAcce SpatialGetAcceAxisCount SpatialGetAcceMax SpatialGetAcceMin SpatialGetAngRate SpatialGetAngRateMax SpatialGetAngRateMin SpatialGetCompassAxisCount SpatialGetDataRate SpatialGetDataRateMax SpatialGetDataRateMin SpatialGetGyroAxisCount SpatialGetMagField SpatialGetMagFieldMax SpatialGetMagFieldMin SpatialOpen SpatialResetCompassCorrectionParameters SpatialSetCompassCorrectionParameters SpatialSetDataRate SpatialZeroGyro
2011 Phidgets Inc.

Specific Modules

245

5.11.1 SpatialCreate Description:


Create a Phidget Spatial handle.

Connector Pane:

Controls and Indicators:


Input Describes error conditions that occur before this node runs.

Output Device # identification. Contains error information.

2011 Phidgets Inc.

246

Specific Modules

5.11.2 SpatialEventClose Description:


Close the Phidget Spatial event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

247

5.11.3 SpatialEventCreate Description:


Set up a data change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

248

Specific Modules

5.11.4 SpatialEventExe Description:


This is called when data come. It is called at SpatialGetDataRate , up to 8ms. For the rate faster than 8ms, multiple sets of data are supplied in a single event.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Same as the Event Registration Refnum In. Returns the event status. (Executed is T; Not executed is F) The Output Data. Acceleration X. Acceleration Y. Acceleration Z. Angular rate X. Angular rate Y. Angular rate Z. Magnetic field X. Magnetic field Y. Magnetic field Z. Timestamp in s. Timestamp in ms. Contains error information.

2011 Phidgets Inc.

Specific Modules

249

5.11.5 SpatialGetAcce Description:


Get the current acceleration data of an axis.

Connector Pane:

Controls and Indicators:


Input Device # identification. The acceleration index. (x, y, z) Describes error conditions that occur before this node runs.

Output Same as the Device In. The acceleration in gs. Contains error information.

2011 Phidgets Inc.

250

Specific Modules

5.11.6 SpatialGetAcceAxisCount Description:


Get the number of acceleration axes supplied by this board.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The axis count. Contains error information.

2011 Phidgets Inc.

Specific Modules

251

5.11.7 SpatialGetAcceMax Description:


Get the maximum acceleration supported by an axis.

Connector Pane:

Controls and Indicators:


Input Device # identification. The acceleration index. (x, y, z) Describes error conditions that occur before this node runs.

Output Same as the Device In. The maximum acceleration. Contains error information.

2011 Phidgets Inc.

252

Specific Modules

5.11.8 SpatialGetAcceMin Description:


Get the minimum acceleration supported by an axis.

Connector Pane:

Controls and Indicators:


Input Device # identification. The acceleration index. (x, y, z) Describes error conditions that occur before this node runs.

Output Same as the Device In. The minimum acceleration. Contains error information.

2011 Phidgets Inc.

Specific Modules

253

5.11.9 SpatialGetAngRate Description:


Get the current angular rate of an axis.

Connector Pane:

Controls and Indicators:


Input Device # identification. The angular rate index. (x, y, z) Describes error conditions that occur before this node runs.

Output Same as the Device In. The angular rate in degrees/second. Contains error information.

2011 Phidgets Inc.

254

Specific Modules

5.11.10 SpatialGetAngRateMax Description:


Get the maximum angular rate supported by an axis.

Connector Pane:

Controls and Indicators:


Input Device # identification. The angular rate index. (x, y, z) Describes error conditions that occur before this node runs.

Output Same as the Device In. The maximum angular rate. Contains error information.

2011 Phidgets Inc.

Specific Modules

255

5.11.11 SpatialGetAngRateMin Description:


Get the minimum angular rate supported by an axis.

Connector Pane:

Controls and Indicators:


Input Device # identification. The angular rate index. (x, y, z) Describes error conditions that occur before this node runs.

Output Same as the Device In. The minimum angular rate. Contains error information.

2011 Phidgets Inc.

256

Specific Modules

5.11.12 SpatialGetCompassAxisCount Description:


Get the number of compass axes supplied by this board.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The number of compass axes. Contains error information.

2011 Phidgets Inc.

Specific Modules

257

5.11.13 SpatialGetDataRate Description:


Get the data rate.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The data rate in milliseconds. Contains error information.

2011 Phidgets Inc.

258

Specific Modules

5.11.14 SpatialGetDataRateMax Description:


Get the maximum supported data rate.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The data rate in milliseconds. Contains error information.

2011 Phidgets Inc.

Specific Modules

259

5.11.15 SpatialGetDataRateMin Description:


Get the minimum supported data rate.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The data rate in milliseconds. Contains error information.

2011 Phidgets Inc.

260

Specific Modules

5.11.16 SpatialGetGyroAxisCount Description:


Get the number of gyroscope axes supplied by this board.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The number of gyro axes. Contains error information.

2011 Phidgets Inc.

Specific Modules

261

5.11.17 SpatialGetMagField Description:


Get the current magnetic field strength of an axis.

Connector Pane:

Controls and Indicators:


Input Device # identification. The magnetic field index. (x, y, z) Describes error conditions that occur before this node runs.

Output Same as the Device In. The magnetic field strength in Gauss. Contains error information.

2011 Phidgets Inc.

262

Specific Modules

5.11.18 SpatialGetMagFieldMax Description:


Get the maximum magnetic field strength supported by an axis.

Connector Pane:

Controls and Indicators:


Input Device # identification. The magnetic field index. (x, y, z) Describes error conditions that occur before this node runs.

Output Same as the Device In. The maximum magnetic field strength in Gauss. Contains error information.

2011 Phidgets Inc.

Specific Modules

263

5.11.19 SpatialGetMagFieldMin Description:


Get the minimum magnetic field strength supported by an axis.

Connector Pane:

Controls and Indicators:


Input Device # identification. The magnetic field index. (x, y, z) Describes error conditions that occur before this node runs.

Output Same as the Device In. The minimum magnetic field strength in Gauss. Contains error information.

2011 Phidgets Inc.

264

Specific Modules

5.11.20 SpatialOpen Description:


Open a PhidgetSpatial.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Serial number. Specify -1 to open any. Time to wait for the attachment. Specify 0 to wait forever. (Default is 5000) Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the serial number. Returns the device status. (Attached is T; Not attached is F) Contains error information.

2011 Phidgets Inc.

Specific Modules

265

5.11.21 SpatialResetCompassCorrectionParameters Description:


Reset the compass correction factors. Magnetic field data will be presented directly as reported by the sensor.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

266

Specific Modules

5.11.22 SpatialSetCompassCorrectionParameters Description:


Set the compass correction factors. This can be used to correcting any sensor errors, including hard and soft iron offsets and sensor error factors.

Connector Pane:

Controls and Indicators:


Input Device # identification. Input Settings: Local magnetic field strength. Axis 0 offset correction. Axis 1 offset correction. Axis 2 offset correction. Axis 0 gain correction. Axis 1 gain correction. Axis 2 gain correction. Non-orthogonality correction factor 0. Non-orthogonality correction factor 1. Non-orthogonality correction factor 2. Non-orthogonality correction factor 3. Non-orthogonality correction factor 4. Non-orthogonality correction factor 5. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

267

5.11.23 SpatialSetDataRate Description:


Set the data rate. Note that data at rates faster then 8ms will be delivered to events as an array of data.

Connector Pane:

Controls and Indicators:


Input Device # identification. The data rate in milliseconds. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

268

Specific Modules

5.11.24 SpatialZeroGyro Description:


Zero the gyroscope. This takes about two seconds and the gyro axes will report 0 during the process. This should only be called when the board is not moving.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

269

5.12

Phidget Stepper
This contains VI functions for Phidget Stepper. Since Labview version 7.1 doesn't support 64bit integers, the Phidget Labview library contains special functions for Labview 7.1 marked by 71. See the product manual for more specific API details, supported functionality, units, etc.

StepperCreate StepperEventCloseCurrentVelocity StepperEventCloseInput StepperEventClosePosition StepperEventClosePosition71 StepperEventCreateCurrent StepperEventCreateInput StepperEventCreatePosition StepperEventCreatePosition71 StepperEventCreateVelocity StepperEventExeCurrentVelocity StepperEventExeInput StepperEventExePosition StepperEventExePosition71 StepperGetAcceleration StepperGetAccelerationMax StepperGetAccelerationMin StepperGetCurrent StepperGetCurrentLimit StepperGetCurrentMax StepperGetCurrentMin StepperGetCurrentPosition StepperGetCurrentPosition71

2011 Phidgets Inc.

270

Specific Modules

StepperGetEngaged StepperGetPositionMax StepperGetPositionMax71 StepperGetPositionMin StepperGetPositionMin71 StepperGetTargetPosition StepperGetTargetPosition71 StepperGetVelocity StepperGetVelocityLimit StepperGetVelocityMax StepperGetVelocityMin StepperInputCount StepperInputState StepperMotorCount StepperOpen StepperSetAcceleration StepperSetCurrentLimit StepperSetCurrentPosition StepperSetCurrentPosition71 StepperSetEngaged StepperSetTargetPosition StepperSetTargetPosition71 StepperSetVelocityLimit StepperStoppedState

2011 Phidgets Inc.

Specific Modules

271

5.12.1 StepperCreate Description:


Create a Phidget Stepper handle.

Connector Pane:

Controls and Indicators:


Input Describes error conditions that occur before this node runs.

Output Device # identification. Contains error information.

2011 Phidgets Inc.

272

Specific Modules

5.12.2 StepperEventCloseCurrentVelocity Description:


Close the Phidget Stepper current change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

273

5.12.3 StepperEventCloseInput Description:


Close the Phidget Stepper input change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

274

Specific Modules

5.12.4 StepperEventClosePosition Description:


Close the Phidget Stepper position change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

275

5.12.5 StepperEventClosePosition71 Description:


Close the Phidget Stepper position change event handle for Labview version 7.1 only.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

276

Specific Modules

5.12.6 StepperEventCreateCurrent Description:


Set up a current change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

Specific Modules

277

5.12.7 StepperEventCreateInput Description:


Set up an input change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

278

Specific Modules

5.12.8 StepperEventCreatePosition Description:


Set up a position change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

Specific Modules

279

5.12.9 StepperEventCreatePosition71 Description:


Set up a position change event handle for Labview version 7.1 only.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

280

Specific Modules

5.12.10 StepperEventCreateVelocity Description:


Set up a velocity change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

Specific Modules

281

5.12.11 StepperEventExeCurrentVelocity Description:


This is called when the Phidget Stepper Current/Velocity event changes.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Same as the Event Registration Refnum In. The motor index. The return value of related event. (E.g. for velocity change event, this value is velocity.) Returns the event status. (Executed is T; Not executed is F) Contains error information.

2011 Phidgets Inc.

282

Specific Modules

5.12.12 StepperEventExeInput Description:


This is called when the Phidget Stepper Input event changes.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Same as the Event Registration Refnum In. The motor index. The input. Returns the event status. (Executed is T; Not executed is F) Contains error information.

2011 Phidgets Inc.

Specific Modules

283

5.12.13 StepperEventExePosition Description:


This is called when the Phidget Stepper Position event changes.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Same as the Event Registration Refnum In. The motor index. The position. Returns the event status. (Executed is T; Not executed is F) Contains error information.

2011 Phidgets Inc.

284

Specific Modules

5.12.14 StepperEventExePosition71 Description:


This is called when the Phidget Stepper Position event changes. This function is for Labview version 7.1 only.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Same as the Event Registration Refnum In. The motor index. The high 8 bits of the position. The low 32 bits of the position. Note that if the position is negative, the sign bit must be extended into the HighBit manually. Returns the event status. (Executed is T; Not executed is F) Contains error information.

2011 Phidgets Inc.

Specific Modules

285

5.12.15 StepperGetAcceleration Description:


Get the last set acceleration for a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The acceleration. Contains error information.

2011 Phidgets Inc.

286

Specific Modules

5.12.16 StepperGetAccelerationMax Description:


Get the maximum acceleration supported by a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The maximum acceleration. Contains error information.

2011 Phidgets Inc.

Specific Modules

287

5.12.17 StepperGetAccelerationMin Description:


Get the minimum acceleration supported by a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The minimum acceleration. Contains error information.

2011 Phidgets Inc.

288

Specific Modules

5.12.18 StepperGetCurrent Description:


Get the current current draw for a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The current. Contains error information.

2011 Phidgets Inc.

Specific Modules

289

5.12.19 StepperGetCurrentLimit Description:


Get the current limit for a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The current limit. Contains error information.

2011 Phidgets Inc.

290

Specific Modules

5.12.20 StepperGetCurrentMax Description:


Get the maximum current limit.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The maximum current limit. Contains error information.

2011 Phidgets Inc.

Specific Modules

291

5.12.21 StepperGetCurrentMin Description:


Get the minimum current limit.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The minimum current limit. Contains error information.

2011 Phidgets Inc.

292

Specific Modules

5.12.22 StepperGetCurrentPosition Description:


Get the current position of a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The position. Contains error information.

2011 Phidgets Inc.

Specific Modules

293

5.12.23 StepperGetCurrentPosition71 Description:


Get the current position of a motor. This function is for Labview version 7.1 only.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The position.This includes hight bit and low bit. Please refer to StepperEventExePosition71. Contains error information.

2011 Phidgets Inc.

294

Specific Modules

5.12.24 StepperGetEngaged Description:


Get the engaged state of a motor. This is whether the motor is powered or not.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The engaged state. Possible values are 0 for False, 1 for True and others for undefined. The engaged state (Boolean type). Possible values are True for Engaged and False for Not Engaged. Contains error information.

2011 Phidgets Inc.

Specific Modules

295

5.12.25 StepperGetPositionMax Description:


Get the maximum position that a motor can go to.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The maximum position. Contains error information.

2011 Phidgets Inc.

296

Specific Modules

5.12.26 StepperGetPositionMax71 Description:


Get the maximum position that a motor can go to. This function is for Labview version 7.1 only.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The position.This includes hight bit and low bit. Please refer to StepperEventExePosition71. Contains error information.

2011 Phidgets Inc.

Specific Modules

297

5.12.27 StepperGetPositionMin Description:


Get the minimum position that a motor can go to.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The minimum position. Contains error information.

2011 Phidgets Inc.

298

Specific Modules

5.12.28 StepperGetPositionMin71 Description:


Get the minimum position that a motor can go to. This function is for Labview version 7.1 only.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The position.This includes hight bit and low bit. Please refer to StepperEventExePosition71. Contains error information.

2011 Phidgets Inc.

Specific Modules

299

5.12.29 StepperGetTargetPosition Description:


Get the last set target position of a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The position. Contains error information.

2011 Phidgets Inc.

300

Specific Modules

5.12.30 StepperGetTargetPosition71 Description:


Get the last set target position of a motor. This function is for Labview version 7.1 only.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The position.This includes hight bit and low bit. Please refer to StepperEventExePosition71. Contains error information.

2011 Phidgets Inc.

Specific Modules

301

5.12.31 StepperGetVelocity Description:


Get the current velocity of a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The velocity. Contains error information.

2011 Phidgets Inc.

302

Specific Modules

5.12.32 StepperGetVelocityLimit Description:


Get the last set velocity limit for a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The velocity limit. Contains error information.

2011 Phidgets Inc.

Specific Modules

303

5.12.33 StepperGetVelocityMax Description:


Get the maximum velocity that can be set for a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The maximum velocity. Contains error information.

2011 Phidgets Inc.

304

Specific Modules

5.12.34 StepperGetVelocityMin Description:


Get the minimum velocity that can be set for a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The minimum velocity. Contains error information.

2011 Phidgets Inc.

Specific Modules

305

5.12.35 StepperInputCount Description:


Get the number of digital inputs supported by this board.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The digital input count. Contains error information.

2011 Phidgets Inc.

306

Specific Modules

5.12.36 StepperInputState Description:


Get the state of a digital input.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The input state. Possible values are 0 for False, 1 for True and others for undefined. The input state (Boolean type). Contains error information.

2011 Phidgets Inc.

Specific Modules

307

5.12.37 StepperMotorCount Description:


Get the number of motors supported by this controller.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The motor count. Contains error information.

2011 Phidgets Inc.

308

Specific Modules

5.12.38 StepperOpen Description:


Open a PhidgetStepper.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Serial number. Specify -1 to open any. Time to wait for the attachment. Specify 0 to wait forever. (Default is 5000) Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the serial number. Returns the device status. (Attached is T; Not attached is F) Contains error information.

2011 Phidgets Inc.

Specific Modules

309

5.12.39 StepperSetAcceleration Description:


Set the acceleration for a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. The acceleration. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

310

Specific Modules

5.12.40 StepperSetCurrentLimit Description:


Set the current limit for a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. The current limit. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

311

5.12.41 StepperSetCurrentPosition Description:


Set the current position of a motor. It will not move the motor, just update the position value.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. The position. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

312

Specific Modules

5.12.42 StepperSetCurrentPosition71 Description:


Set the current position of a motor. It will not move the motor, just update the position value. This function is for Labview version 7.1 only.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. The high 8 bits of the position. The low 32 bits of the position. Note that if the position is negative, the sign bit must be extended into the HighBit manually. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

313

5.12.43 StepperSetEngaged Description:


Set the engaged state of a motor. This is whether the motor is powered or not.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Set the engage state. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

314

Specific Modules

5.12.44 StepperSetTargetPosition Description:


Set the target position of a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. The position. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

315

5.12.45 StepperSetTargetPosition71 Description:


Set the target position of a motor. This function is for Labview version 7.1 only.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. The high 8 bits of the position. The low 32 bits of the position. Note that if the position is negative, the sign bit must be extended into the HighBit manually. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

316

Specific Modules

5.12.46 StepperSetVelocityLimit Description:


Set the velocity limit for a motor.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. The velocity limit. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

317

5.12.47 StepperStoppedState Description:


Get the stopped state of a motor. This is true when the motor is not moving and there are no outstanding commands.

Connector Pane:

Controls and Indicators:


Input Device # identification. The motor index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The stopped state. Possible values are 0 for False, 1 for True and others for undefined. The stopped state (Boolean type). Possible values are True for Stopped and False for Not Stopped. Contains error information.

2011 Phidgets Inc.

318

Specific Modules

5.13

Phidget Temperature Sensor


This contains VI functions for Phidget Temperature Sensor. See the product manual for more specific API details, supported functionality, units, etc.

TempCreate TempEventClose TempEventCreate TempEventExe TempGetAmbient TempGetAmbientMax TempGetAmbientMin TempGetPotential TempGetPotentialMax TempGetPotentialMin TempGetTemperature TempGetTemperatureMax TempGetTemperatureMin TempGetThermocoupleType TempGetTrigger TempInputCount TempOpen TempSetThermocoupleType TempSetTrigger

2011 Phidgets Inc.

Specific Modules

319

5.13.1 TempCreate Description:


Create a Phidget Temperature Sensor handle.

Connector Pane:

Controls and Indicators:


Input Describes error conditions that occur before this node runs.

Output Device # identification. Contains error information.

2011 Phidgets Inc.

320

Specific Modules

5.13.2 TempEventClose Description:


Close the Phidget Temperature Sensor event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

321

5.13.3 TempEventCreate Description:


Set up a temperature change event handle.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Event # identification. Contains error information.

2011 Phidgets Inc.

322

Specific Modules

5.13.4 TempEventExe Description:


This is called when the temperature changes by more then the change trigger.

Connector Pane:

Controls and Indicators:


Input Device # identification. Event # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. Same as the Event Registration Refnum In. The thermocouple index. The temperature. Returns the event status. (Executed is T; Not executed is F) Contains error information.

2011 Phidgets Inc.

Specific Modules

323

5.13.5 TempGetAmbient Description:


Get the ambient (board) temperature.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The ambient (board) temperature. Contains error information.

2011 Phidgets Inc.

324

Specific Modules

5.13.6 TempGetAmbientMax Description:


Get the maximum temperature that the ambient onboard temperature sensor can measure.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The maximum temperature. Contains error information.

2011 Phidgets Inc.

Specific Modules

325

5.13.7 TempGetAmbientMin Description:


Get the minimum temperature that the ambient onboard temperature sensor can measure.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The minimum temperature. Contains error information.

2011 Phidgets Inc.

326

Specific Modules

5.13.8 TempGetPotential Description:


Get the currently sensed potential for a thermocouple input.

Connector Pane:

Controls and Indicators:


Input Device # identification. The thermocouple index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The potential. Contains error information.

2011 Phidgets Inc.

Specific Modules

327

5.13.9 TempGetPotentialMax Description:


Get the maximum potential that a thermocouple input can measure.

Connector Pane:

Controls and Indicators:


Input Device # identification. The thermocouple index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The maximum potential. Contains error information.

2011 Phidgets Inc.

328

Specific Modules

5.13.10 TempGetPotentialMin Description:


Get the minimum potential that a thermocouple input can measure.

Connector Pane:

Controls and Indicators:


Input Device # identification. The thermocouple index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The minimum potential. Contains error information.

2011 Phidgets Inc.

Specific Modules

329

5.13.11 TempGetTemperature Description:


Get the temperature measured by a thermocouple input.

Connector Pane:

Controls and Indicators:


Input Device # identification. The thermocouple index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The temperature. Contains error information.

2011 Phidgets Inc.

330

Specific Modules

5.13.12 TempGetTemperatureMax Description:


Get the maximum temperature that can be measured by a thermocouple input. This depends on the type of thermocouple attached, as well as the ambient temperature.

Connector Pane:

Controls and Indicators:


Input Device # identification. The thermocouple index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The maximum temperature. Contains error information.

2011 Phidgets Inc.

Specific Modules

331

5.13.13 TempGetTemperatureMin Description:


Get the minimum temperature that can be measured by a thermocouple input. This depends on the type of thermocouple attached, as well as the ambient temperature.

Connector Pane:

Controls and Indicators:


Input Device # identification. The thermocouple index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The minimum temperature. Contains error information.

2011 Phidgets Inc.

332

Specific Modules

5.13.14 TempGetThermocoupleType Description:


Get the type of thermocouple set to be at a thermocouple input. By default this is K-Type (1).

Connector Pane:

Controls and Indicators:


Input Device # identification. The thermocouple index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The thermocouple type. This is an enum. Please refer to Phigets Constant -> ThermocoupleType Contains error information.

2011 Phidgets Inc.

Specific Modules

333

5.13.15 TempGetTrigger Description:


Get the change trigger for a thermocouple input.

Connector Pane:

Controls and Indicators:


Input Device # identification. The thermocouple index. Describes error conditions that occur before this node runs.

Output Same as the Device In. The change trigger. Contains error information.

2011 Phidgets Inc.

334

Specific Modules

5.13.16 TempInputCount Description:


Get the number of thermocouple inputs supported by this board.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The thermocouple input count. Contains error information.

2011 Phidgets Inc.

Specific Modules

335

5.13.17 TempOpen Description:


Open a Phidget Temperature Sensor.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Serial number. Specify -1 to open any. Time to wait for the attachment. Specify 0 to wait forever. (Default is 5000) Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the serial number. Returns the device status. (Attached is T; Not attached is F) Contains error information.

2011 Phidgets Inc.

336

Specific Modules

5.13.18 TempSetThermocoupleType Description:


Set the type of thermocouple plugged into a thermocouple input. By default this is K-Type.

Connector Pane:

Controls and Indicators:


Input Device # identification. The thermocouple index. The thermocouple type. This is an enum. Please refer to Phigets Constant -> ThermocoupleType Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

337

5.13.19 TempSetTrigger Description:


Set the change trigger for a thermocouple input.

Connector Pane:

Controls and Indicators:


Input Device # identification. The thermocouple index. The change trigger. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

338

Specific Modules

5.14

Phidget TextLCD
This contains VI functions for Phidget TextLCD. See the product manual for more specific API details, supported functionality, units, etc.

TextCreate TextGetBacklightState TextGetBrightness TextGetColumnCount TextGetContrast TextGetCursorBlinkState TextGetCursorState TextGetRowCount TextOpen TextSetBacklightState TextSetBrightness TextSetCharacter TextSetContrast TextSetCursorBlinkState TextSetCursorState TextSetDisplayChar TextSetDisplayString

2011 Phidgets Inc.

Specific Modules

339

5.14.1 TextCreate Description:


Create a Phidget TextLCD handle.

Connector Pane:

Controls and Indicators:


Input Describes error conditions that occur before this node runs.

Output Device # identification. Contains error information.

2011 Phidgets Inc.

340

Specific Modules

5.14.2 TextGetBacklightState Description:


Get the state of the backlight.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The backlight state. Possible values are 0 for False, 1 for True and others for undefined. The backlight state (Boolean type). Contains error information.

2011 Phidgets Inc.

Specific Modules

341

5.14.3 TextGetBrightness Description:


Get the brightness of the backlight. Not supported on all TextLCDs.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The backlight brightness (0-255). Contains error information.

2011 Phidgets Inc.

342

Specific Modules

5.14.4 TextGetColumnCount Description:


Get the number of columns per supported by this display.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The column count. Contains error information.

2011 Phidgets Inc.

Specific Modules

343

5.14.5 TextGetContrast Description:


Get the last set contrast value.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The contrast (0-255). Contains error information.

2011 Phidgets Inc.

344

Specific Modules

5.14.6 TextGetCursorBlinkState Description:


Get the cursor blink state.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The cursor blink state. Possible values are 0 for False, 1 for True and others for undefined. The cursor blink state (Boolean type). Contains error information.

2011 Phidgets Inc.

Specific Modules

345

5.14.7 TextGetCursorState Description:


Get the cursor visible state.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The state of the cursor. Possible values are 0 for False, 1 for True and others for undefined. The state of the cursor (Boolean type). Contains error information.

2011 Phidgets Inc.

346

Specific Modules

5.14.8 TextGetRowCount Description:


Get the number of rows supported by this display.

Connector Pane:

Controls and Indicators:


Input Device # identification. Describes error conditions that occur before this node runs.

Output Same as the Device In. The row count. Contains error information.

2011 Phidgets Inc.

Specific Modules

347

5.14.9 TextOpen Description:


Open a Phidget TextLCD.

Connector Pane:

Controls and Indicators:


Input Device # identification. This function will create a new device identification if it's 0 or invalid. Serial number. Specify -1 to open any. Time to wait for the attachment. Specify 0 to wait forever. (Default is 5000) Describes error conditions that occur before this node runs.

Output Same as the Device In. Returns the serial number. Returns the device status. (Attached is T; Not attached is F) Contains error information.

2011 Phidgets Inc.

348

Specific Modules

5.14.10 TextSetBacklightState Description:


Set the state of the backlight.

Connector Pane:

Controls and Indicators:


Input Device # identification. Set the backlight state. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

349

5.14.11 TextSetBrightness Description:


Set the brightness of the backlight. Not supported on all TextLCDs

Connector Pane:

Controls and Indicators:


Input Device # identification. The backlight brightness (0-255). Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

350

Specific Modules

5.14.12 TextSetCharacter Description:


Set a custom character. See the product manual for more information.

Connector Pane:

Controls and Indicators:


Input Device # identification. The custom character index (8-15). The first part of the custom character. The second part of the custom character. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

351

5.14.13 TextSetContrast Description:


Set the last set contrast value.

Connector Pane:

Controls and Indicators:


Input Device # identification. The contrast (0-255). Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

352

Specific Modules

5.14.14 TextSetCursorBlinkState Description:


Set the cursor blink state.

Connector Pane:

Controls and Indicators:


Input Device # identification. Set the cursor blink state. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

353

5.14.15 TextSetCursorState Description:


Set the cursor visible state.

Connector Pane:

Controls and Indicators:


Input Device # identification. Set the state of the cursor. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

354

Specific Modules

5.14.16 TextSetDisplayChar Description:


Set a single character on the display.

Connector Pane:

Controls and Indicators:


Input Device # identification. The row index. The column index. The character to display. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

Specific Modules

355

5.14.17 TextSetDisplayString Description:


Set a row on the display.

Connector Pane:

Controls and Indicators:


Input Device # identification. The row index. The string to display. Make sure this is not longer then TextGetColumnCount. Describes error conditions that occur before this node runs.

Output Same as the Device In. Contains error information.

2011 Phidgets Inc.

356

Specific Modules

5.15

Phidget TextLED
Discontinued.

2011 Phidgets Inc.

Specific Modules

357

5.16

Phidget Weight Sensor


Discontinued.

2011 Phidgets Inc.

358

Phidgets Constants

Phidgets Constants
This section describes each of the Phidgets constant used by different Phidgets.

ServoType ThermocoupleType CodeInfo IREncoding IRLength

2011 Phidgets Inc.

Phidgets Constants

359

6.1

ServoType
An enum value with the following definition:

Value PHIDGET_SERVO_DEFAULT = 1,

Comments Default - This is what the servo API been historically used, originally based on the Futaba FP-S148 PHIDGET_SERVO_RAW_us_MODE = 2, Raw us mode - all position, velocity, acceleration functions are specified in microseconds rather then degrees PHIDGET_SERVO_HITEC_HS322HD = 3, HiTec HS-322HD Standard Servo PHIDGET_SERVO_HITEC_HS5245MG = 4, HiTec HS-5245MG Digital Mini Servo PHIDGET_SERVO_HITEC_805BB = 5, HiTec HS-805BB Mega Quarter Scale Servo PHIDGET_SERVO_HITEC_HS422 = 6, HiTec HS-422 Standard Servo PHIDGET_SERVO_TOWERPRO_MG90 = 7, Tower Pro MG90 Micro Servo PHIDGET_SERVO_HITEC_HSR1425CR = 8, HiTec HSR-1425CR Continuous Rotation Servo PHIDGET_SERVO_HITEC_HS785HB = 9, HiTec HS-785HB Sail Winch Servo PHIDGET_SERVO_HITEC_HS485HB = 10, HiTec HS-485HB Deluxe Servo PHIDGET_SERVO_HITEC_HS645MG = 11, HiTec HS-645MG Ultra Torque Servo PHIDGET_SERVO_HITEC_815BB = 12, HiTec HS-815BB Mega Sail Servo PHIDGET_SERVO_FIRGELLI_L12_30_50_06_R Firgelli L12 Linear Actuator 30mm 50:1 = 13, PHIDGET_SERVO_FIRGELLI_L12_50_100_06_ Firgelli L12 Linear Actuator 50mm 100:1 R = 14, PHIDGET_SERVO_FIRGELLI_L12_50_210_06_ Firgelli L12 Linear Actuator 50mm 210:1 R = 15, PHIDGET_SERVO_FIRGELLI_L12_100_50_06_ Firgelli L12 Linear Actuator 100mm 50:1 R = 16, PHIDGET_SERVO_FIRGELLI_L12_100_100_06_ Firgelli L12 Linear Actuator 100mm 100:1 R = 17, PHIDGET_SERVO_USER_DEFINED = others Undefined

2011 Phidgets Inc.

360

Phidgets Constants

6.2

ThermocoupleType
An enum value with the following definition:

Value PHIDGET_TEMPERATURE_SENSOR_K_TYPE = 1, PHIDGET_TEMPERATURE_SENSOR_J_TYPE = 2, PHIDGET_TEMPERATURE_SENSOR_E_TYPE = 3, PHIDGET_TEMPERATURE_SENSOR_T_TYPE = 4, PHIDGET_SERVO_USER_DEFINED = others

Comments K-Type thermocouple J-Type thermocouple E-Type thermocouple T-Type thermocouple Undefined

2011 Phidgets Inc.

Phidgets Constants

361

6.3

CodeInfo
The PhidgetIR CodeInfo structure contains all information needed to transmit a code, apart from the actual code data. Some values can be set to null to select defaults. See the product manual for more information.

Data Item Type bitCount encoding

Comments

Number of bits in the code. Encoding used to encode the data. This is an enum. Please refer to Phigets Constant -> IREncoding length Constant or Variable length encoding. This is an enum. Please refer to Phigets Constant -> IRLength gap Gap time in us. trail Trail time in us - can be 0 for none. header [2] Header pulse and space - can be 0 for none. one [2] Pulse and Space times to represent a '1' bit, in us. zero [2] Pulse and Space times to represent a '0' bit, in us. repeat [26] A series or pulse and space times to represent the repeat code. Start and end with pulses and null terminate. Set to 0 for none. min_repeat Minimum number of times to repeat a code on transmit. toggle_mask Bit toggles, which are applied to the code after each transmit. [16] carrierFrequ Carrier frequency in Hz - defaults to 38kHz. ency dutyCycle Duty Cycle in percent (10-50). Defaults to 33.

2011 Phidgets Inc.

362

Phidgets Constants

6.4

IREncoding
The PhidgetIR supports these data encodings:

Value PHIDGET_IR_ENCODING_UNKNOWN = 1, PHIDGET_IR_ENCODING_SPACE = 2, PHIDGET_IR_ENCODING_PULSE = 3, PHIDGET_IR_ENCODING_BIPHASE = 4, PHIDGET_IR_ENCODING_RC5 = 5, PHIDGET_IR_ENCODING_RC6 = 6, Others

Comments Unknown - the default value Space encoding, or Pulse Distance Modulation Pulse encoding, or Pulse Width Modulation Bi-Phase, or Manchester encoding RC5 - a type of Bi-Phase encoding RC6 - a type of Bi-Phase encoding Undefined

2011 Phidgets Inc.

Phidgets Constants

363

6.5

IRLength
The PhidgetIR supports these encoding lengths:

Value PHIDGET_IR_LENGTH_UNKNOWN = 1, PHIDGET_IR_LENGTH_CONSTANT = 2, PHIDGET_IR_LENGTH_VARIABLE = 3, Others

Comments Unknown - the default value Constant - the bitstream + gap length is constant Variable - the bitstream has a variable length with a constant gap Undefined

2011 Phidgets Inc.

364

Index

Index
-__AttachCHK 44 _ChkError 44 _Close 44 _Delete 44 _Open 44 _SerialReturn 44 _WaitAttach 44

AdvServoSetEngaged 71, 96 AdvServoSetPos 71, 97 AdvServoSetPosMax 71, 98 AdvServoSetPosMin 71, 99 AdvServoSetRampingState 71, 100 AdvServoSetServoParameters 71, 101 AdvServoSetServoType 71, 102 AdvServoSetVellmt 71, 103 AdvServoStoppedState 71, 104

-CCodeInfo 155, 358

-AAcceAxisCount 59, 60 AcceCreate 59, 61 AcceEventClose 59, 62 AcceEventCreate 59, 63 AcceEventExe 59, 64 AcceGetData 59, 65 AcceGetMax 59, 66 AcceGetMin 59, 67 AcceGetTrigger 59, 68 AcceOpen 59, 69 AcceSetTrigger 59, 70 AdvServoCount 71, 73 AdvServoCreate 71, 74 AdvServoEventClose 71, 75 AdvServoEventCreateCrtChange 71, 76 AdvServoEventCreatePosChange 71, 77 AdvServoEventCreateVelChange 71, 78 AdvServoEventExe 71, 79 AdvServoGetAcce 71, 80 AdvServoGetAcceMax 71, 81 AdvServoGetAcceMin 71, 82 AdvServoGetCurrent 71, 83 AdvServoGetEngaged 71, 84 AdvServoGetPos 71, 85 AdvServoGetPosMax 71, 86 AdvServoGetPosMin 71, 87 AdvServoGetRampingState 71, 88 AdvServoGetServoType 71, 89 AdvServoGetVel 71, 90 AdvServoGetVellmt 71, 91 AdvServoGetVelmax 71, 92 AdvServoGetVelmin 71, 93 AdvServoOpen 71, 94 AdvServoSetAcce 71, 95

-EEncoderCreate 105, 106 EncoderEventCloseInput 105, 107 EncoderEventClosePosition 105, 108 EncoderEventCreateInput 105, 109 EncoderEventCreatePosition 105, 110 EncoderEventExeInput 105, 111 EncoderEventExePosition 105, 112 EncoderGetCount 105, 113 EncoderGetEnabledState 105, 114 EncoderGetIndexPosition 105, 115 EncoderGetInputCount 105, 116 EncoderGetInputState 105, 117 EncoderGetPosition 105, 118 EncoderOpen 105, 119 EncoderSetEnabled 105, 120 EncoderSetPosition 105, 121 ErrorHandler 23 Event Handler 11, 12 EventCloseIntDouble 23 EventCloseIntInt 23 EventCreateIntDouble 23 EventCreateIntInt 23 EventExeIntDouble 23 EventExeIntInt 23

-GGetting Start 11, 12

-IIFCreate 122, 123 IFEventClose 122, 124 IFEventCreateInput 122, 125 IFEventCreateOutput 122, 126
2011 Phidgets Inc.

Index

365

IFEventCreateSensor 122, 127 IFEventExe 122, 128 IFGetDataRate 122, 129 IFGetDataRateMax 122, 130 IFGetDataRateMin 122, 131 IFGetInputCount 122, 132 IFGetInputState 122, 133 IFGetOutputCount 122, 134 IFGetOutputState 122, 135 IFGetRatio 122, 136 IFGetSensorCount 122, 137 IFGetSensorValue 122, 138 IFGetSensorValueRaw 122, 139 IFGetTrig 122, 140 IFOpen 122, 141 IFSetDataRate 122, 142 IFSetOutputState 122, 143 IFSetRatio 122, 144 IFSetTrig 122, 145 IRCreate 146 IREncoding 358, 361 IREventCloseOnCode 146 IREventCloseOnLearn 146 IREventCloseOnRawData 146 IREventCreateOnCode 146 IREventCreateOnLearn 146 IREventCreateOnRawData 146 IREventExeOnCode 146 IREventExeOnLearn 146 IREventExeOnRawData 146 IRGetLastCode 146 IRGetLastLearnedCode 146 IRGetRawData 146 IRLength 358, 361 IROpen 146 IRTransmit 146 IRTransmitRaw 146 IRTransmitRepeat 146

LEDSetVoltage

164

-MMCCreate 174 MCEventCloseInput 174 MCEventCloseVelocityCurrent 174 MCEventCreateCurrent 174 MCEventCreateInput 174 MCEventCreateVelocity 174 MCEventExeInput 174 MCEventExeVelocityCurrent 174 MCGetAcceleration 174 MCGetAccelerationMax 174 MCGetAccelerationMin 174 MCGetCurrent 174 MCGetInputCount 174 MCGetInputState 174 MCGetMotorCount 174 MCGetVelocity 174 MCOpen 174 MCSetAcceleration 174 MCSetVelocity 174 Multiple Devices 11, 12

-PPHCreate 194 PHEventClose 194 PHEventCreate 194 PHEventExe 194 PHGetPH 194 PHGetPHMax 194 PHGetPHMin 194 PHGetPHTrigger 194 PHGetPotential 194 PHGetPotentialMax 194 PHGetPotentialMin 194 Phidget Accelerometer 58, 59 Phidget Advanced Servo 58, 71 Phidget Encoder 58, 105 Phidget InterfaceKit 58, 122 Phidget IR 58, 146 Phidget LED 58, 164 Phidget Motor Control 58, 174 Phidget PH Sensor 58, 194 Phidget RFID 58, 209 Phidget Servo 58, 228 Phidget Spatial 58, 244

-LLEDCount 164 LEDCreate 164 LEDGetBrightness 164 LEDGetCurrentLimit 164 LEDGetVoltage 164 LEDOpen 164 LEDSetBrightness 164 LEDSetCurrentLimit 164
2011 Phidgets Inc.

366

Index

Phidget Stepper 58, 269 Phidget Temperature Sensor 58, 318 Phidget TextLCD 58, 338 Phidget TextLED 58, 356 Phidget Weight Sensor 58, 357 PhidgetClose 23 PhidgetDelet 23 PhidgetDelete 23 PhidgetDeviceLabel 23 PhidgetDeviceName 23 PhidgetDeviceType 23 PhidgetDeviceVersion 23 PhidgetEventCloseOnError 23 PhidgetEventCreateOnError 23 PhidgetEventExeOnError 23 PhidgetGetDeviceClass 23 PhidgetGetDeviceID 23 PhidgetGetDeviceLabel 23 PhidgetGetServerStatus 23 PhidgetLibraryVersion 23 PhidgetOpen 23 PhidgetOpenRemote 23 PhidgetOpenRemoteIP 23 Phidgets Common 11, 12, 13, 23 Phidgets Constant 11, 12, 358 PhidgetServerAddress 23 PhidgetServiceID 23 PhidgetSetDeviceLabel 23 Phigets Constant 89, 102, 238, 243, 332, 336 PHOpen 194 PHSetTemperature 194 PHSetTrig 194 Platform Support 12 Programming Concept 11, 12

RFIDGetOutputState 209 RFIDGetTagState 209 RFIDOpen 209 RFIDSetAntennaState 209 RFIDSetLEDState 209 RFIDSetOutputState 209

-SServo Create 228 ServoCount 228, 229 ServoCreate 228, 230 ServoEventClose 228 ServoEventCreate 228 ServoEventExe 228 ServoGetEngaged 228, 234 ServoGetPos 228, 235 ServoGetPosMax 228, 236 ServoGetPosMin 228, 237 ServoGetServoType 228, 238 ServoOpen 228, 239 ServoSetEngaged 228, 240 ServoSetPos 228, 241 ServoSetServoParameters 228, 242 ServoSetServoType 228, 243 ServoType 89, 102, 238, 243, 358 SpatialCreate 244, 245 SpatialEventClose 244, 246 SpatialEventCreate 244, 247 SpatialEventExe 244, 248 SpatialGetAcce 244, 249 SpatialGetAcceAxisCount 244, 250 SpatialGetAcceMax 244, 251 SpatialGetAcceMin 244, 252 SpatialGetAngRate 244, 253 SpatialGetAngRateMax 244, 254 SpatialGetAngRateMin 244, 255 SpatialGetCompassAxisCount 244, 256 SpatialGetDataRate 244, 248, 257 SpatialGetDataRateMax 244, 258 SpatialGetDataRateMin 244, 259 SpatialGetGyroAxisCount 244, 260 SpatialGetMagField 244, 261 SpatialGetMagFieldMax 244, 262 SpatialGetMagFieldMin 244, 263 SpatialOpen 244, 264 SpatialResetCompassCorrectionParameters 244, 265 SpatialSetCompassCorrectionParameters 244, 266
2011 Phidgets Inc.

-RRFIDCreate 209 RFIDEventClose 209 RFIDEventCloseOutput 209 RFIDEventCreateOutput 209 RFIDEventCreateTag 209 RFIDEventCreateTagLost 209 RFIDEventExe 209 RFIDEventExeOutput 209 RFIDGetAntennaState 209 RFIDGetLastTag 209 RFIDGetLEDState 209 RFIDGetOutputCount 209

Index

367

SpatialSetDataRate 244, 267 SpatialZeroGyro 244, 268 Specific Modules 11, 12, 13, 58 StepperCreate 269 StepperEventCloseCurrentVelocity 269 StepperEventCloseInput 269 StepperEventClosePosition 269 StepperEventClosePosition71 269 StepperEventCreateCurrent 269 StepperEventCreateInput 269 StepperEventCreatePosition 269 StepperEventCreatePosition71 269 StepperEventCreateVelocity 269 StepperEventExeCurrentVelocity 269 StepperEventExeInput 269 StepperEventExePosition 269 StepperEventExePosition71 269, 293 StepperGetAcceleration 269 StepperGetAccelerationMax 269 StepperGetAccelerationMin 269 StepperGetCurrent 269 StepperGetCurrentLimit 269 StepperGetCurrentMax 269 StepperGetCurrentMin 269 StepperGetCurrentPosition 269 StepperGetCurrentPosition71 269 StepperGetEngaged 269 StepperGetPositionMax 269 StepperGetPositionMax71 269 StepperGetPositionMin 269 StepperGetPositionMin71 269 StepperGetTargetPosition 269 StepperGetTargetPosition71 269 StepperGetVelocity 269 StepperGetVelocityLimit 269 StepperGetVelocityMax 269 StepperGetVelocityMin 269 StepperInputCount 269 StepperInputState 269 StepperMotorCount 269 StepperOpen 269 StepperSetAcceleration 269 StepperSetCurrentLimit 269 StepperSetCurrentPosition 269 StepperSetCurrentPosition71 269 StepperSetEngaged 269 StepperSetTargetPosition 269 StepperSetTargetPosition71 269
2011 Phidgets Inc.

StepperSetVelocityLimit 269 StepperStoppedState 269 SubVIs (Folder) 23

-TTempCreate 318 TempEventClose 318 TempEventCreate 318 TempEventExe 318 TempGetAmbient 318 TempGetAmbientMax 318 TempGetAmbientMin 318 TempGetPotential 318 TempGetPotentialMax 318 TempGetPotentialMin 318 TempGetTemperature 318 TempGetTemperatureMax 318 TempGetTemperatureMin 318 TempGetThermocoupleType 318 TempGetTrigger 318 TempInputCount 318 TempOpen 318 TempSetThermocoupleType 318 TempSetTrigger 318 TextCreate 338 TextGetBacklightState 338 TextGetBrightness 338 TextGetColumnCount 338 TextGetContrast 338 TextGetCursorBlinkState 338 TextGetCursorState 338 TextGetRowCount 338 TextOpen 338 TextSetBacklightState 338 TextSetBrightness 338 TextSetCharacter 338 TextSetContrast 338 TextSetCursorBlinkState 338 TextSetCursorState 338 TextSetDisplayChar 338 TextSetDisplayString 338 ThermocoupleType 332, 336, 358

-UUnderstand Phidgets Using Help 11 12

Phidgets Inc.
Unit 1, 6115 4th Street S.E. Calgary, AB Canada T2H 2H9 Telephone: 1-403-282-7335 Facsimile: 1-403-282-7332 E-mail: support@phidgets.com Web site: www.phidgets.com

You might also like