labview manual english

368
© 2011 Phidgets Inc. Labview Manual

Upload: vila-progreso

Post on 28-Oct-2014

173 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: LabVIEW Manual English

© 2011 Phidgets Inc.

Labview Manual

Page 2: LabVIEW Manual English

All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic, ormechanical, including photocopying, recording, taping, or information storage and retrieval systems - without thewritten permission of the publisher.

Products that are referred to in this document may be either trademarks and/or registered trademarks of therespective 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 noresponsibility for errors or omissions, or for damages resulting from the use of information contained in thisdocument or from the use of programs and source code that may accompany it. In no event shall the publisher andthe author be liable for any loss of profit or any other commercial damage caused or alleged to have been causeddirectly or indirectly by this document.

Printed: April 2011 in Canada

Labview Manual

© 2011 Phidgets Inc.

Page 3: LabVIEW Manual English

© 2011 Phidgets Inc.

Content

Table of ContentsPart 1 Welcome to Phidgets 11

Part 2 Introduction 12

................................................................................................................................... 131 Understanding Phidgets

................................................................................................................................... 142 Platform Support

Part 3 Programming Concept 15

................................................................................................................................... 161 Getting Started

................................................................................................................................... 192 Event Handler

................................................................................................................................... 223 Multiple Devices

Part 4 Phidgets Common 23

................................................................................................................................... 241 ErrorHandler

................................................................................................................................... 252 PhidgetClose

................................................................................................................................... 263 PhidgetDelete

................................................................................................................................... 274 PhidgetEventCloseOnError

................................................................................................................................... 285 PhidgetEventCreateOnError

................................................................................................................................... 296 PhidgetEventExeOnError

................................................................................................................................... 307 PhidgetGetDeviceClass

................................................................................................................................... 318 PhidgetGetDeviceID

................................................................................................................................... 329 PhidgetGetDeviceLabel

................................................................................................................................... 3310 PhidgetGetDeviceName

................................................................................................................................... 3411 PhidgetGetDeviceType

................................................................................................................................... 3512 PhidgetGetDeviceVersion

................................................................................................................................... 3613 PhidgetGetServerStatus

................................................................................................................................... 3714 PhidgetLibraryVersion

................................................................................................................................... 3815 PhidgetOpen

................................................................................................................................... 3916 PhidgetOpenRemote

................................................................................................................................... 4017 PhidgetOpenRemoteIP

................................................................................................................................... 4118 PhidgetServerAddress

................................................................................................................................... 4219 PhidgetServiceID

................................................................................................................................... 4320 PhidgetSetDeviceLabel

................................................................................................................................... 4421 SubVIs

.......................................................................................................................................................... 45_AttachCHK

.......................................................................................................................................................... 46_ChkError

.......................................................................................................................................................... 47_Close

.......................................................................................................................................................... 48_Delete

.......................................................................................................................................................... 49_Open

.......................................................................................................................................................... 50_OpenRemote

Page 4: LabVIEW Manual English

© 2011 Phidgets Inc.

Content

.......................................................................................................................................................... 51_OpenRemoteIP

.......................................................................................................................................................... 52_SerialReturn

.......................................................................................................................................................... 53_WaitAttach

.......................................................................................................................................................... 54EventCloseIntDouble

.......................................................................................................................................................... 55EventCloseIntInt

.......................................................................................................................................................... 56EventExeIntDouble

.......................................................................................................................................................... 57EventExeIntInt

Part 5 Specific Modules 58

................................................................................................................................... 591 Phidget Accelerometer

.......................................................................................................................................................... 60AcceAxisCount

.......................................................................................................................................................... 61AcceCreate

.......................................................................................................................................................... 62AcceEventClose

.......................................................................................................................................................... 63AcceEventCreate

.......................................................................................................................................................... 64AcceEventExe

.......................................................................................................................................................... 65AcceGetData

.......................................................................................................................................................... 66AcceGetMax

.......................................................................................................................................................... 67AcceGetMin

.......................................................................................................................................................... 68AcceGetTrigger

.......................................................................................................................................................... 69AcceOpen

.......................................................................................................................................................... 70AcceSetTrigger

................................................................................................................................... 712 Phidget Advanced Servo

.......................................................................................................................................................... 73AdvServoCount

.......................................................................................................................................................... 74AdvServoCreate

.......................................................................................................................................................... 75AdvServoEventClose

.......................................................................................................................................................... 76AdvServoEventCreateCrtChange

.......................................................................................................................................................... 77AdvServoEventCreatePosChange

.......................................................................................................................................................... 78AdvServoEventCreateVelChange

.......................................................................................................................................................... 79AdvServoEventExe

.......................................................................................................................................................... 80AdvServoGetAcce

.......................................................................................................................................................... 81AdvServoGetAcceMax

.......................................................................................................................................................... 82AdvServoGetAcceMin

.......................................................................................................................................................... 83AdvServoGetCurrent

.......................................................................................................................................................... 84AdvServoGetEngaged

.......................................................................................................................................................... 85AdvServoGetPos

.......................................................................................................................................................... 86AdvServoGetPosMax

.......................................................................................................................................................... 87AdvServoGetPosMin

.......................................................................................................................................................... 88AdvServoGetRampingState

.......................................................................................................................................................... 89AdvServoGetServoType

.......................................................................................................................................................... 90AdvServoGetVel

.......................................................................................................................................................... 91AdvServoGetVellmt

.......................................................................................................................................................... 92AdvServoGetVelmax

.......................................................................................................................................................... 93AdvServoGetVelmin

.......................................................................................................................................................... 94AdvServoOpen

.......................................................................................................................................................... 95AdvServoSetAcce

.......................................................................................................................................................... 96AdvServoSetEngaged

.......................................................................................................................................................... 97AdvServoSetPos

.......................................................................................................................................................... 98AdvServoSetPosMax

.......................................................................................................................................................... 99AdvServoSetPosMin

.......................................................................................................................................................... 100AdvServoSetRampingState

.......................................................................................................................................................... 101AdvServoSetServoParameters

.......................................................................................................................................................... 102AdvServoSetServoType

.......................................................................................................................................................... 103AdvServoSetVellmt

Page 5: LabVIEW Manual English

© 2011 Phidgets Inc.

Content

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

................................................................................................................................... 1053 Phidget Encoder

.......................................................................................................................................................... 106EncoderCreate

.......................................................................................................................................................... 107EncoderEventCloseInput

.......................................................................................................................................................... 108EncoderEventClosePosition

.......................................................................................................................................................... 109EncoderEventCreateInput

.......................................................................................................................................................... 110EncoderEventCreatePosition

.......................................................................................................................................................... 111EncoderEventExeInput

.......................................................................................................................................................... 112EncoderEventExePosition

.......................................................................................................................................................... 113EncoderGetCount

.......................................................................................................................................................... 114EncoderGetEnabledState

.......................................................................................................................................................... 115EncoderGetIndexPosition

.......................................................................................................................................................... 116EncoderGetInputCount

.......................................................................................................................................................... 117EncoderGetInputState

.......................................................................................................................................................... 118EncoderGetPosition

.......................................................................................................................................................... 119EncoderOpen

.......................................................................................................................................................... 120EncoderSetEnabled

.......................................................................................................................................................... 121EncoderSetPosition

................................................................................................................................... 1224 Phidget InterfaceKit

.......................................................................................................................................................... 123IFCreate

.......................................................................................................................................................... 124IFEventClose

.......................................................................................................................................................... 125IFEventCreateInput

.......................................................................................................................................................... 126IFEventCreateOutput

.......................................................................................................................................................... 127IFEventCreateSensor

.......................................................................................................................................................... 128IFEventExe

.......................................................................................................................................................... 129IFGetDataRate

.......................................................................................................................................................... 130IFGetDataRateMax

.......................................................................................................................................................... 131IFGetDataRateMin

.......................................................................................................................................................... 132IFGetInputCount

.......................................................................................................................................................... 133IFGetInputState

.......................................................................................................................................................... 134IFGetOutputCount

.......................................................................................................................................................... 135IFGetOutputState

.......................................................................................................................................................... 136IFGetRatio

.......................................................................................................................................................... 137IFGetSensorCount

.......................................................................................................................................................... 138IFGetSensorValue

.......................................................................................................................................................... 139IFGetSensorValueRaw

.......................................................................................................................................................... 140IFGetTrig

.......................................................................................................................................................... 141IFOpen

.......................................................................................................................................................... 142IFSetDataRate

.......................................................................................................................................................... 143IFSetOutputState

.......................................................................................................................................................... 144IFSetRatio

.......................................................................................................................................................... 145IFSetTrig

................................................................................................................................... 1465 Phidget IR

.......................................................................................................................................................... 147IRCreate

.......................................................................................................................................................... 148IREventCloseOnCode

.......................................................................................................................................................... 149IREventCloseOnLearn

.......................................................................................................................................................... 150IREventCloseOnRawData

.......................................................................................................................................................... 151IREventCreateOnCode

.......................................................................................................................................................... 152IREventCreateOnLearn

.......................................................................................................................................................... 153IREventCreateOnRawData

.......................................................................................................................................................... 154IREventExeOnCode

.......................................................................................................................................................... 155IREventExeOnLearn

.......................................................................................................................................................... 156IREventExeOnRawData

Page 6: LabVIEW Manual English

© 2011 Phidgets Inc.

Content

.......................................................................................................................................................... 157IRGetLastCode

.......................................................................................................................................................... 158IRGetLastLearnedCode

.......................................................................................................................................................... 159IRGetRawData

.......................................................................................................................................................... 160IROpen

.......................................................................................................................................................... 161IRTransmit

.......................................................................................................................................................... 162IRTransmitRaw

.......................................................................................................................................................... 163IRTransmitRepeat

................................................................................................................................... 1646 Phidget LED

.......................................................................................................................................................... 165LEDCount

.......................................................................................................................................................... 166LEDCreate

.......................................................................................................................................................... 167LEDGetBrightness

.......................................................................................................................................................... 168LEDGetCurrentLimit

.......................................................................................................................................................... 169LEDGetVoltage

.......................................................................................................................................................... 170LEDOpen

.......................................................................................................................................................... 171LEDSetBrightness

.......................................................................................................................................................... 172LEDSetCurrentLimit

.......................................................................................................................................................... 173LEDSetVoltage

................................................................................................................................... 1747 Phidget Motor Control

.......................................................................................................................................................... 175MCCreate

.......................................................................................................................................................... 176MCEventCloseInput

.......................................................................................................................................................... 177MCEventCloseVelocityCurrent

.......................................................................................................................................................... 178MCEventCreateCurrent

.......................................................................................................................................................... 179MCEventCreateInput

.......................................................................................................................................................... 180MCEventCreateVelocity

.......................................................................................................................................................... 181MCEventExeInput

.......................................................................................................................................................... 182MCEventExeVelocityCurrent

.......................................................................................................................................................... 183MCGetAcceleration

.......................................................................................................................................................... 184MCGetAccelerationMax

.......................................................................................................................................................... 185MCGetAccelerationMin

.......................................................................................................................................................... 186MCGetCurrent

.......................................................................................................................................................... 187MCGetInputCount

.......................................................................................................................................................... 188MCGetInputState

.......................................................................................................................................................... 189MCGetMotorCount

.......................................................................................................................................................... 190MCGetVelocity

.......................................................................................................................................................... 191MCOpen

.......................................................................................................................................................... 192MCSetAcceleration

.......................................................................................................................................................... 193MCSetVelocity

................................................................................................................................... 1948 Phidget PH Sensor

.......................................................................................................................................................... 195PHCreate

.......................................................................................................................................................... 196PHEventClose

.......................................................................................................................................................... 197PHEventCreate

.......................................................................................................................................................... 198PHEventExe

.......................................................................................................................................................... 199PHGetPH

.......................................................................................................................................................... 200PHGetPHMax

.......................................................................................................................................................... 201PHGetPHMin

.......................................................................................................................................................... 202PHGetPHTrigger

.......................................................................................................................................................... 203PHGetPotential

.......................................................................................................................................................... 204PHGetPotentialMax

.......................................................................................................................................................... 205PHGetPotentialMin

.......................................................................................................................................................... 206PHOpen

.......................................................................................................................................................... 207PHSetTemperature

.......................................................................................................................................................... 208PHSetTrig

................................................................................................................................... 2099 Phidget RFID

Page 7: LabVIEW Manual English

© 2011 Phidgets Inc.

Content

.......................................................................................................................................................... 210RFIDCreate

.......................................................................................................................................................... 211RFIDEventClose

.......................................................................................................................................................... 212RFIDEventCloseOutput

.......................................................................................................................................................... 213RFIDEventCreateOutput

.......................................................................................................................................................... 214RFIDEventCreateTag

.......................................................................................................................................................... 215RFIDEventCreateTagLost

.......................................................................................................................................................... 216RFIDEventExe

.......................................................................................................................................................... 217RFIDEventExeOutput

.......................................................................................................................................................... 218RFIDGetAntennaState

.......................................................................................................................................................... 219RFIDGetLastTag

.......................................................................................................................................................... 220RFIDGetLEDState

.......................................................................................................................................................... 221RFIDGetOutputCount

.......................................................................................................................................................... 222RFIDGetOutputState

.......................................................................................................................................................... 223RFIDGetTagState

.......................................................................................................................................................... 224RFIDOpen

.......................................................................................................................................................... 225RFIDSetAntennaState

.......................................................................................................................................................... 226RFIDSetLEDState

.......................................................................................................................................................... 227RFIDSetOutputState

................................................................................................................................... 22810 Phidget Servo

.......................................................................................................................................................... 229ServoCount

.......................................................................................................................................................... 230ServoCreate

.......................................................................................................................................................... 231ServoEventClose

.......................................................................................................................................................... 232ServoEventCreate

.......................................................................................................................................................... 233ServoEventExe

.......................................................................................................................................................... 234ServoGetEngaged

.......................................................................................................................................................... 235ServoGetPos

.......................................................................................................................................................... 236ServoGetPosMax

.......................................................................................................................................................... 237ServoGetPosMin

.......................................................................................................................................................... 238ServoGetServoType

.......................................................................................................................................................... 239ServoOpen

.......................................................................................................................................................... 240ServoSetEngaged

.......................................................................................................................................................... 241ServoSetPos

.......................................................................................................................................................... 242ServoSetServoParameters

.......................................................................................................................................................... 243ServoSetServoType

................................................................................................................................... 24411 Phidget Spatial

.......................................................................................................................................................... 245SpatialCreate

.......................................................................................................................................................... 246SpatialEventClose

.......................................................................................................................................................... 247SpatialEventCreate

.......................................................................................................................................................... 248SpatialEventExe

.......................................................................................................................................................... 249SpatialGetAcce

.......................................................................................................................................................... 250SpatialGetAcceAxisCount

.......................................................................................................................................................... 251SpatialGetAcceMax

.......................................................................................................................................................... 252SpatialGetAcceMin

.......................................................................................................................................................... 253SpatialGetAngRate

.......................................................................................................................................................... 254SpatialGetAngRateMax

.......................................................................................................................................................... 255SpatialGetAngRateMin

.......................................................................................................................................................... 256SpatialGetCompassAxisCount

.......................................................................................................................................................... 257SpatialGetDataRate

.......................................................................................................................................................... 258SpatialGetDataRateMax

.......................................................................................................................................................... 259SpatialGetDataRateMin

.......................................................................................................................................................... 260SpatialGetGyroAxisCount

.......................................................................................................................................................... 261SpatialGetMagField

.......................................................................................................................................................... 262SpatialGetMagFieldMax

Page 8: LabVIEW Manual English

© 2011 Phidgets Inc.

Content

.......................................................................................................................................................... 263SpatialGetMagFieldMin

.......................................................................................................................................................... 264SpatialOpen

.......................................................................................................................................................... 265SpatialResetCompassCorrectionParameters

.......................................................................................................................................................... 266SpatialSetCompassCorrectionParameters

.......................................................................................................................................................... 267SpatialSetDataRate

.......................................................................................................................................................... 268SpatialZeroGyro

................................................................................................................................... 26912 Phidget Stepper

.......................................................................................................................................................... 271StepperCreate

.......................................................................................................................................................... 272StepperEventCloseCurrentVelocity

.......................................................................................................................................................... 273StepperEventCloseInput

.......................................................................................................................................................... 274StepperEventClosePosition

.......................................................................................................................................................... 275StepperEventClosePosition71

.......................................................................................................................................................... 276StepperEventCreateCurrent

.......................................................................................................................................................... 277StepperEventCreateInput

.......................................................................................................................................................... 278StepperEventCreatePosition

.......................................................................................................................................................... 279StepperEventCreatePosition71

.......................................................................................................................................................... 280StepperEventCreateVelocity

.......................................................................................................................................................... 281StepperEventExeCurrentVelocity

.......................................................................................................................................................... 282StepperEventExeInput

.......................................................................................................................................................... 283StepperEventExePosition

.......................................................................................................................................................... 284StepperEventExePosition71

.......................................................................................................................................................... 285StepperGetAcceleration

.......................................................................................................................................................... 286StepperGetAccelerationMax

.......................................................................................................................................................... 287StepperGetAccelerationMin

.......................................................................................................................................................... 288StepperGetCurrent

.......................................................................................................................................................... 289StepperGetCurrentLimit

.......................................................................................................................................................... 290StepperGetCurrentMax

.......................................................................................................................................................... 291StepperGetCurrentMin

.......................................................................................................................................................... 292StepperGetCurrentPosition

.......................................................................................................................................................... 293StepperGetCurrentPosition71

.......................................................................................................................................................... 294StepperGetEngaged

.......................................................................................................................................................... 295StepperGetPositionMax

.......................................................................................................................................................... 296StepperGetPositionMax71

.......................................................................................................................................................... 297StepperGetPositionMin

.......................................................................................................................................................... 298StepperGetPositionMin71

.......................................................................................................................................................... 299StepperGetTargetPosition

.......................................................................................................................................................... 300StepperGetTargetPosition71

.......................................................................................................................................................... 301StepperGetVelocity

.......................................................................................................................................................... 302StepperGetVelocityLimit

.......................................................................................................................................................... 303StepperGetVelocityMax

.......................................................................................................................................................... 304StepperGetVelocityMin

.......................................................................................................................................................... 305StepperInputCount

.......................................................................................................................................................... 306StepperInputState

.......................................................................................................................................................... 307StepperMotorCount

.......................................................................................................................................................... 308StepperOpen

.......................................................................................................................................................... 309StepperSetAcceleration

.......................................................................................................................................................... 310StepperSetCurrentLimit

.......................................................................................................................................................... 311StepperSetCurrentPosition

.......................................................................................................................................................... 312StepperSetCurrentPosition71

.......................................................................................................................................................... 313StepperSetEngaged

.......................................................................................................................................................... 314StepperSetTargetPosition

.......................................................................................................................................................... 315StepperSetTargetPosition71

.......................................................................................................................................................... 316StepperSetVelocityLimit

.......................................................................................................................................................... 317StepperStoppedState

Page 9: LabVIEW Manual English

© 2011 Phidgets Inc.

Content

................................................................................................................................... 31813 Phidget Temperature Sensor

.......................................................................................................................................................... 319TempCreate

.......................................................................................................................................................... 320TempEventClose

.......................................................................................................................................................... 321TempEventCreate

.......................................................................................................................................................... 322TempEventExe

.......................................................................................................................................................... 323TempGetAmbient

.......................................................................................................................................................... 324TempGetAmbientMax

.......................................................................................................................................................... 325TempGetAmbientMin

.......................................................................................................................................................... 326TempGetPotential

.......................................................................................................................................................... 327TempGetPotentialMax

.......................................................................................................................................................... 328TempGetPotentialMin

.......................................................................................................................................................... 329TempGetTemperature

.......................................................................................................................................................... 330TempGetTemperatureMax

.......................................................................................................................................................... 331TempGetTemperatureMin

.......................................................................................................................................................... 332TempGetThermocoupleType

.......................................................................................................................................................... 333TempGetTrigger

.......................................................................................................................................................... 334TempInputCount

.......................................................................................................................................................... 335TempOpen

.......................................................................................................................................................... 336TempSetThermocoupleType

.......................................................................................................................................................... 337TempSetTrigger

................................................................................................................................... 33814 Phidget TextLCD

.......................................................................................................................................................... 339TextCreate

.......................................................................................................................................................... 340TextGetBacklightState

.......................................................................................................................................................... 341TextGetBrightness

.......................................................................................................................................................... 342TextGetColumnCount

.......................................................................................................................................................... 343TextGetContrast

.......................................................................................................................................................... 344TextGetCursorBlinkState

.......................................................................................................................................................... 345TextGetCursorState

.......................................................................................................................................................... 346TextGetRowCount

.......................................................................................................................................................... 347TextOpen

.......................................................................................................................................................... 348TextSetBacklightState

.......................................................................................................................................................... 349TextSetBrightness

.......................................................................................................................................................... 350TextSetCharacter

.......................................................................................................................................................... 351TextSetContrast

.......................................................................................................................................................... 352TextSetCursorBlinkState

.......................................................................................................................................................... 353TextSetCursorState

.......................................................................................................................................................... 354TextSetDisplayChar

.......................................................................................................................................................... 355TextSetDisplayString

................................................................................................................................... 35615 Phidget TextLED

................................................................................................................................... 35716 Phidget Weight Sensor

Part 6 Phidgets Constants 358

................................................................................................................................... 3591 ServoType

................................................................................................................................... 3602 ThermocoupleType

................................................................................................................................... 3613 CodeInfo

................................................................................................................................... 3624 IREncoding

................................................................................................................................... 3635 IRLength

Page 10: LabVIEW Manual English

© 2011 Phidgets Inc.

Content

Index 364

Page 11: LabVIEW Manual English

Welcome to Phidgets 11

© 2011 Phidgets Inc.

1 Welcome to Phidgets

LabVIEW Help

November 2010, Version 0.1-021110

This help system includes information about LabVIEW programming for each Phidget device. It containsprogramming concepts, step-by-step instructions, and reference information about VIs, functions andpalettes.

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. Usingthe Universal Serial Bus (USB) as the basis for all Phidgets, the complexity is managed behind thiseasy to use and robust Application Program Interface (API) library.

This help system may link to Portable Document Format (PDF) versions of documents. You must haveAdobe 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.2or later to view the Help. (Linux) Phidgets recommends that you use Mozilla 1.2 or later orFirefox 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

Page 12: LabVIEW Manual English

Introduction12

© 2011 Phidgets Inc.

2 Introduction

Phidgets are an easy to use set of building blocks for low cost sensing and control from your PC. Usingthe Universal Serial Bus (USB) as the basis for all Phidgets, the complexity is managed behind thiseasy to use and robust Application Program Interface (API) library.

This manual documents the Phidgets software programming model in National Instruments Labviewlanguage. The Programming Concept should be the first section to be read for someone beginning touse Phidgets. After the concepts described are understood, users can read Phidgets Common andSpecific Modules for function reference and device documentation in general. Note that these sectionsare light on function documentation - generally only containing specific reference information and basicfunction information.

For a more detailed introduction, please refer to Understanding Phidgets and Platform Support.

Page 13: LabVIEW Manual English

Introduction 13

© 2011 Phidgets Inc.

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. Phidgetscan 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 andcomputer, even if there are one or more Hubs in between. There are cable extenders available on themarket, but these can be unreliable and are not endorsed by Phidgets Inc. Users should never try to runUSB 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 USB2.0 hosts.

Software Model

The Phidgets Labview library is written under the C library - phidget21, which implements the low-levelprotocols necessary to communicate with the Phidgets, and exports a unified interface to the softwareprogrammer. This also makes the Phidgets Labview library cross-platform.

The Phidget Labview library contains only glue logic for interfacing with the C library, thus makingmaintenance much easier. It should be noted the library employs threading and events extensively. (SeeProgramming Concept for more information.)

Page 14: LabVIEW Manual English

Introduction14

© 2011 Phidgets Inc.

2.2 Platform Support

Operating System Support

WindowsMicrosoft Windows 2000 and later are supported, including 64-bit editions. The Windows libraries areinstalled 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 ControlPanel.

The Phidget Control Panel is represented by a “Ph” icon that runs in the system tray (usually on theright end of the Windows task bar). This program can be used to list and control any Phidgets attachedto the system, and to control the Web Service.

Mac OS XMac OS X 10.3.9 and newer on Intel and PPC are supported. The Mac libraries are distributed in a .dmgand 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 programcan be used to list and control any Phidgets attached to the system, and to control the Web Service.

LinuxLinux version 2.4 is supported, including 64-bit editions, but 2.6.7 or newer is recommended. The Linuxlibraries 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 Makefilemakes it easy to build and install the libraries on most Linux distribution.

OtherOther 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-bitLabview version 2009 or higher.

Note: If you use Labview 64-bit, you need to install the Phidgets Labview 64-bit library.

Page 15: LabVIEW Manual English

Programming Concept 15

© 2011 Phidgets Inc.

3 Programming Concept

This manual is designed such that both novice and expert users can quickly reference the variousPhidget 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. Usethe Getting Started manual as a tutorial to familiarize yourself with Phidget LabVIEW functions andbasic 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 Handlermanual 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 MultipleDevices 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.

Page 16: LabVIEW Manual English

Programming Concept16

© 2011 Phidgets Inc.

3.1 Getting Started

Phidgets are an easy to use set of building blocks for low cost sensing and control from your PC. Usingthe Universal Serial Bus (USB) as the basis for all Phidgets, the complexity is managed behind thiseasy 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 simplestlevel, 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 differentexamples accordingly.

Page 17: LabVIEW Manual English

Programming Concept 17

© 2011 Phidgets Inc.

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 orsetting up parameters of a Phidget.

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

Page 18: LabVIEW Manual English

Programming Concept18

© 2011 Phidgets Inc.

If users want to open Phidgets over the network, a PhidgetOpenRemote and AcceCreate functions willbe 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 aPhidget handle and an error handler.

Page 19: LabVIEW Manual English

Programming Concept 19

© 2011 Phidgets Inc.

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 differentexamples accordingly.

Page 20: LabVIEW Manual English

Programming Concept20

© 2011 Phidgets Inc.

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.

Page 21: LabVIEW Manual English

Programming Concept 21

© 2011 Phidgets Inc.

<Step3> Close the related event.

Note: When execute an event, please make sure "create", "execute" and "close" the sameevent. 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. (Formore 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 detectasynchronous errors from Phidgets.

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

Page 22: LabVIEW Manual English

Programming Concept22

© 2011 Phidgets Inc.

3.3 Multiple Devices

Phidgets Labview can control multiple phidgets. As long as the handlers are different, different phidgetscan 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 exampleshows how to combined use different phidgets.

Page 23: LabVIEW Manual English

Phidgets Common 23

© 2011 Phidgets Inc.

4 Phidgets Common

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

ErrorHandler

PhidgetClose

PhidgetDelete

PhidgetEventCloseOnError

PhidgetEventCreateOnError

PhidgetEventExeOnError

PhidgetGetDeviceClass

PhidgetGetDeviceID

PhidgetGetDeviceLabel

PhidgetGetDeviceName

PhidgetGetDeviceType

PhidgetGetDeviceVersion

PhidgetGetServerStatus

PhidgetLibraryVersion

PhidgetOpen

PhidgetOpenRemote

PhidgetOpenRemoteIP

PhidgetServerAddress

PhidgetServiceID

PhidgetSetDeviceLabel

SubVIs (Folder)

Page 24: LabVIEW Manual English

Phidgets Common24

© 2011 Phidgets Inc.

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.

Page 25: LabVIEW Manual English

Phidgets Common 25

© 2011 Phidgets Inc.

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.

Page 26: LabVIEW Manual English

Phidgets Common26

© 2011 Phidgets Inc.

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.

Page 27: LabVIEW Manual English

Phidgets Common 27

© 2011 Phidgets Inc.

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.

Page 28: LabVIEW Manual English

Phidgets Common28

© 2011 Phidgets Inc.

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.

Page 29: LabVIEW Manual English

Phidgets Common 29

© 2011 Phidgets Inc.

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.

Page 30: LabVIEW Manual English

Phidgets Common30

© 2011 Phidgets Inc.

4.7 PhidgetGetDeviceClass

Description:

Get the class of a Phidget.

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

Describes error conditions that occur before this node runs.

Output

Same as the Device In.

Returns the device class constant.

Contains error information.

Page 31: LabVIEW Manual English

Phidgets Common 31

© 2011 Phidgets Inc.

4.8 PhidgetGetDeviceID

Description:

Get the device ID of a Phidget.

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

Describes error conditions that occur before this node runs.

Output

Same as the Device In.

Returns the device ID constant.

Contains error information.

Page 32: LabVIEW Manual English

Phidgets Common32

© 2011 Phidgets Inc.

4.9 PhidgetGetDeviceLabel

Description:

Get the label of a Phidget.

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

Describes error conditions that occur before this node runs.

Output

Same as the Device In.

Returns the device label.

Contains error information.

Page 33: LabVIEW Manual English

Phidgets Common 33

© 2011 Phidgets Inc.

4.10 PhidgetGetDeviceName

Description:

Get the specific name of a Phidget.

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

Describes error conditions that occur before this node runs.

Output

Same as the Device In.

Returns the device name.

Contains error information.

Page 34: LabVIEW Manual English

Phidgets Common34

© 2011 Phidgets Inc.

4.11 PhidgetGetDeviceType

Description:

Get the type (class) of a Phidget.

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

Describes error conditions that occur before this node runs.

Output

Same as the Device In.

Returns the device type.

Contains error information.

Page 35: LabVIEW Manual English

Phidgets Common 35

© 2011 Phidgets Inc.

4.12 PhidgetGetDeviceVersion

Description:

Get the firmware version of a Phidget.

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

Describes error conditions that occur before this node runs.

Output

Same as the Device In.

Returns the device version.

Contains error information.

Page 36: LabVIEW Manual English

Phidgets Common36

© 2011 Phidgets Inc.

4.13 PhidgetGetServerStatus

Description:

Get the connected to server status of a remotely opened Phidget. This will fail if the Phidget was openedlocally.

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

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 andothers for undefined.

The server status.

Contains error information.

Page 37: LabVIEW Manual English

Phidgets Common 37

© 2011 Phidgets Inc.

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.

Page 38: LabVIEW Manual English

Phidgets Common38

© 2011 Phidgets Inc.

4.15 PhidgetOpen

Description:

Open a Phidget locally.

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

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.

Page 39: LabVIEW Manual English

Phidgets Common 39

© 2011 Phidgets Inc.

4.16 PhidgetOpenRemote

Description:

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

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

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.

Page 40: LabVIEW Manual English

Phidgets Common40

© 2011 Phidgets Inc.

4.17 PhidgetOpenRemoteIP

Description:

Open a Phidget remotely by address and port.

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

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.

Page 41: LabVIEW Manual English

Phidgets Common 41

© 2011 Phidgets Inc.

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:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

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.

Page 42: LabVIEW Manual English

Phidgets Common42

© 2011 Phidgets Inc.

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:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

Describes error conditions that occur before this node runs.

Output

Same as the Device In.

Returns the server ID.

Contains error information.

Page 43: LabVIEW Manual English

Phidgets Common 43

© 2011 Phidgets Inc.

4.20 PhidgetSetDeviceLabel

Description:

Set the label of a Phidget. Note that this is not supported on very old Phidgets, and not yet supported inWindows.

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

The label to be set.

Describes error conditions that occur before this node runs.

Output

Same as the Device In.

Contains error information.

Page 44: LabVIEW Manual English

Phidgets Common44

© 2011 Phidgets Inc.

4.21 SubVIs

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

_AttachCHK

_ChkError

_Close

_Delete

_Open

_OpenRemote

_OpenRemoteIP

_SerialReturn

_WaitAttach

EventCloseIntDouble

EventCloseIntInt

EventExeIntDouble

EventExeIntInt

Page 45: LabVIEW Manual English

Phidgets Common 45

© 2011 Phidgets Inc.

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.

Page 46: LabVIEW Manual English

Phidgets Common46

© 2011 Phidgets Inc.

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.

Page 47: LabVIEW Manual English

Phidgets Common 47

© 2011 Phidgets Inc.

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.

Page 48: LabVIEW Manual English

Phidgets Common48

© 2011 Phidgets Inc.

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.

Page 49: LabVIEW Manual English

Phidgets Common 49

© 2011 Phidgets Inc.

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.

Page 50: LabVIEW Manual English

Phidgets Common50

© 2011 Phidgets Inc.

4.21.6 _OpenRemote

Description:

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

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

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.

Page 51: LabVIEW Manual English

Phidgets Common 51

© 2011 Phidgets Inc.

4.21.7 _OpenRemoteIP

Description:

Open a Phidget remotely by address and port.

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

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.

Page 52: LabVIEW Manual English

Phidgets Common52

© 2011 Phidgets Inc.

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.

Page 53: LabVIEW Manual English

Phidgets Common 53

© 2011 Phidgets Inc.

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.

Page 54: LabVIEW Manual English

Phidgets Common54

© 2011 Phidgets Inc.

4.21.10 EventCloseIntDouble

Description:

Close the event handler which contains an integer and a double event variables. This should not bedirectly 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.

Page 55: LabVIEW Manual English

Phidgets Common 55

© 2011 Phidgets Inc.

4.21.11 EventCloseIntInt

Description:

Close the event handler which contains an integer and an integer event variables. This should not bedirectly 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.

Page 56: LabVIEW Manual English

Phidgets Common56

© 2011 Phidgets Inc.

4.21.12 EventExeIntDouble

Description:

Call the event handler which contains an integer and a double event variables. This should not be directlyaccessed 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.

Page 57: LabVIEW Manual English

Phidgets Common 57

© 2011 Phidgets Inc.

4.21.13 EventExeIntInt

Description:

Call the event handler which contains an integer and an integer event variables. This should not bedirectly 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.

Page 58: LabVIEW Manual English

Specific Modules58

© 2011 Phidgets Inc.

5 Specific Modules

This section describes each of the VI function used by different Phidgets. All the VI functions are locatedin its dll folder correspondingly.

Note: Refer to the Product manual for your Phidget and the C Programming Manual for moredetailed, 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)

Page 59: LabVIEW Manual English

Specific Modules 59

© 2011 Phidgets Inc.

5.1 Phidget Accelerometer

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

AcceAxisCount

AcceCreate

AcceEventClose

AcceEventCreate

AcceEventExe

AcceGetData

AcceGetMax

AcceGetMin

AcceGetTrigger

AcceOpen

AcceSetTrigger

Page 60: LabVIEW Manual English

Specific Modules60

© 2011 Phidgets Inc.

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.

Page 61: LabVIEW Manual English

Specific Modules 61

© 2011 Phidgets Inc.

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.

Page 62: LabVIEW Manual English

Specific Modules62

© 2011 Phidgets Inc.

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.

Page 63: LabVIEW Manual English

Specific Modules 63

© 2011 Phidgets Inc.

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.

Page 64: LabVIEW Manual English

Specific Modules64

© 2011 Phidgets Inc.

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.

Page 65: LabVIEW Manual English

Specific Modules 65

© 2011 Phidgets Inc.

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.

Page 66: LabVIEW Manual English

Specific Modules66

© 2011 Phidgets Inc.

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.

Page 67: LabVIEW Manual English

Specific Modules 67

© 2011 Phidgets Inc.

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.

Page 68: LabVIEW Manual English

Specific Modules68

© 2011 Phidgets Inc.

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.

Page 69: LabVIEW Manual English

Specific Modules 69

© 2011 Phidgets Inc.

5.1.10 AcceOpen

Description:

Open a Phidget Accelerometer.

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

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.

Page 70: LabVIEW Manual English

Specific Modules70

© 2011 Phidgets Inc.

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.

Page 71: LabVIEW Manual English

Specific Modules 71

© 2011 Phidgets Inc.

5.2 Phidget Advanced Servo

This contains VI functions for Phidget Advanced Servo. See the product manual for more specific APIdetails, 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

Page 72: LabVIEW Manual English

Specific Modules72

© 2011 Phidgets Inc.

AdvServoSetPos

AdvServoSetPosMax

AdvServoSetPosMin

AdvServoSetRampingState

AdvServoSetServoParameters

AdvServoSetServoType

AdvServoSetVellmt

AdvServoStoppedState

Page 73: LabVIEW Manual English

Specific Modules 73

© 2011 Phidgets Inc.

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.

Page 74: LabVIEW Manual English

Specific Modules74

© 2011 Phidgets Inc.

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.

Page 75: LabVIEW Manual English

Specific Modules 75

© 2011 Phidgets Inc.

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.

Page 76: LabVIEW Manual English

Specific Modules76

© 2011 Phidgets Inc.

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.

Page 77: LabVIEW Manual English

Specific Modules 77

© 2011 Phidgets Inc.

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.

Page 78: LabVIEW Manual English

Specific Modules78

© 2011 Phidgets Inc.

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.

Page 79: LabVIEW Manual English

Specific Modules 79

© 2011 Phidgets Inc.

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, thisvalue is position.)

Returns the event status. (Executed is T; Not executed is F)

Contains error information.

Page 80: LabVIEW Manual English

Specific Modules80

© 2011 Phidgets Inc.

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.

Page 81: LabVIEW Manual English

Specific Modules 81

© 2011 Phidgets Inc.

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.

Page 82: LabVIEW Manual English

Specific Modules82

© 2011 Phidgets Inc.

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.

Page 83: LabVIEW Manual English

Specific Modules 83

© 2011 Phidgets Inc.

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.

Page 84: LabVIEW Manual English

Specific Modules84

© 2011 Phidgets Inc.

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.

Page 85: LabVIEW Manual English

Specific Modules 85

© 2011 Phidgets Inc.

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.

Page 86: LabVIEW Manual English

Specific Modules86

© 2011 Phidgets Inc.

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.

Page 87: LabVIEW Manual English

Specific Modules 87

© 2011 Phidgets Inc.

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.

Page 88: LabVIEW Manual English

Specific Modules88

© 2011 Phidgets Inc.

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 forundefined.

The speed ramping state (Boolean type).

Contains error information.

Page 89: LabVIEW Manual English

Specific Modules 89

© 2011 Phidgets Inc.

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.

Page 90: LabVIEW Manual English

Specific Modules90

© 2011 Phidgets Inc.

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.

Page 91: LabVIEW Manual English

Specific Modules 91

© 2011 Phidgets Inc.

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.

Page 92: LabVIEW Manual English

Specific Modules92

© 2011 Phidgets Inc.

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.

Page 93: LabVIEW Manual English

Specific Modules 93

© 2011 Phidgets Inc.

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.

Page 94: LabVIEW Manual English

Specific Modules94

© 2011 Phidgets Inc.

5.2.22 AdvServoOpen

Description:

Open a PhidgetAdvancedServo.

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

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.

Page 95: LabVIEW Manual English

Specific Modules 95

© 2011 Phidgets Inc.

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.

Page 96: LabVIEW Manual English

Specific Modules96

© 2011 Phidgets Inc.

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.

Page 97: LabVIEW Manual English

Specific Modules 97

© 2011 Phidgets Inc.

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.

Page 98: LabVIEW Manual English

Specific Modules98

© 2011 Phidgets Inc.

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.

Page 99: LabVIEW Manual English

Specific Modules 99

© 2011 Phidgets Inc.

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.

Page 100: LabVIEW Manual English

Specific Modules100

© 2011 Phidgets Inc.

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.

Page 101: LabVIEW Manual English

Specific Modules 101

© 2011 Phidgets Inc.

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.

Page 102: LabVIEW Manual English

Specific Modules102

© 2011 Phidgets Inc.

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.

Page 103: LabVIEW Manual English

Specific Modules 103

© 2011 Phidgets Inc.

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.

Page 104: LabVIEW Manual English

Specific Modules104

© 2011 Phidgets Inc.

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 outstandingcommands.

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 NotStopped.

Contains error information.

Page 105: LabVIEW Manual English

Specific Modules 105

© 2011 Phidgets Inc.

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

Page 106: LabVIEW Manual English

Specific Modules106

© 2011 Phidgets Inc.

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.

Page 107: LabVIEW Manual English

Specific Modules 107

© 2011 Phidgets Inc.

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.

Page 108: LabVIEW Manual English

Specific Modules108

© 2011 Phidgets Inc.

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.

Page 109: LabVIEW Manual English

Specific Modules 109

© 2011 Phidgets Inc.

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.

Page 110: LabVIEW Manual English

Specific Modules110

© 2011 Phidgets Inc.

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.

Page 111: LabVIEW Manual English

Specific Modules 111

© 2011 Phidgets Inc.

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 andothers for undefined.

Contains error information.

Page 112: LabVIEW Manual English

Specific Modules112

© 2011 Phidgets Inc.

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 absoluteposition.)

Contains error information.

Page 113: LabVIEW Manual English

Specific Modules 113

© 2011 Phidgets Inc.

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.

Page 114: LabVIEW Manual English

Specific Modules114

© 2011 Phidgets Inc.

5.3.9 EncoderGetEnabledState

Description:

Get the enabled state of an encoder. This is whether the encoder is powered or not. Please note that1057 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 forundefined.The enabled state (Boolean type). Possible values are True for Enabled and Falsefor Not Enabled (Disabled).

Contains error information.

Page 115: LabVIEW Manual English

Specific Modules 115

© 2011 Phidgets Inc.

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 theencoder 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.

Page 116: LabVIEW Manual English

Specific Modules116

© 2011 Phidgets Inc.

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.

Page 117: LabVIEW Manual English

Specific Modules 117

© 2011 Phidgets Inc.

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 forNot Engaged.

Contains error information.

Page 118: LabVIEW Manual English

Specific Modules118

© 2011 Phidgets Inc.

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.

Page 119: LabVIEW Manual English

Specific Modules 119

© 2011 Phidgets Inc.

5.3.14 EncoderOpen

Description:

Open a PhidgetEncoder.

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

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.

Page 120: LabVIEW Manual English

Specific Modules120

© 2011 Phidgets Inc.

5.3.15 EncoderSetEnabled

Description:

Set the enabled state of an encoder. This is whether the encoder is powered or not. Please note that1057 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.

Page 121: LabVIEW Manual English

Specific Modules 121

© 2011 Phidgets Inc.

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.

Page 122: LabVIEW Manual English

Specific Modules122

© 2011 Phidgets Inc.

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

Page 123: LabVIEW Manual English

Specific Modules 123

© 2011 Phidgets Inc.

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.

Page 124: LabVIEW Manual English

Specific Modules124

© 2011 Phidgets Inc.

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.

Page 125: LabVIEW Manual English

Specific Modules 125

© 2011 Phidgets Inc.

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.

Page 126: LabVIEW Manual English

Specific Modules126

© 2011 Phidgets Inc.

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.

Page 127: LabVIEW Manual English

Specific Modules 127

© 2011 Phidgets Inc.

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.

Page 128: LabVIEW Manual English

Specific Modules128

© 2011 Phidgets Inc.

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 valueis sensor reading.)

Returns the event status. (Executed is T; Not executed is F)

Contains error information.

Page 129: LabVIEW Manual English

Specific Modules 129

© 2011 Phidgets Inc.

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.

Page 130: LabVIEW Manual English

Specific Modules130

© 2011 Phidgets Inc.

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.

Page 131: LabVIEW Manual English

Specific Modules 131

© 2011 Phidgets Inc.

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.

Page 132: LabVIEW Manual English

Specific Modules132

© 2011 Phidgets Inc.

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.

Page 133: LabVIEW Manual English

Specific Modules 133

© 2011 Phidgets Inc.

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.

Page 134: LabVIEW Manual English

Specific Modules134

© 2011 Phidgets Inc.

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.

Page 135: LabVIEW Manual English

Specific Modules 135

© 2011 Phidgets Inc.

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.

Page 136: LabVIEW Manual English

Specific Modules136

© 2011 Phidgets Inc.

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 forundefined.

The ratio metric state (Boolean type).

Contains error information.

Page 137: LabVIEW Manual English

Specific Modules 137

© 2011 Phidgets Inc.

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.

Page 138: LabVIEW Manual English

Specific Modules138

© 2011 Phidgets Inc.

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.

Page 139: LabVIEW Manual English

Specific Modules 139

© 2011 Phidgets Inc.

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.

Page 140: LabVIEW Manual English

Specific Modules140

© 2011 Phidgets Inc.

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.

Page 141: LabVIEW Manual English

Specific Modules 141

© 2011 Phidgets Inc.

5.4.19 IFOpen

Description:

Open a PhidgetInterfaceKit.

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

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.

Page 142: LabVIEW Manual English

Specific Modules142

© 2011 Phidgets Inc.

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.

Page 143: LabVIEW Manual English

Specific Modules 143

© 2011 Phidgets Inc.

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.

Page 144: LabVIEW Manual English

Specific Modules144

© 2011 Phidgets Inc.

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.

Page 145: LabVIEW Manual English

Specific Modules 145

© 2011 Phidgets Inc.

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.

Page 146: LabVIEW Manual English

Specific Modules146

© 2011 Phidgets Inc.

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

Page 147: LabVIEW Manual English

Specific Modules 147

© 2011 Phidgets Inc.

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.

Page 148: LabVIEW Manual English

Specific Modules148

© 2011 Phidgets Inc.

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.

Page 149: LabVIEW Manual English

Specific Modules 149

© 2011 Phidgets Inc.

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.

Page 150: LabVIEW Manual English

Specific Modules150

© 2011 Phidgets Inc.

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.

Page 151: LabVIEW Manual English

Specific Modules 151

© 2011 Phidgets Inc.

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.

Page 152: LabVIEW Manual English

Specific Modules152

© 2011 Phidgets Inc.

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.

Page 153: LabVIEW Manual English

Specific Modules 153

© 2011 Phidgets Inc.

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.

Page 154: LabVIEW Manual English

Specific Modules154

© 2011 Phidgets Inc.

5.5.8 IREventExeOnCode

Description:

This is called when a code has been received that could be automatically decoded. Data is return as anarray with MSB in index 0. Bit count and a repeat flag are also returned. Repeats are detected as eitherthe 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.

Page 155: LabVIEW Manual English

Specific Modules 155

© 2011 Phidgets Inc.

5.5.9 IREventExeOnLearn

Description:

This is called when a code has been received for long enough to be learned. The returned CodeInfostructure 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.

Page 156: LabVIEW Manual English

Specific Modules156

© 2011 Phidgets Inc.

5.5.10 IREventExeOnRawData

Description:

This is called when raw data has been read from the device. Raw data always starts with a space andends 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.

Page 157: LabVIEW Manual English

Specific Modules 157

© 2011 Phidgets Inc.

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 dataactually 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.

Page 158: LabVIEW Manual English

Specific Modules158

© 2011 Phidgets Inc.

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 dataactually 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.

Page 159: LabVIEW Manual English

Specific Modules 159

© 2011 Phidgets Inc.

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.

Page 160: LabVIEW Manual English

Specific Modules160

© 2011 Phidgets Inc.

5.5.14 IROpen

Description:

Open a PhidgetIR.

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

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.

Page 161: LabVIEW Manual English

Specific Modules 161

© 2011 Phidgets Inc.

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. LSBitis right justified, so MSBit may be in bit positions 0-7 in array index 0 depending onthe bit count.The CodeInfo structure specifying to to send the code. Anything left as null to selectdefault 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.

Page 162: LabVIEW Manual English

Specific Modules162

© 2011 Phidgets Inc.

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 apositive time in us.

The length of the data array. Maximum length is 1024, but streams should be kept muchshorter, 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.

Page 163: LabVIEW Manual English

Specific Modules 163

© 2011 Phidgets Inc.

5.5.17 IRTransmitRepeat

Description:

Transmits a repeat of the last transmitted code. Depending of the CodeInfo structure, this may be aretransmission 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.

Page 164: LabVIEW Manual English

Specific Modules164

© 2011 Phidgets Inc.

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

Page 165: LabVIEW Manual English

Specific Modules 165

© 2011 Phidgets Inc.

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.

Page 166: LabVIEW Manual English

Specific Modules166

© 2011 Phidgets Inc.

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.

Page 167: LabVIEW Manual English

Specific Modules 167

© 2011 Phidgets Inc.

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.

Page 168: LabVIEW Manual English

Specific Modules168

© 2011 Phidgets Inc.

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.

Page 169: LabVIEW Manual English

Specific Modules 169

© 2011 Phidgets Inc.

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.

Page 170: LabVIEW Manual English

Specific Modules170

© 2011 Phidgets Inc.

5.6.6 LEDOpen

Description:

Open a Phidget LED.

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

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.

Page 171: LabVIEW Manual English

Specific Modules 171

© 2011 Phidgets Inc.

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.

Page 172: LabVIEW Manual English

Specific Modules172

© 2011 Phidgets Inc.

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.

Page 173: LabVIEW Manual English

Specific Modules 173

© 2011 Phidgets Inc.

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.

Page 174: LabVIEW Manual English

Specific Modules174

© 2011 Phidgets Inc.

5.7 Phidget Motor Control

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

MCCreate

MCEventCloseInput

MCEventCloseVelocityCurrent

MCEventCreateCurrent

MCEventCreateInput

MCEventCreateVelocity

MCEventExeInput

MCEventExeVelocityCurrent

MCGetAcceleration

MCGetAccelerationMax

MCGetAccelerationMin

MCGetCurrent

MCGetInputCount

MCGetInputState

MCGetMotorCount

MCGetVelocity

MCOpen

MCSetAcceleration

MCSetVelocity

Page 175: LabVIEW Manual English

Specific Modules 175

© 2011 Phidgets Inc.

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.

Page 176: LabVIEW Manual English

Specific Modules176

© 2011 Phidgets Inc.

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.

Page 177: LabVIEW Manual English

Specific Modules 177

© 2011 Phidgets Inc.

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.

Page 178: LabVIEW Manual English

Specific Modules178

© 2011 Phidgets Inc.

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.

Page 179: LabVIEW Manual English

Specific Modules 179

© 2011 Phidgets Inc.

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.

Page 180: LabVIEW Manual English

Specific Modules180

© 2011 Phidgets Inc.

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.

Page 181: LabVIEW Manual English

Specific Modules 181

© 2011 Phidgets Inc.

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.

Page 182: LabVIEW Manual English

Specific Modules182

© 2011 Phidgets Inc.

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 valueis velocity reading.)

Returns the event status. (Executed is T; Not executed is F)

Contains error information.

Page 183: LabVIEW Manual English

Specific Modules 183

© 2011 Phidgets Inc.

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.

Page 184: LabVIEW Manual English

Specific Modules184

© 2011 Phidgets Inc.

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.

Page 185: LabVIEW Manual English

Specific Modules 185

© 2011 Phidgets Inc.

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.

Page 186: LabVIEW Manual English

Specific Modules186

© 2011 Phidgets Inc.

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.

Page 187: LabVIEW Manual English

Specific Modules 187

© 2011 Phidgets Inc.

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.

Page 188: LabVIEW Manual English

Specific Modules188

© 2011 Phidgets Inc.

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.

Page 189: LabVIEW Manual English

Specific Modules 189

© 2011 Phidgets Inc.

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.

Page 190: LabVIEW Manual English

Specific Modules190

© 2011 Phidgets Inc.

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.

Page 191: LabVIEW Manual English

Specific Modules 191

© 2011 Phidgets Inc.

5.7.17 MCOpen

Description:

Open a Phidget Motor Control.

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

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.

Page 192: LabVIEW Manual English

Specific Modules192

© 2011 Phidgets Inc.

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.

Page 193: LabVIEW Manual English

Specific Modules 193

© 2011 Phidgets Inc.

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.

Page 194: LabVIEW Manual English

Specific Modules194

© 2011 Phidgets Inc.

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

Page 195: LabVIEW Manual English

Specific Modules 195

© 2011 Phidgets Inc.

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.

Page 196: LabVIEW Manual English

Specific Modules196

© 2011 Phidgets Inc.

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.

Page 197: LabVIEW Manual English

Specific Modules 197

© 2011 Phidgets Inc.

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.

Page 198: LabVIEW Manual English

Specific Modules198

© 2011 Phidgets Inc.

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.

Page 199: LabVIEW Manual English

Specific Modules 199

© 2011 Phidgets Inc.

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.

Page 200: LabVIEW Manual English

Specific Modules200

© 2011 Phidgets Inc.

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.

Page 201: LabVIEW Manual English

Specific Modules 201

© 2011 Phidgets Inc.

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.

Page 202: LabVIEW Manual English

Specific Modules202

© 2011 Phidgets Inc.

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.

Page 203: LabVIEW Manual English

Specific Modules 203

© 2011 Phidgets Inc.

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.

Page 204: LabVIEW Manual English

Specific Modules204

© 2011 Phidgets Inc.

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.

Page 205: LabVIEW Manual English

Specific Modules 205

© 2011 Phidgets Inc.

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.

Page 206: LabVIEW Manual English

Specific Modules206

© 2011 Phidgets Inc.

5.8.12 PHOpen

Description:

Open a Phidget PH Sensor.

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

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.

Page 207: LabVIEW Manual English

Specific Modules 207

© 2011 Phidgets Inc.

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.

Page 208: LabVIEW Manual English

Specific Modules208

© 2011 Phidgets Inc.

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.

Page 209: LabVIEW Manual English

Specific Modules 209

© 2011 Phidgets Inc.

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

Page 210: LabVIEW Manual English

Specific Modules210

© 2011 Phidgets Inc.

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.

Page 211: LabVIEW Manual English

Specific Modules 211

© 2011 Phidgets Inc.

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.

Page 212: LabVIEW Manual English

Specific Modules212

© 2011 Phidgets Inc.

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.

Page 213: LabVIEW Manual English

Specific Modules 213

© 2011 Phidgets Inc.

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.

Page 214: LabVIEW Manual English

Specific Modules214

© 2011 Phidgets Inc.

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.

Page 215: LabVIEW Manual English

Specific Modules 215

© 2011 Phidgets Inc.

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.

Page 216: LabVIEW Manual English

Specific Modules216

© 2011 Phidgets Inc.

5.9.7 RFIDEventExe

Description:

This is called when the Phidget RFID Tag or TagLost event changes. Tag Event is called when a tag isfirst 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.

Page 217: LabVIEW Manual English

Specific Modules 217

© 2011 Phidgets Inc.

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 forundefined.

Returns the event status. (Executed is T; Not executed is F)

Contains error information.

Page 218: LabVIEW Manual English

Specific Modules218

© 2011 Phidgets Inc.

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.

Page 219: LabVIEW Manual English

Specific Modules 219

© 2011 Phidgets Inc.

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.

Page 220: LabVIEW Manual English

Specific Modules220

© 2011 Phidgets Inc.

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.

Page 221: LabVIEW Manual English

Specific Modules 221

© 2011 Phidgets Inc.

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.

Page 222: LabVIEW Manual English

Specific Modules222

© 2011 Phidgets Inc.

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.

Page 223: LabVIEW Manual English

Specific Modules 223

© 2011 Phidgets Inc.

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.

Page 224: LabVIEW Manual English

Specific Modules224

© 2011 Phidgets Inc.

5.9.15 RFIDOpen

Description:

Open a Phidget RFID.

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

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.

Page 225: LabVIEW Manual English

Specific Modules 225

© 2011 Phidgets Inc.

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.

Page 226: LabVIEW Manual English

Specific Modules226

© 2011 Phidgets Inc.

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.

Page 227: LabVIEW Manual English

Specific Modules 227

© 2011 Phidgets Inc.

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.

Page 228: LabVIEW Manual English

Specific Modules228

© 2011 Phidgets Inc.

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

Page 229: LabVIEW Manual English

Specific Modules 229

© 2011 Phidgets Inc.

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.

Page 230: LabVIEW Manual English

Specific Modules230

© 2011 Phidgets Inc.

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.

Page 231: LabVIEW Manual English

Specific Modules 231

© 2011 Phidgets Inc.

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.

Page 232: LabVIEW Manual English

Specific Modules232

© 2011 Phidgets Inc.

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.

Page 233: LabVIEW Manual English

Specific Modules 233

© 2011 Phidgets Inc.

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.

Page 234: LabVIEW Manual English

Specific Modules234

© 2011 Phidgets Inc.

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 forNot Engaged.

Contains error information.

Page 235: LabVIEW Manual English

Specific Modules 235

© 2011 Phidgets Inc.

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.

Page 236: LabVIEW Manual English

Specific Modules236

© 2011 Phidgets Inc.

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.

Page 237: LabVIEW Manual English

Specific Modules 237

© 2011 Phidgets Inc.

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.

Page 238: LabVIEW Manual English

Specific Modules238

© 2011 Phidgets Inc.

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.

Page 239: LabVIEW Manual English

Specific Modules 239

© 2011 Phidgets Inc.

5.10.11 ServoOpen

Description:

Open a PhidgetServo.

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

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.

Page 240: LabVIEW Manual English

Specific Modules240

© 2011 Phidgets Inc.

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.

Page 241: LabVIEW Manual English

Specific Modules 241

© 2011 Phidgets Inc.

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.

Page 242: LabVIEW Manual English

Specific Modules242

© 2011 Phidgets Inc.

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.

Page 243: LabVIEW Manual English

Specific Modules 243

© 2011 Phidgets Inc.

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.

Page 244: LabVIEW Manual English

Specific Modules244

© 2011 Phidgets Inc.

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

Page 245: LabVIEW Manual English

Specific Modules 245

© 2011 Phidgets Inc.

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.

Page 246: LabVIEW Manual English

Specific Modules246

© 2011 Phidgets Inc.

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.

Page 247: LabVIEW Manual English

Specific Modules 247

© 2011 Phidgets Inc.

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.

Page 248: LabVIEW Manual English

Specific Modules248

© 2011 Phidgets Inc.

5.11.4 SpatialEventExe

Description:

This is called when data come. It is called at SpatialGetDataRate, up to 8ms. For the rate faster than8ms, 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.

Page 249: LabVIEW Manual English

Specific Modules 249

© 2011 Phidgets Inc.

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.

Page 250: LabVIEW Manual English

Specific Modules250

© 2011 Phidgets Inc.

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.

Page 251: LabVIEW Manual English

Specific Modules 251

© 2011 Phidgets Inc.

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.

Page 252: LabVIEW Manual English

Specific Modules252

© 2011 Phidgets Inc.

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.

Page 253: LabVIEW Manual English

Specific Modules 253

© 2011 Phidgets Inc.

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.

Page 254: LabVIEW Manual English

Specific Modules254

© 2011 Phidgets Inc.

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.

Page 255: LabVIEW Manual English

Specific Modules 255

© 2011 Phidgets Inc.

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.

Page 256: LabVIEW Manual English

Specific Modules256

© 2011 Phidgets Inc.

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.

Page 257: LabVIEW Manual English

Specific Modules 257

© 2011 Phidgets Inc.

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.

Page 258: LabVIEW Manual English

Specific Modules258

© 2011 Phidgets Inc.

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.

Page 259: LabVIEW Manual English

Specific Modules 259

© 2011 Phidgets Inc.

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.

Page 260: LabVIEW Manual English

Specific Modules260

© 2011 Phidgets Inc.

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.

Page 261: LabVIEW Manual English

Specific Modules 261

© 2011 Phidgets Inc.

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.

Page 262: LabVIEW Manual English

Specific Modules262

© 2011 Phidgets Inc.

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.

Page 263: LabVIEW Manual English

Specific Modules 263

© 2011 Phidgets Inc.

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.

Page 264: LabVIEW Manual English

Specific Modules264

© 2011 Phidgets Inc.

5.11.20 SpatialOpen

Description:

Open a PhidgetSpatial.

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

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.

Page 265: LabVIEW Manual English

Specific Modules 265

© 2011 Phidgets Inc.

5.11.21 SpatialResetCompassCorrectionParameters

Description:

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

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.

Page 266: LabVIEW Manual English

Specific Modules266

© 2011 Phidgets Inc.

5.11.22 SpatialSetCompassCorrectionParameters

Description:

Set the compass correction factors. This can be used to correcting any sensor errors, including hardand 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.

Page 267: LabVIEW Manual English

Specific Modules 267

© 2011 Phidgets Inc.

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.

Page 268: LabVIEW Manual English

Specific Modules268

© 2011 Phidgets Inc.

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.

Page 269: LabVIEW Manual English

Specific Modules 269

© 2011 Phidgets Inc.

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 productmanual 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

Page 270: LabVIEW Manual English

Specific Modules270

© 2011 Phidgets Inc.

StepperGetEngaged

StepperGetPositionMax

StepperGetPositionMax71

StepperGetPositionMin

StepperGetPositionMin71

StepperGetTargetPosition

StepperGetTargetPosition71

StepperGetVelocity

StepperGetVelocityLimit

StepperGetVelocityMax

StepperGetVelocityMin

StepperInputCount

StepperInputState

StepperMotorCount

StepperOpen

StepperSetAcceleration

StepperSetCurrentLimit

StepperSetCurrentPosition

StepperSetCurrentPosition71

StepperSetEngaged

StepperSetTargetPosition

StepperSetTargetPosition71

StepperSetVelocityLimit

StepperStoppedState

Page 271: LabVIEW Manual English

Specific Modules 271

© 2011 Phidgets Inc.

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.

Page 272: LabVIEW Manual English

Specific Modules272

© 2011 Phidgets Inc.

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.

Page 273: LabVIEW Manual English

Specific Modules 273

© 2011 Phidgets Inc.

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.

Page 274: LabVIEW Manual English

Specific Modules274

© 2011 Phidgets Inc.

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.

Page 275: LabVIEW Manual English

Specific Modules 275

© 2011 Phidgets Inc.

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.

Page 276: LabVIEW Manual English

Specific Modules276

© 2011 Phidgets Inc.

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.

Page 277: LabVIEW Manual English

Specific Modules 277

© 2011 Phidgets Inc.

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.

Page 278: LabVIEW Manual English

Specific Modules278

© 2011 Phidgets Inc.

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.

Page 279: LabVIEW Manual English

Specific Modules 279

© 2011 Phidgets Inc.

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.

Page 280: LabVIEW Manual English

Specific Modules280

© 2011 Phidgets Inc.

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.

Page 281: LabVIEW Manual English

Specific Modules 281

© 2011 Phidgets Inc.

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, thisvalue is velocity.)

Returns the event status. (Executed is T; Not executed is F)

Contains error information.

Page 282: LabVIEW Manual English

Specific Modules282

© 2011 Phidgets Inc.

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.

Page 283: LabVIEW Manual English

Specific Modules 283

© 2011 Phidgets Inc.

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.

Page 284: LabVIEW Manual English

Specific Modules284

© 2011 Phidgets Inc.

5.12.14 StepperEventExePosition71

Description:

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

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, thesign bit must be extended into the HighBit manually.

Returns the event status. (Executed is T; Not executed is F)

Contains error information.

Page 285: LabVIEW Manual English

Specific Modules 285

© 2011 Phidgets Inc.

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.

Page 286: LabVIEW Manual English

Specific Modules286

© 2011 Phidgets Inc.

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.

Page 287: LabVIEW Manual English

Specific Modules 287

© 2011 Phidgets Inc.

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.

Page 288: LabVIEW Manual English

Specific Modules288

© 2011 Phidgets Inc.

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.

Page 289: LabVIEW Manual English

Specific Modules 289

© 2011 Phidgets Inc.

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.

Page 290: LabVIEW Manual English

Specific Modules290

© 2011 Phidgets Inc.

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.

Page 291: LabVIEW Manual English

Specific Modules 291

© 2011 Phidgets Inc.

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.

Page 292: LabVIEW Manual English

Specific Modules292

© 2011 Phidgets Inc.

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.

Page 293: LabVIEW Manual English

Specific Modules 293

© 2011 Phidgets Inc.

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 referto StepperEventExePosition71.

Contains error information.

Page 294: LabVIEW Manual English

Specific Modules294

© 2011 Phidgets Inc.

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 forNot Engaged.

Contains error information.

Page 295: LabVIEW Manual English

Specific Modules 295

© 2011 Phidgets Inc.

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.

Page 296: LabVIEW Manual English

Specific Modules296

© 2011 Phidgets Inc.

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 referto StepperEventExePosition71.

Contains error information.

Page 297: LabVIEW Manual English

Specific Modules 297

© 2011 Phidgets Inc.

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.

Page 298: LabVIEW Manual English

Specific Modules298

© 2011 Phidgets Inc.

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 referto StepperEventExePosition71.

Contains error information.

Page 299: LabVIEW Manual English

Specific Modules 299

© 2011 Phidgets Inc.

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.

Page 300: LabVIEW Manual English

Specific Modules300

© 2011 Phidgets Inc.

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 referto StepperEventExePosition71.

Contains error information.

Page 301: LabVIEW Manual English

Specific Modules 301

© 2011 Phidgets Inc.

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.

Page 302: LabVIEW Manual English

Specific Modules302

© 2011 Phidgets Inc.

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.

Page 303: LabVIEW Manual English

Specific Modules 303

© 2011 Phidgets Inc.

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.

Page 304: LabVIEW Manual English

Specific Modules304

© 2011 Phidgets Inc.

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.

Page 305: LabVIEW Manual English

Specific Modules 305

© 2011 Phidgets Inc.

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.

Page 306: LabVIEW Manual English

Specific Modules306

© 2011 Phidgets Inc.

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.

Page 307: LabVIEW Manual English

Specific Modules 307

© 2011 Phidgets Inc.

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.

Page 308: LabVIEW Manual English

Specific Modules308

© 2011 Phidgets Inc.

5.12.38 StepperOpen

Description:

Open a PhidgetStepper.

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

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.

Page 309: LabVIEW Manual English

Specific Modules 309

© 2011 Phidgets Inc.

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.

Page 310: LabVIEW Manual English

Specific Modules310

© 2011 Phidgets Inc.

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.

Page 311: LabVIEW Manual English

Specific Modules 311

© 2011 Phidgets Inc.

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.

Page 312: LabVIEW Manual English

Specific Modules312

© 2011 Phidgets Inc.

5.12.42 StepperSetCurrentPosition71

Description:

Set the current position of a motor. It will not move the motor, just update the position value. Thisfunction 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 bitmust be extended into the HighBit manually.

Describes error conditions that occur before this node runs.

Output

Same as the Device In.

Contains error information.

Page 313: LabVIEW Manual English

Specific Modules 313

© 2011 Phidgets Inc.

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.

Page 314: LabVIEW Manual English

Specific Modules314

© 2011 Phidgets Inc.

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.

Page 315: LabVIEW Manual English

Specific Modules 315

© 2011 Phidgets Inc.

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 bitmust be extended into the HighBit manually.

Describes error conditions that occur before this node runs.

Output

Same as the Device In.

Contains error information.

Page 316: LabVIEW Manual English

Specific Modules316

© 2011 Phidgets Inc.

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.

Page 317: LabVIEW Manual English

Specific Modules 317

© 2011 Phidgets Inc.

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 outstandingcommands.

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 NotStopped.

Contains error information.

Page 318: LabVIEW Manual English

Specific Modules318

© 2011 Phidgets Inc.

5.13 Phidget Temperature Sensor

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

TempCreate

TempEventClose

TempEventCreate

TempEventExe

TempGetAmbient

TempGetAmbientMax

TempGetAmbientMin

TempGetPotential

TempGetPotentialMax

TempGetPotentialMin

TempGetTemperature

TempGetTemperatureMax

TempGetTemperatureMin

TempGetThermocoupleType

TempGetTrigger

TempInputCount

TempOpen

TempSetThermocoupleType

TempSetTrigger

Page 319: LabVIEW Manual English

Specific Modules 319

© 2011 Phidgets Inc.

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.

Page 320: LabVIEW Manual English

Specific Modules320

© 2011 Phidgets Inc.

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.

Page 321: LabVIEW Manual English

Specific Modules 321

© 2011 Phidgets Inc.

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.

Page 322: LabVIEW Manual English

Specific Modules322

© 2011 Phidgets Inc.

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.

Page 323: LabVIEW Manual English

Specific Modules 323

© 2011 Phidgets Inc.

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.

Page 324: LabVIEW Manual English

Specific Modules324

© 2011 Phidgets Inc.

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.

Page 325: LabVIEW Manual English

Specific Modules 325

© 2011 Phidgets Inc.

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.

Page 326: LabVIEW Manual English

Specific Modules326

© 2011 Phidgets Inc.

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.

Page 327: LabVIEW Manual English

Specific Modules 327

© 2011 Phidgets Inc.

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.

Page 328: LabVIEW Manual English

Specific Modules328

© 2011 Phidgets Inc.

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.

Page 329: LabVIEW Manual English

Specific Modules 329

© 2011 Phidgets Inc.

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.

Page 330: LabVIEW Manual English

Specific Modules330

© 2011 Phidgets Inc.

5.13.12 TempGetTemperatureMax

Description:

Get the maximum temperature that can be measured by a thermocouple input. This depends on thetype 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.

Page 331: LabVIEW Manual English

Specific Modules 331

© 2011 Phidgets Inc.

5.13.13 TempGetTemperatureMin

Description:

Get the minimum temperature that can be measured by a thermocouple input. This depends on the typeof 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.

Page 332: LabVIEW Manual English

Specific Modules332

© 2011 Phidgets Inc.

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.

Page 333: LabVIEW Manual English

Specific Modules 333

© 2011 Phidgets Inc.

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.

Page 334: LabVIEW Manual English

Specific Modules334

© 2011 Phidgets Inc.

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.

Page 335: LabVIEW Manual English

Specific Modules 335

© 2011 Phidgets Inc.

5.13.17 TempOpen

Description:

Open a Phidget Temperature Sensor.

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

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.

Page 336: LabVIEW Manual English

Specific Modules336

© 2011 Phidgets Inc.

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.

Page 337: LabVIEW Manual English

Specific Modules 337

© 2011 Phidgets Inc.

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.

Page 338: LabVIEW Manual English

Specific Modules338

© 2011 Phidgets Inc.

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

Page 339: LabVIEW Manual English

Specific Modules 339

© 2011 Phidgets Inc.

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.

Page 340: LabVIEW Manual English

Specific Modules340

© 2011 Phidgets Inc.

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.

Page 341: LabVIEW Manual English

Specific Modules 341

© 2011 Phidgets Inc.

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.

Page 342: LabVIEW Manual English

Specific Modules342

© 2011 Phidgets Inc.

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.

Page 343: LabVIEW Manual English

Specific Modules 343

© 2011 Phidgets Inc.

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.

Page 344: LabVIEW Manual English

Specific Modules344

© 2011 Phidgets Inc.

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 forundefined.

The cursor blink state (Boolean type).

Contains error information.

Page 345: LabVIEW Manual English

Specific Modules 345

© 2011 Phidgets Inc.

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 forundefined.

The state of the cursor (Boolean type).

Contains error information.

Page 346: LabVIEW Manual English

Specific Modules346

© 2011 Phidgets Inc.

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.

Page 347: LabVIEW Manual English

Specific Modules 347

© 2011 Phidgets Inc.

5.14.9 TextOpen

Description:

Open a Phidget TextLCD.

Connector Pane:

Controls and Indicators:

InputDevice # identification. This function will create a new device identification if it's 0 orinvalid.

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.

Page 348: LabVIEW Manual English

Specific Modules348

© 2011 Phidgets Inc.

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.

Page 349: LabVIEW Manual English

Specific Modules 349

© 2011 Phidgets Inc.

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.

Page 350: LabVIEW Manual English

Specific Modules350

© 2011 Phidgets Inc.

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.

Page 351: LabVIEW Manual English

Specific Modules 351

© 2011 Phidgets Inc.

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.

Page 352: LabVIEW Manual English

Specific Modules352

© 2011 Phidgets Inc.

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.

Page 353: LabVIEW Manual English

Specific Modules 353

© 2011 Phidgets Inc.

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.

Page 354: LabVIEW Manual English

Specific Modules354

© 2011 Phidgets Inc.

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.

Page 355: LabVIEW Manual English

Specific Modules 355

© 2011 Phidgets Inc.

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.

Page 356: LabVIEW Manual English

Specific Modules356

© 2011 Phidgets Inc.

5.15 Phidget TextLED

Discontinued.

Page 357: LabVIEW Manual English

Specific Modules 357

© 2011 Phidgets Inc.

5.16 Phidget Weight Sensor

Discontinued.

Page 358: LabVIEW Manual English

Phidgets Constants358

© 2011 Phidgets Inc.

6 Phidgets Constants

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

ServoType

ThermocoupleType

CodeInfo

IREncoding

IRLength

Page 359: LabVIEW Manual English

Phidgets Constants 359

© 2011 Phidgets Inc.

6.1 ServoType

An enum value with the following definition:

Value Comments

PHIDGET_SERVO_DEFAULT = 1, Default - This is what the servo API been historicallyused, originally based on the Futaba FP-S148

PHIDGET_SERVO_RAW_us_MODE = 2, Raw us mode - all position, velocity, accelerationfunctions are specified in microseconds rather thendegrees

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= 13,

Firgelli L12 Linear Actuator 30mm 50:1

PHIDGET_SERVO_FIRGELLI_L12_50_100_06_R = 14,

Firgelli L12 Linear Actuator 50mm 100:1

PHIDGET_SERVO_FIRGELLI_L12_50_210_06_R = 15,

Firgelli L12 Linear Actuator 50mm 210:1

PHIDGET_SERVO_FIRGELLI_L12_100_50_06_R = 16,

Firgelli L12 Linear Actuator 100mm 50:1

PHIDGET_SERVO_FIRGELLI_L12_100_100_06_R = 17,

Firgelli L12 Linear Actuator 100mm 100:1

PHIDGET_SERVO_USER_DEFINED = others Undefined

Page 360: LabVIEW Manual English

Phidgets Constants360

© 2011 Phidgets Inc.

6.2 ThermocoupleType

An enum value with the following definition:

Value Comments

PHIDGET_TEMPERATURE_SENSOR_K_TYPE= 1,

K-Type thermocouple

PHIDGET_TEMPERATURE_SENSOR_J_TYPE= 2,

J-Type thermocouple

PHIDGET_TEMPERATURE_SENSOR_E_TYPE= 3,

E-Type thermocouple

PHIDGET_TEMPERATURE_SENSOR_T_TYPE= 4,

T-Type thermocouple

PHIDGET_SERVO_USER_DEFINED = others Undefined

Page 361: LabVIEW Manual English

Phidgets Constants 361

© 2011 Phidgets Inc.

6.3 CodeInfo

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

DataType

Item Comments

bitCount Number of bits in the code.

encoding Encoding used to encode the data. This is an enum. Please refer to PhigetsConstant -> IREncoding

length Constant or Variable length encoding. This is an enum. Please refer to PhigetsConstant -> 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 withpulses and null terminate. Set to 0 for none.

min_repeat Minimum number of times to repeat a code on transmit.

toggle_mask[16]

Bit toggles, which are applied to the code after each transmit.

carrierFrequency

Carrier frequency in Hz - defaults to 38kHz.

dutyCycle Duty Cycle in percent (10-50). Defaults to 33.

Page 362: LabVIEW Manual English

Phidgets Constants362

© 2011 Phidgets Inc.

6.4 IREncoding

The PhidgetIR supports these data encodings:

Value Comments

PHIDGET_IR_ENCODING_UNKNOWN = 1, Unknown - the default value

PHIDGET_IR_ENCODING_SPACE = 2, Space encoding, or Pulse Distance Modulation

PHIDGET_IR_ENCODING_PULSE = 3, Pulse encoding, or Pulse Width Modulation

PHIDGET_IR_ENCODING_BIPHASE = 4, Bi-Phase, or Manchester encoding

PHIDGET_IR_ENCODING_RC5 = 5, RC5 - a type of Bi-Phase encoding

PHIDGET_IR_ENCODING_RC6 = 6, RC6 - a type of Bi-Phase encoding

Others Undefined

Page 363: LabVIEW Manual English

Phidgets Constants 363

© 2011 Phidgets Inc.

6.5 IRLength

The PhidgetIR supports these encoding lengths:

Value Comments

PHIDGET_IR_LENGTH_UNKNOWN = 1, Unknown - the default value

PHIDGET_IR_LENGTH_CONSTANT = 2, Constant - the bitstream + gap length is constant

PHIDGET_IR_LENGTH_VARIABLE = 3, Variable - the bitstream has a variable length with aconstant gap

Others Undefined

Page 364: LabVIEW Manual English

Index364

© 2011 Phidgets Inc.

Index

- _ -_AttachCHK 44

_ChkError 44

_Close 44

_Delete 44

_Open 44

_SerialReturn 44

_WaitAttach 44

- A -AcceAxisCount 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

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

- C -CodeInfo 155, 358

- E -EncoderCreate 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

- G -Getting Start 11, 12

- I -IFCreate 122, 123

IFEventClose 122, 124

IFEventCreateInput 122, 125

IFEventCreateOutput 122, 126

Page 365: LabVIEW Manual English

Index 365

© 2011 Phidgets Inc.

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

- L -LEDCount 164

LEDCreate 164

LEDGetBrightness 164

LEDGetCurrentLimit 164

LEDGetVoltage 164

LEDOpen 164

LEDSetBrightness 164

LEDSetCurrentLimit 164

LEDSetVoltage 164

- M -MCCreate 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

- P -PHCreate 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

Page 366: LabVIEW Manual English

Index366

© 2011 Phidgets Inc.

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

- R -RFIDCreate 209

RFIDEventClose 209

RFIDEventCloseOutput 209

RFIDEventCreateOutput 209

RFIDEventCreateTag 209

RFIDEventCreateTagLost 209

RFIDEventExe 209

RFIDEventExeOutput 209

RFIDGetAntennaState 209

RFIDGetLastTag 209

RFIDGetLEDState 209

RFIDGetOutputCount 209

RFIDGetOutputState 209

RFIDGetTagState 209

RFIDOpen 209

RFIDSetAntennaState 209

RFIDSetLEDState 209

RFIDSetOutputState 209

- S -Servo 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

Page 367: LabVIEW Manual English

Index 367

© 2011 Phidgets Inc.

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

StepperSetVelocityLimit 269

StepperStoppedState 269

SubVIs (Folder) 23

- T -TempCreate 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

- U -Understand Phidgets 12

Using Help 11

Page 368: LabVIEW Manual English

Unit 1, 6115 4th Street S.E.Calgary, ABCanada T2H 2H9Telephone: Facsimile: E-mail: Web site:

Phidgets Inc.

[email protected] www.phidgets.com