Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Background

Phidget is a company that provides products for USB Sensing and Control. Phidget specialize in making affordable, easy to use sensors and controllers that require minimal electronics knowledge. Phidget covers vast range of sensors and motors.

Sensors

Phidget Protocol Handler Flow

TQLEngine provides phidget protocol handler, which is essentially a wrapper over the Phidget Driver that is provided by Phidget. Note that the developers are required to install the phidget driver for different platform (Linux, Windows, Mac) from the phidget website.

Phidget Protocol Handler Parameters

Phidget has a broad range of sensors and motors. The phidget protocol handler provides wrapper implementation for following Device Types. Adding support for additional device types will be provided on a need basis.

Phidget Input Parameter List

NameDescriptionHow Used?

DeviceType

Specify the type of device that requires interaction. Supported values are:

PhidgetRFID, PhidgetTextLCD, PhidgetGPS, PhidgetInterfaceKit, PhidgetAdvancedServo

DeviceType is passed as a modifier to Invoke.

<Invoke Method="Get" DeviceType="PhidgetInterfaceKit"/>

SerialNumberThis represents the interface port number to which the sensor or motor is connected.SerialNumber is passed as a modifier to Invoke
ServoAngleAngle to be applied to a Advanced Servo Motor.

ServoAngle is passed as a payload to Invoke wrapped within

Message/Value container.

<Invoke Method="Post" DeviceType="PhidgetTextLCD">

<Message><Value><ServoAngle>110.0</ServoAngle></Value></Message>

</Invoke>

SimulatedSimulates Sensor Behavior by sending random integer values between 1 and 100 
-

Some time if you need to pass a String value to the handler as input - usually in case of RFID Writer

or LCD Text Display, you can pass it as part of <Message><Value>Hello</Value></Message> as payload to Invoke.

Payload of <Invoke>.

<Invoke Method="Post" DeviceType="PhidgetTextLCD">

<Message><Value>Hello</Value></Message>

 </Invoke>

 

Phidget Output Format

Output from the Phidget Handler is simply a text value.

Special formatted case for GPS Sensors - In case of GPS the output text is aggregated and presented in a single formatted text as below: 

Phidget Handler GPS Output Text Format
Lon:<value>;Lat:<value>;Alt:<Value>;Vel:<Value>;Head:<Value>;Status:<Value>
Default Value for Lon, Lat, Alt, Vel, Head is: Unknown
Default Value for Status is false

Examples

Running Phidget Handler in Simulated Mode.

Phidget Handler Thing Facet in Simulated mode
<ThingFacet Name="PhidgetSimulatedFacet">
  <Integer Name="SimulatedValue" Update="auto" KnownBy="PhidgetSimAction"/>
  <String Name="DeviceType"/>
  <String Name="SerialNumber"/>
  <Action Name="PhidgetSimAction" Documentation="Returns integer values from 1 - 100 in Random order">
    <Workflow Limit="1" Live="1" Timeout="-1">
      <Task Name="Main" While="True">
        <Event Name="Argument" As="ActionArgument"/>
        <Invoke Name="ReadValue" waitFor="Argument" Get="phid://" SerialNumber="[%:Event.Argument.SerialNumber.Value:%]" DeviceType="[%:Event.Argument.DeviceType.Value:%]" Simulated="true"/>
        <Output Name="Result" As="ActionResult">
          <Value>
            <SimulatedValue>[%:[%:@Output:%]Invoke.ReadValue.Message.Value:%]</SimulatedValue>
          </Value>
        </Output>
      </Task>
    </Workflow>
  </Action>
</ThingFacet>

Driver Installation Steps

Installing Phidget Driver

  • No labels