Syntax revision: 20, 2022-12-05.
In order for plugin function to work on the server you have to create a config file on server and set the read permission to everyone:
Toolbox pluginBridge For ArduinoBridge For Phidgets functions won't work on server in these cases:
NOTE: If file 24uPluginsAllowedFunctions.txt doesn't exist -> all functions are enabled.
Every line represent one database, first is the name of the database followed by tabulator and then function names separated by '|' (vertical bar).
Or name of the database followed by tabulator and then the word "any" if you want to allow all the plugin functions.
You can find template of 24uPluginsAllowedFunctions.txt in Examples.
In following example:
MyFileMakerDatabaseOnServer.fmp12 any
MyOtherFileMakerDatabaseOnServer.fmp12 Phidget_SetServerEvent|Phidget_Get
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: "Phidget22 - Version 1.3 - Built May 24 2019 10:38:17"
Provides special functionality to operate with plugin serial numbers.Also available as a custom script step.
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. |
Hash | Activate a serial number with a hash received from 24U. Used for offline activation. |
"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. |
"Unregister" | Unregister all serial numbers related to the product and return an error code. |
"ActivationChallenge" | Returns generated challenge string. This string is sent to 24U. |
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( "PHD40C666-4B7B-37PH-Q2E6-1UKY" )
This will register this product with key: "PHD40C666-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.
device | 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.Warning: 24U Phidget Plug-In 1.x compatibility mode is no longer available. If you still maintain tag values that used to be returned by the old version, you may have to re-read the tags before upgrading to this version. |
"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 device 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"; "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.Also available as a custom script step.
device | 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. |
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 |
"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 "?". 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( Device ; "motorPosition" ; 215)
It rotates the servo in PhidgetServo to 215 degrees. Device 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( Device ; "tag" ; "999123456789012"; 0 ; "ISO11785_FDX_B" )
New tag is written. Used tag protocol: ISO11785_FDX_B (See tag protocols for more information.)
Phidget_Write( Device ; "tag" ; "123456789a"; 0 ; "EM4100" )
New tag is written. Used tag protocol: EM4100 (See tag protocols for more information.)
Phidget_Write( Device ; "displayString" ; "Hello World!"; 0)
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( Device ; "displayString" ; "special chars: "& char(224) & char(225) & char(226) & char(227) ; 1)
Special characters on the first row are written. More about special characters can be found here.
Phidget_Write( Device ; "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. This functionality is not implemented for FileMaker Server.Also available as a custom script step.
device | 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 Device 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. Device must be set to "all". | device |
"onDetach" | General | Run the script when some phidget is detached. Device must be set to "all". | device |
"onInputChange" | General | Run the script when default input is changed | device index value |
"onInputChange" | Interface Kit | Run the script when digital input is changed | device 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. | device index value |
"onOutputChange" | Interface Kit | Run the script when output is changed | device index value |
"onTag" | RFID | Run the script when a tag approaches RFID sensor | device index tagBackwardCompatibleString tagValueString |
"onTagLost" | RFID | Run the script when a the sensor losts the connection with a tag | device index tagBackwardCompatibleString tagValueString |
"onOutputChange" | RFID | Run the script when output is changed | device index value |
"onMotorPosChange" | Servo and Stepper | Run the script when the motor position is changed | device index value |
"onBridgeData" | Bridge | Run the script when dataRate time has passed |
device |
"onStepperStop" | Stepper | Run the script when stepper motor stops. | device 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 device, 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( device ; event/time ; "" ).
To remove all events from some phidget call Phidget_SetScriptEvent( device ; "" ; "" ).
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 "?". 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(device ; "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.
This functionality is implemented for FileMaker Server. Tell the plug-in to write the records into the table or run a script when specified event is triggered by the Phidget or in specified time intervals.Also available as a custom script step.
login | User name to access server solution (this account has to have rights for accessing dataAPIFileMaker Data API). |
password | Password to access solution on the master FileMaker Server |
device | Identification of device. |
event | The event when the data should be written or the script should be triggered. Use FileMaker text to describe it. I.e. "onSensorChange". |
time | The time interval on which the data should be written or 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. |
eventType | What event should be triggerd. Either "data" or "script". |
databeseName | The name of the FileMaker solution which contains the tableName or the scriptName. The script will receive a parameter which will contain Device on the first row, channel on the second, and value on the third. |
layoutName | The name of the layout. The script will receive a parameter which will contain Device on the first row, channel on the second, and value on the third. |
tableName | The name of table where the data will be written. |
scriptName | The name of script which should be triggered. The script will receive a parameter which will be based on "params" parameter. |
fields | Fields of the table where data plugin will write data. |
params | String that will be send to script as parameter where key-words: <device>, <channel>, <value> and <timestamp> will be replaced by real device, channel, value and timestamp values. |
index | The index of analog input or output to trigger the script. The data will be written (or script will be triggered) only if the value will exceed changeAmount. If omitted tha data will be will be written (or 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. 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 data will not be written (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 |
---|---|---|
"onInputChange" | General | Store data (run the script) when default input is changed |
"onInputChange" | Interface Kit | Store data (run the script) when digital input is changed |
"onSensorChange" | Interface Kit | Store data (run the script) when the value from connected sensor or VINT sensor is changed. The amount can be set by the changeAmount. |
"onOutputChange" | Interface Kit | Store data (run the script) when output is changed |
"onTag" | RFID | Store data (run the script) when a tag approaches RFID sensor |
"onTagLost" | RFID | Store data (run the script) when a the sensor losts the connection with a tag |
"onOutputChange" | RFID | Store data (run the script) when output is changed |
"onMotorPosChange" | Servo and Stepper | Store data (run the script) when the motor position is changed |
"onBridgeData" | Bridge | Store data (run the script) when dataRate time has passed |
"onStepperStop" | Stepper | Store data (run the script) when stepper motor stops. |
You can choose 1 or more params delimited by ¶.
event | Description |
---|---|
"deviceField=<device>" | The device identification (sn:hubport) will be put into field whose name is "deviceField"deviceField. |
"channelField=<channel>" | The channel will be put into field whose name is "channelField"channelField. |
"valueField=<value>" | Value will be put into field whose name is "valueField"valueField |
"timestampField=<timestamp>" | Date and time when the the event occured will be put into field whose name is "timestampField"timestampField |
"eventField=Outside Temperature" | Text "Outside Temperature" will be put into "eventField" |
When event occures depending on the parameter 'fields' plugin will insert records into the FileMaker table or plugin will try to run the script 'scriptName'. Values for digital input can be "0" or "1" for analog it varies by the type of the event. As mentioned before this function uses FileMaker DataAPI, so it has to be allowed and properly set on the master FileMaker Server. If you run this function on client, nothing happens.
To remove data event call for database MyDatabase Phidget_SetServerEvent("user" ; "password" ; device ; event/time ; "data" ; "DatabaseName" ).
To remove script event call for database MyDatabase Phidget_SetServerEvent("user" ; "password" ; device ; event/time ; "script" ; "DatabaseName").
To remove all data events from some phidget call Phidget_SetServerEvent("user" ; "password" ; device ; event/time ; "data" ; ""; "" ).
To remove all script events from some phidget call Phidget_SetServerEvent("user" ; "password" ;device ; event/time ; "script" ; ""; "" ).
To remove all events from some phidget call Phidget_SetServerEvent("user" ; "password" ;device ; "" ; "" ; "" ; "" ; "").
To remove all events from all Phidgets call Phidget_SetServerEvent("user" ; "password" ; "" ; "" ; "" ; "" ; "").
To remove event(s) call the function with the layoutName parameter empty. Leaving any other parameter empty will make that parameter ignored when matching events to remove (see Examples).
Function returns 0 if event is successfully installed or uninstalled. In case of error the function returns "?". You can use Phidget_Get("lastError") for more detailed error description.
Phidget_SetServerEvent("user" ; "password" ; "355999:1" ; "onSensorChange" ; "data" ; "MyFilemakerSolution" ; "tableWithValuesFromSensor" ; "dateAndTime=<timestamp>¶temperatureSensorID=<device>¶temperature=<value>" ; 0 ; 1)
This will install data event on sensor attached to the VINT hub 355999 on hubport 1. When temperature changes by 1 degree plugin will insert data to the table.
dateAndTime | temperatureSensorId | temperature |
---|---|---|
15/8/2019 13:12:11.232315 | 355999:1 | 25.7 |
15/8/2019 13:55:14.277715 | 355999:1 | 26.9 |
15/8/2019 14:15:22.668791 | 355999:1 | 25.8 |
Phidget_SetServerEvent("user" ; "password" ; "355911" ; "onTag" ; "script" ; "MyFilemakerSolution" ; "Process new tag" ; "dateAndTime=<timestamp>¶rfid=<device>¶tag=<value>")
The script "Process new tag" from solution MyFileMakerSolution will be triggered every time the new RFID tag is in the vicinity of the RFID phidget. The script will receive a parameter: "dateAndTime=15/8/2019 13:12:11.232315¶rfid=355999¶tag=123456".
Phidget_SetServerEvent(Phidget_SetServerEvent("" ; "" ; "355999:1" ; "" ; "" ; "" ; "" )
This will remove all events associated with device 355999:1
Phidget_SetServerEvent(Phidget_SetServerEvent("" ; "" ; "355999:1" ; "" ; "script" ; "" ; "" )
This will remove only script events associated with device 355999:1
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 |
"activeEvents" | Not used | On FileMaker Client returns JSON array of all active ScriptEvents. On Server returns JSON array of all active ServerEvents. |
"connectedSBCs" | Not used | Returns JSON array of all currently connected SBCs. |
"serialNumber" | Phidget Index | Serial number of the device with index specified in "more" parameter |
"deviceType" | Device | Type of the device specified by Device |
"deviceName" | Device/td> | Name of the device specified by Device |
"deviceVersion" | Device | Version of the device specified by Device |
"deviceLabel" | Device | Label of the device specified by Device |
"numInputs" | Device | The number of default inputs |
"numOutputs" | Device | 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 backlight brightness |
"brightness" | TextLCD | 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 specificDevice (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 Device, however it will try to locate the second type of given Device. 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("contrast" ; 120538)
This will return current value of contrast of Text LCD with SN 120538.
Phidget_Get("backlight" ; 120538)
This will return current value of backlightm brightness (within range of 0-255) of Text LCD with SN 120538.
Phidget_Get("connectedSBCs")
This will return currently connected SBCs:
[{ "address": "phidgetsbc.local", "password": "*****", "port": 5661 }]
Phidget_Get("activeEvents")
This will return currently active Script/Server events depending on Client/Server:
[{ "changeAmount": "", "device": "355911", "event": "140", "eventType": "script", "fields": "dateAndTime=<timestamp>\rrfid=<device>\rtag=<value>", "index": "0", "layout": "Attach", "login": "user", "password": "password", "table/scriptName": "Process new tag", "threshold": "" }]Client:
[{ "changeAmount": "10.000000", "device": "69418:0", "event/time": "onsensorchange", "fileName": "iOS.fmp12", "index": "6", "scriptName": "Attach", "threshold": "5.000000" }]
Function to set plug-in or phidget settings and other useful data.Also available as a custom script step.
what | Which data should be set. |
value | The new value. |
device | 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 | |
"brightness" | TextLCD | |
"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. |
"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 |
"serverLog" | None | Turns on/off log for helper app on FMS. Supported values "0" and "1". Default is "0". Path to log file on macOS: "/Library/Application Support/24U/24UPhidgetManager/ServerLog.txt", on Windows: "%public%\24u\24UPhidgetManager\ServerLog.txt" |
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" ; 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( "serverLog" ; "1" )
This will turn on log file on FMS.
Function to connect to an SBC or a computer running the Phidget Network Server via network.Also available as a custom script step.
address | Address of SBC in network |
password | Password for security |
port | Port of service. In case you wont use, port 5661 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 5661.
FileMaker example of using this feature can be found here.
Function to disconnect from an SBC or a computer running the Phidget Network Server.Also available as a custom script step.
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" | 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) |
Since version 16 of FileMaker Pro and FileMaker Pro Advanced new feature called "External script steps" has been added. This feature allows plug-in to offer its functionality as FileMaker script steps.
Following table shows, which functions of plug-in can be also called as script step.
Plug-In function | Script Step |
---|---|
Phidget_Version | Phidget Version |
Phidget_Register | Phidget Register |
Phidget_Connect | Phidget Connect |
Phidget_Disconnect | Phidget Disconnect |
Phidget_Write | Phidget Write |
Phidget_Set | Phidget Set |
Phidget_SetServerEvent | Phidget Set Server Event |
Phidget_SetScriptEvent | PhonePhidget Set Script Event |
-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. |
24099 | Function forbidden on server by configuration. | Hosting friendly functionality related error occurred, get exact issue by calling Phidget_Get("lastErrorMessage") function. |