Specification revision: 10, 2020-03-05.
iOS version only supports Phidgets through a network connection
After using Phidget_Connect( address ; password {; port } ) function device may act as connected even though the communication with plugin may not be set yet. You may want to add Pause into onAttach set script event as workaround. Please see Examples inside Distribution Archive.
It is not possible to downgrade the plugin through the function Install Plug-In file.
You can find all the supported devices in file SupportedDevices.html
Returns version string of the active 24U Phidgets Plug-In, formatted as requested by the parameter.
versionFormat | Defines the format of the returned version. |
"short" | To get just the version number |
"long" | To get the plug-in name followed by its version number |
"platform" | To get the platform of the code currently running |
"autoupdate" | To get autoupdate compatible (comparable) version number. |
"phidgetlib" | To get the version of Phidget library |
Phidget_Version("phidgetlib")
This will return for example: "Phidget21 - Version 2.1.8 - Built Aug 21 2015 10:20:29"
Provides special functionality to operate with plugin serial numbers.
selector | Define the type of operation. |
SerialNumber | Register given SerialNumber and return an error code. |
EmailAddress | Tries to activate with given email address and return an error code. Not supported in iOS version and will return error -4 Not implemented. |
"Registration window" | Show the "Registration window" and return 0. Not supported in iOS version and will return error -4 Not implemented. |
"About window" | Show the "About window" and return 0. Not supported in iOS version and will return error -4 Not implemented. |
"Status" | Return the actual registration state of the plugin: "Demo", "Demo expired", "Trial", "Trial Expired", "Registered" or "Dead". It may return different values in client solutions and server side scripts, depending on the types of licenses the product is registered with. iOS version returns only one of two states: "Registered" or "Unregistered". |
"Unregister" | Unregister all serial numbers related to the product and return an error code. |
Use this function to register or unregister 24U Phidgets Plug-In, to get information about current registration state, or to invoke GUI providing basic registration information and purchase capabilities.
Returns zero or error code depending on the selector.
Phidget_Register( "address@example.com" )
This will send email on address@example.com for confirmation, if you confirm than you will get trial version on this product verified by this email.
Phidget_Register( "PHD30C666-4B7B-37PH-Q2E6-1UKY" )
This will register this product with key: "PHD30C666-4B7B-37PH-Q2E6-1UKY".
Phidget_Register( "Unregister" )
This will remove all registered keys. After this call product is no longer registered.
Reads data from the Phidget.
phidgetSNdevice | Identification of device |
valueID | Specifies which data should be read. |
index | Default to 0. Index of the port of IO Phidget or another index information if needed |
extra | Specifies some options for specific Phidget type. |
valueID | Phidget type | Description |
---|---|---|
"inputValue" | General | Returns value of the default input |
"inputState" | Interface Kit | Returns the value of the digital input |
"sensorValue" | Interface Kit | Returns the value of the analog input or value of a supported VINT sensor |
"sensorRawValue" | Interface Kit | Returns the raw value of the analog input |
"outputState" | Interface Kit | Returns the value of the analog output |
"outputState" | RFID | Returns the state of the designated digital output |
"tag" | RFID | Reads the RFID tag value. Note: before reading antenna on device has to be on. See Phidget_Set. |
"motorPosition" | Servo | Reads the position of the motor |
"bridgeValue" | Bridge | Reads the value of port (port has to be enabled) |
"voltage" | Analog | Reads voltage level on port of Phidget Analog |
extra | Phidget type | Description |
---|---|---|
"autoDetect" | RFID |
Use this flag to autodetect the tag protocol from the tag.
Without this flag, the first 5 characters of the tag content is converted into 10 character long string
to ensure backward compatibility with solutions created for plug-in version 1.x.
Note: all new solutions are recommended to use this flag. |
The "General" Phidget Type can be used with all Phidgets. The default input for all Phidgets is the first valueID for each phidget in this list. For example calling Phidget_Read( -1 ; "inputValue" ) is the same as Phidget_Read( -1 ; "motorPosition" ) for PhidgetServo.
Function returns data from Phidget if everything is OK. In case of error the function returns "?". You can use Phidget_Get("lastError") for more detailed error description.
Phidget_Read(-1 ; "inputValue")
The most basic reading. This command will read an "inputValue" from a connected Phidget. If more than one device is connected the plug-in will choose the first device which was connected.
Phidget_Read(335882 ; "sensorValue" ; 3)
Reads a value from the fourth sensor of the InterfaceKit. If the field phidgetSNdevice does not contain correct serial number of the the Interface Kit Phidget (which must be connected in the time of reading) than the function will fail and returns "?".
Phidget_Read(335882:3"335882:3"; "bridgeValue" ; 1)
Reads value from port 1 on Phidget Bridge with Phidget serial number 335882 connected to 3rd VINT port. If the port is disabled or any other error occured than the function will fail and returns "?".
Phidget_Read(335882 ; "tag")
Reads tag value from Phidget RFID.
Phidget_Read(335882 ; "tag")
Assume, that tag contains value "hello world!" using protocol PHIDGET. Because "autoDetect" is not used, output value is converted to "68656c6c6f".
Phidget_Read(335882 ; "tag" ; 0 ; "autoDetect")
Assume, that tag contains value "hello world!" using protocol PHIDGET. This returns "hello world!".
Data to the Phidget are written or set.
phidgetSNdevice | Identification of device |
valueID | Specifies which data should be written |
data | Data to write or set. Please use FileMaker number type for numbers and text for strings. The plug-in will try to convert them if necessary. |
index | Default to 0. Index of the port of IO Phidget or another index information if needed. In case of TextLCD integrated with Interce Kit it is number of the row. In case of TextLCD Adapter index is in format "channel:row". |
tagProtocol | Default to PHIDGETS. See tag protocols for more information. |
tagLocking | Can be "lock" or empty string. In case of "lock" read/write tag will be locked and cannot be rewritten in the future. Default value is "". This is a one way process. Locked tag cannot be unlocked |
valueID | Phidget type | Description |
---|---|---|
"outputState" | General | Write value to default output |
"outputState" | Interface Kit | Write data to digital output |
"outputState" | RFID | New value to the output is written |
"tag" | RFID | New tag is written. Note: antenna has to be turned on before reading. See Phidget_Set. |
"motorPosition" | Servo and Stepper | Sets the new motor position |
"displayString" | TextLCD | New text to LCD is written on the first row. Specific LCD and row is determined by parameter index. |
"voltage" | Analog | Allows to set voltage level of given port. Don't forget to enable port in order to make it work. |
The "General" valueIDs can be used with all sensors. The default output for all Phidgets is the first valueID for each Phidget in this list. For example calling Phidget_Write( -1 ; "outputState" ; 20 ) is the same as Phidget_Write( -1 ; "motorPosition" ; 20 ) for PhidgetServo.
Function returns 0 if everything is OK. In case of error the function returns negative error code or Phidget Error code"?". You can use Phidget_Get("lastError") for more detailed error description.
Phidget_Write(-1 ; "outputState" ; 20)
This will write a value "20" to the first connected phidget if it is possible.
Phidget_Write( phidgetSNDevice ; "motorPosition" ; 215)
It rotates the servo in PhidgetServo to 215 degrees. PhidgetSNDevice parameter should contain a valid serial number of connected servo phidget.
Phidget_Write( 69418 ; "outputState" ; 1 ; 5)
Sets the sixth output of the interface kit phidget with serial number 69418 to 1.
Phidget_Write( 335882 ; "tag" ; "Your text." )
New tag is written. Used tag protocol: PHIDGETS (See tag protocols for more information.)
Phidget_Write( phidgetSNDevice ; "tag" ; "999123456789012"; 0 ; "ISO11785_FDX_B" )
New tag is written. Used tag protocol: ISO11785_FDX_B (See tag protocols for more information.)
Phidget_Write( phidgetSNDevice ; "tag" ; "123456789a"; 0 ; "EM4100" )
New tag is written. Used tag protocol: EM4100 (See tag protocols for more information.)
Phidget_Write( phidgetSNDevice ; "displayString" ; "Hello World!"; 0)
This example shows how to use PhidgetTextLCD 20X2 : White : Integrated PhidgetInterfaceKit 8/8/8
New text is written on the first row. Note: Rows are indexed from zero. If text is not visible, please check backlight, brightness and contrast.
Phidget_Write( phidgetSNDevice ; "displayString" ; "special chars: "& char(224) & char(225) & char(226) & char(227) ; 1)
This example shows how to use PhidgetTextLCD 20X2 : White : Integrated PhidgetInterfaceKit 8/8/8
Special characters on the first row are written. More about special characters can be found here.
Phidget_Write(-1 ; "displayString" ; "Hello World!" ; "2:1">
This example shows how to use PhidgetTextLCD Adapter with LCD Screen 4x20. connected to port LCD-1
Before you can write on the LCD connected to the PhidgetTextLCD Adapter, you should first set up screen size and activate the screen (see Phidget_Set).
New text is written on the 3rd row.
Phidget_Write( phidgetSNDevice ; "outputState" ; 2,6 ; 1)
Set output voltage to 2,6V on port 1 (assuming this port is enabled).
Tell the plug-in to launch the script when specified event is triggered by the Phidget or in specified time intervals.
phidgetSNdevice | Identification of device |
event | The event when the script should be triggered. Use FileMaker text to describe it. I.e. "onSensorChange". |
time | The time interval on which the script should trigger. Use FileMaker number i.e. 1.8. Time is in [s]. Time must be a positive number. Setting time lower than 1 s is not recommended. |
scriptName | The name of script which should be triggered. The script will receive a parameter which will contain at least phidgetSNDevice on the first row. More values can be added depending on the event. |
index | The index of analog input or output to trigger the script. The script will be triggered only if the value will exceed changeAmount. If omitted the script will be triggered every time when any of inputs/outputs are changed regardless of its number. |
changeAmount | The amount of change that should exist between the last reported value and the current value before an event triggers. The default is 1. This cannot be changed for binary inputs or outputs. Use FileMaker number. Param changeAmount can be used only on onSensorChange event, it is ignored on other events. |
threshold | The script will not be triggered until the sensor value exceeds threshold. Use it as a simple noise filter. It has no meaning for binary inputs/outputs. The default value is 0 - no filtering. |
event | Phidget type | Description | Script is given parameters (return-delimited): |
---|---|---|---|
"onAttach" | General | Run the script when some phidget is attached. PhidgetSNDevice must be set to "all". | PhidgetSNdevice |
"onDetach" | General | Run the script when some phidget is detached. PhidgetSNDevice must be set to "all". | PhidgetSNdevice |
"onInputChange" | General | Run the script when default input is changed | PhidgetSNdevice index value |
"onInputChange" | Interface Kit | Run the script when digital input is changed | PhidgetSNdevice index value |
"onSensorChange" | Interface Kit | Run the script when the value from connected sensor or VINT sensor is changed. The amount can be set by the changeAmount. | PhidgetSNdevice index value |
"onOutputChange" | Interface Kit | Run the script when output is changed | PhidgetSNdevice index value |
"onTag" | RFID | Run the script when a tag approaches RFID sensor | PhidgetSNdevice index tagBackwardCompatibleString tagValueString |
"onTagLost" | RFID | Run the script when a the sensor losts the connection with a tag | PhidgetSNdevice index tagBackwardCompatibleString tagValueString |
"onOutputChange" | RFID | Run the script when output is changed | PhidgetSNdevice index value |
"onMotorPosChange" | Servo and Stepper | Run the script when the motor position is changed | PhidgetSNdevice index value |
"onBridgeData" | Bridge | Run the script when dataRate time has passed | PhidgetSNdevice index value |
"onStepperStop" | Stepper | Run the script when stepper motor stops. | PhidgetSNdevice index value |
Some events are the same for more Phidgets. The "General" event "onInputChange" can be installed to all listed Phidgets and it will behave as their default input event.
For example: Phidget_SetScriptEvent( -1 ; "onInputChange" ; "Do Something" ) has the same meaning as
Phidget_SetScriptEvent( -1 ; "onMotorPosChange" ; "Do Something" ) for PhidgetServo or Phidget_SetScriptEvent( -1 ; "onTag" ; "Do Something" )
for PhidgetRFID. If "onInputChange" is used, the phidget type is detected automatically and the event is installed to it.
Param changeAmount can be used only on onSensorChange event. On other events it is ignored.
In both cases (event/time) the script will receive a parameter containing the value list with phidgetSNdevice, inputIndex and inputValue. Values for digital input can be "0" or "1" for analog it varies by the type of the event.
To remove event call Phidget_SetScriptEvent( phidgetSNdevice ; event/time ; "" ).
To remove all events from some phidget call Phidget_SetScriptEvent( phidgetSNdevice ; "" ; "" ).
To remove all events from all Phidgets call Phidget_SetScriptEvent( "" ; "" ; "" ) or Phidget_SetScriptEvent( "all" ; "" ; "" ).
Function returns 0 if event is successfully installed or uninstalled. In case of error the function returns negative error code or Phidget Error code"?". You can use Phidget_Get("lastError") for more detailed error description.
Phidget_SetScriptEvent(-1 ; 1.2 ; "Default Script")
This will install the script named "Default Script" to the first available connected phidget. The script will run every 1.2 second and it will obtain a parameter which consist of serial number, "0" and input value. Each on new line. The "0" signals that the input on index 0 is beeing read.
Phidget_SetScriptEvent(phidgetSNdevice ; "onTag" ; "Process new tag")
The script "Process new tag" will be triggered every time the new RFID tag is in the vicinity of the RFID phidget. The script will receive a parameter with phidget serial number, "0" and RFID value of the tag. Each on the new line. The zero means, that the first input of RFID phidget is used.
Phidget_SetScriptEvent(69418 ; "onSensorChange" ; "Read sensor" ; 6 ; 10 ; 5)
This will install "onSensorChange" event to the interface kit phidget with serial number 69418. The phidget must be connected.
The "Read sensor" script will be triggered when the seventh sensor's value on the interface kit phidget with SN 69418 will change more than 10 points and will be higher than 5. The script will receive the parameter which will contain: "69418", "6" and sensor value. Each on the new line.
Phidget_SetScriptEvent("all" ; "onAttach" ; "New phidget attached")
The script "New phidget attached" will be called every time when user will connect a new phidget to the system. The script will receive a parameter with serial number of the new connected phidget.
Function to get plug-in or phidget settings and other useful data.
what | Which data should be get |
more | Additional specifier to concretize the request |
index | Additional specifier to get data for specific part (see example) |
what | Phidget type | Description |
---|---|---|
"lastError" | Not used | Returns the error code of the last error. If no error occurred 0 is returned. |
"lastErrorMessage" | Not Used | Returns error text description from the last plugin call |
"libraryVersion" | Not used | Get version of Phidget Library installed on system |
"attachedDevices" | Not used | Get number of attached devices |
"serialNumber" | Phidget Index | Serial number of the device with index specified in "more" parameter |
"deviceType" | PhidgetSNDevice | Type of the device specified by PhidgetSNDevice |
"deviceName" | PhidgetSNDevice | Name of the device specified by PhidgetSNDevice |
"deviceVersion" | PhidgetSNDevice | Version of the device specified by PhidgetSNDevice |
"deviceLabel" | PhidgetSNDevice | Label of the device specified by PhidgetSNDevice |
"numInputs" | PhidgetSNDevice | The number of default inputs |
"numOutputs" | PhidgetSNDevice | The number of default outputs |
"numSensors" | Interface Kit | Number of sensors |
"ratiometric" | Interface Kit | Returns phidget ratiometric status |
"antennaOn" | RFID | The status of the antenna of the RFID reading device |
"ledOn" | RFID | The status of the LED |
"tagProtocol" | RFID | Returns RFID tag protocol. See tag protocols for more information. |
"backlight" | TextLCD | Gets the state of the backlight.Gets the backlight brightness |
"brightness" | TextLCD | Gets the brightness of the backlight (Not supported on all TextLCDs). This parameter is deprecated since version 3.0, please use "backlight" instead. For backward compatibility, this parameter returns the same value as "backlight" parameter. |
"contrast" | TextLCD | Gets the last set contrast value |
"numRows" | TextLCD | Gets number of rows on LCD display |
"numColumns" | TextLCD | Gets number of columns on LCD display |
"cursorOn" | TextLCD | Gets '1' if cursor is on |
"cursorBlink" | TextLCD | Gets '1' if cursor should be blinking |
"enabled" | Bridge and Analog | Gets "1" if port is enabled |
"dataRateMin" | Bridge | Gets minimal possible data rate |
"dataRateMax" | Bridge | Gets maximum possible data rate |
"dataRate" | Bridge | Gets actual data rate for getting values from bridge automatically. |
"gain" | Bridge | Gets the value of actual gain (something and precision) |
"bridgeMin" | Bridge | Gets bridge minimal possible value on port |
"bridgeMax" | Bridge | Gets bridge maximal possible value on port |
"voltageMin" | Analog | Gets voltage minimal possible value on port |
"voltageMax" | Analog | Gets voltage maximal possible value on port |
"servoMin" | AdvancedServo | Get minimal value for servo position |
"servoMax" | AdvancedServo | Get maximal value for servo position |
"engaged" | AdvancedServo and Stepper | Gets '1' if servo on position is on |
"acceleration" | Stepper | Get current acceleration of stepper |
"velocity" | Stepper | Get current velocity of stepper |
"minAcceleration" | Stepper | Get minimal possible acceleration |
"maxAcceleration" | Stepper | Get maximal possible acceleration |
"controlMode" | Stepper | Get control mode, possible values are "run" (continuos movement), "step" (motor will move to given target). |
"targetPosition" | Stepper | Get target position |
"acceleration" | Stepper | Get current acceleration of stepper |
"velocity" | Stepper | Get current velocity of stepper |
"currentLimit" | Stepper | Get value of current limit. Current limit allows to control maximal power output for given Stepper. |
"correctionTemperature" | PH Sensor | Get value of correction temperature for PH Sensor |
"portMode" | VINT Hub | Get current port mode. Possible values are "digitalOutput", "digitalInput", "voltage", "voltageRatio", "vintDevice". |
The "more" parameter is usually used to specify Phidget Serial Number. Some commands need specific PhidgetSNDevice (of specific type) otherwise they will fail. Some commands are more general. You can use PhigetSN value "-1" to specify the default Phidget.
The boolean values are returned in number form. For example Phidget_Get("antennaOn" ; -1) returns 0 if backlight is off and 1 if backlight is on.
Function returns data if everything is OK. In case of error the function returns "?". You can use Phidget_Get("lastError") for more detailed error description.
Phidget_Get("attachedDevices")
This will return the number of attached devices. If no phidget is attached to the machine it will return 0. It is a good command to start with to check if any phidget is connected.
Phidget_Get("serialNumber" ; 3)
If you have four Phidgets connected to the machine this will return the serial number of the fourth one. Use this command in the loop (along with previous one) to enumerate serial numbers of all Phidgets connected to the machine.
Phidget_Get("deviceType" ; 69418)
This will check the connected phidget with SN 69418 and returns its type. The types are textual in human readable form. For the supported types the result can be: "PhidgetInterfaceKit", "PhidgetRFID" and "PhidgetServo". In general the type names are the same as the official ones.
Phidget_Get("deviceType" ; 120538 ; 1)
This will return device type of given PhidgetSNDevice, however it will try to locate the second type of given PhidgetSNDevice. Example: you have TextLCD combined with InterfaceKit, this allows you to get device type of the second device.
Phidget_Get("enabled" ; 140923 ; 2)
This will check if port 2 on Phidget Bridge is enabled. Port has to be enabled, if we want to read data.
Phidget_Get("dataRateMin" ; 140923)
This will return minimal rate in Phidget Bridge. Value is in ms and if you set data rate, it should be lesser or equal.
Phidget_Get("numColumns" ; 120538)
This will return number of columns of Text LCD with SN 120538.
Phidget_Get("numRows ; 120538)
This will return number of rows of Text LCD with SN 120538.
Phidget_Get("numRows" ; 329701 ; 1)
This will return number of rows of LCD connected to TextLCD Adapter to port LCD-1 with SN 329701.
Phidget_Get("contrast" ; 120538)
This will return current value of contrast of Text LCD with SN 120538.
Phidget_Get("brightness" ; 120538)
This will return current value of brightness of Text LCD with SN 120538.
Phidget_Get("backlight" ; -1)
This will return backlight status of the first found Text LCD.
Phidget_Get("backlight" ; 120538)
This will return current value of backlightm brightness (within range of 0-255) of Text LCD with SN 120538.
Function to set plug-in or phidget settings and other useful data.
what | Which data should be set. |
value | The new value. |
phidgetSNdevice | Identification of device |
index | Index of changed value. |
what | Phidget type | Description |
---|---|---|
"ratiometric" | Interface Kit | Sets phidget ratiometric. The phidget with ratiometric will measure more precise if ratiometric sensor (marked with R) is attached. |
"antennaOn" | RFID | Sets the status of the antenna of the RFID reading device |
"ledOn" | RFID | Sets the status of the LED |
"backlight" | TextLCD | Sets the state of the backlight. Possible values are 1 and 0. Sets the backlight brightness. Possible values are 0-255. |
"brightness" | TextLCD | Sets the brightness of the backlight. Not supported on all TextLCDs. Possible values of brightness are 0-255. This parameter is deprecated since version 3.0, please use "backlight" instead. For backward compatibility, setting this parameter behaves the same way as setting the "backlight". |
"contrast" | TextLCD | Sets the contrast value. Possible values of contrast are 0-255. |
"cursorOn" | TextLCD | This allows to turn on/off cursor |
"cursorBlink" | TextLCD | If cursor is on, then you can turn on/off its blinking |
"enabled" | Bridge and Analog | This will enable port on given index |
"gain" | Bridge | This will allow you to set gain of data from the bridge |
"dataRate" | Bridge | This will allow you to set data rate of incomming data |
"motorOn" | Servo and Stepper | Turns a Motor On & Off. Before you turn servo on, first you have to configure target position. |
"servoMax" | AdvancedServo | Allow to set minimal value for servo (prevents servo from being damaged) |
"servoMin" | AdvancedServo | Allow to set maximal value for servo (prevents servo from being damaged) |
"portMode" | VINT Hub | Sets the hub port mode. Possible values are "digitalOutput", "digitalInput", "voltage", "voltageRatio", "vintDevice". Default value for hub port is "vintDevice" mode. Hub Port will ignore all VINT devices if it is not set to VINT device mode. Only one mode is active at time. Setting mode unsets all other modes. |
"minAcceleration" | Stepper | Set minimal possible acceleration |
"maxAcceleration" | Stepper | Set maximal possible acceleration |
"controlMode" | Stepper | Set motor mode, possible values are "step" (motor will move to given position) and "run" (continuos movement). After you set controlMode you should also reset velocity, acceleration and target position. |
"acceleration" | Stepper | Set current acceleration of stepper |
"velocity" | Stepper | Set current velocity of stepper |
"currentLimit" | Stepper | Set the current limit. Current limit allows to control maximal power output for given Stepper. |
"correctionTemperature" | PH Sensor | Set value for correction temperature for PH Sensor |
"screenSize" | TextLCD Adapter | Set screen size of LCD connected to the adapter. Possible values are: "2x20", "2x40", "4x20" |
"activeScreen" | TextLCD Adapter | Set the active LCD connected to TextLCD Adapter. Before you can write to LCD connected to the TextLCD Adapter, you should set the LCD as active screen. Use value "1". |
Use this funtion to set various value on Phidgets.
Function returns set value if everything is OK. In case of error the function returns "?". You can use Phidget_Get("lastError") for more detailed error description.
Phidget_Set("ratiometric" ; 1 ; 69418)
This will set the ratiometric value to 1 (turns on) in the phidget with SN 69418. This phidget must be interface kit phidget otherwise "?" is returned.
Phidget_Set("ratiometric" ; 1 ; -1)
This will set the ratiometric value to 1 (turns on) in the first phidget it founds. This phidget must be interface kit phidget otherwise "?" is returned. Use this form if you have only one phidget connected to the computer and you are sure that you will never connect any other phidget otherwise the result can be unpredictable.
Phidget_Set( "backlight" ; 1 ; 120538)
This will set the state of the backlight. Possible values 0 (off) or 1 (on).
Phidget_Set( "backlight" ; 127,5 ; 120538)
This will set the backlight brightness value. Possible values 0-255.
Phidget_Set( "contrast" ; 155 ; 120538)
This will set the contrast value. Possible values 0-255.
Phidget_Set( "motorOn" ; 1 ; 170192 ; 3)
This will turn on the fourth motor.
Phidget_Set( "motorOn" ; 0 ; 170192 ; 0)
This will turn off the first motor.
Phidget_Set( "enabled" ; 1 ; 140912 ; 3)
This will enable port 3 on Bridge.
Phidget_Set( "dataRate" ; 200 ; 140923)
This will set data rate of Phidget Bridge on 200 ms. Be careful - data rate should be between data rate min and data rate max.
Phidget_Set( "enabled" ; 1 ; 131907 ; 3)
This will enable port 3 on Analog (assuming proper phidgetSN was given).
Phidget_Set( "portMode" ; "digitalOutput" ; "335882:3")
This will set digital output mode on port 3 on VINT Hub with serial number 335882. You can use the port as digital output the same way as with the Interface kit.
Phidget_Set( "portMode" ; "vintDevice" ; "335882:3")
This will set VINT device mode on port 3 on VINT Hub with serial number 335882. After you set port, you can connect to the port one of the supported VINT devices.
Phidget_Set( "screenSize" ; "4x20" ; "329701" ; "1")
This example shows how to use PhidgetTextLCD Adapter with LCD Screen 4x20. connected to port LCD-1
This will prepare the plugin for use of the this lcd. Not setting the size before writting to the lcd will lead to unexpected behavior.
Phidget_Set( "activeScreen" ; "1" ; "329701" ; "1")
This will activate lcd connected to the port LCD-1 of PhidgetTextLCD Adapter. After activating the screen you can start use function Phidget_Write with this LCD.
Function to connect to an SBC or a computer running athe Phidget Network Server via network.
address | Address of SBC in network |
password | Password for security |
port | Port of service. In case you wont use, port 50015661 is used. |
Use this function to connect to an SBC or Phidget Network Server.
Function return 0, if everything OK, if function returns "?". You can use Phidget_Get("lastError") for more detailed error description. However, even if function returns 0, it doesn't mean that SBC is already connected. If you have slow network, then it can take some time. Connected SBC will trigger "onAttach" script (if set).
Phidget_Connect("10.0.3.51" ; "111111")
Try to establish connection to address 10.0.3.51 with password "111111" on port 50015661.
FileMaker example of using this feature can be found here.
Function to disconnect from an SBC or a computer running athe Phidget Network Server.
address | Address of SBC in network |
Use this function to disconnect from an SBC or Phidget Network Server.
Function return 0, if everything OK, if function fails - it returns "?". You can use Phidget_Get("lastError") for more detailed error description.
Phidget_Disconnect("10.0.3.51")
Disconnects from address 10.0.3.51.
There are several different ways to identify a Phidget device:
Type | Example | Description |
---|---|---|
Phidgets SN | 335882 | Use Phidget serial number for Phidgets connected directly to computer or SBC (Single Board Computer). |
First available | -1 | Use value -1 for the first available device. |
Phidgets SN + ":" + VINT port | 335882:4"335882:4" | Use Phidget serial number and VINT port for Phidgets connected via VINT hub. |
Please note that if the Phidgets is connected via network, you will have to use Phidget_Connect function first.
This section explain tag protocols used for writing on RFID tag.
Tag protocol specifies, which format of input data is accepted. Table below shows supported protocols.
Tag protocol | Accepted value |
---|---|
PHIDGETS | Strings or numbers (integer) |
ISO11785_FDX_B | Strings with 15 numbers (3 state code, 12 animal code) |
EM4100 | Strings of 10 hexadecimal numbers (0-f) |
-50 | Parameter error | Means paramErr, Phidget_ has wrong parameters. |
-36 | Missing RFID tag | Returned when RFID Reader / Writer has no RFID tag to read / write. |
-37 | Antenna is off | RFID Reader is not able to provide this functionality with antenna off. |
-23 | Invalid Script Name | Returned when plugins function Phidget_SetScriptEvent can't find script in the file |
1 - 1000 | Phidget Library errors | You can get error description by calling Phidget_Get("lastErrorMessage"). |
24001 | Demo mode expired | If you want to keep using the plug-in, you must register it or buy it for particular environment. |
24002 | Product expired | Trial period is over. If you want to keep using the product, you must buy it for particular environment. |
24003 | SN limit was met | The serial number is already registered on too many computers. |
24004 | Product is dead | The product expired and cannot be used any more. Please download the new version from 24U Software. |
24005 | Invalid serial number | Serial number you entered is not valid. |
24006 | Activation failed | Activation failed probably due to some network error. Please, check your connection to the internet and try again later. |
24007 | Deactivation failed | Deactivation failed probably due to some network error. Please, check your connection to the internet and try again later. |
24008 | Unknown serial number | The given serial number cannot be used for the current product. It has been stored so that other product can try to use it. |
24009 | Blacklisted serial number | The given serial number has been blacklisted and cannot be used anymore. Please, contact 24U Support if you need more information. |
24010 | eSellerate engine not installed | This product uses eSellerate to validate user registration and purchases, but its installation failed. Please, reboot the computer or try again later. |
24011 | Device limit met | The purchased license has a limitation of used devices. |