Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old


Enables the failsafe feature for the channel, with a given failsafe time.

Component Version macOS Windows Linux Server iOS SDK
Phidget 13.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ❌ No
MBS( "Phidget.EnableFailsafe"; PhidgetRef; failsafeTime )   More


Parameter Description Example
PhidgetRef The reference number for the phidget. $phidget
failsafeTime Failsafe timeout in milliseconds. 2000


Returns OK or error.


Enables the failsafe feature for the channel, with a given failsafe time.
The failsafe feature is intended for use in applications where it is important for the channel to enter a known safe state if the program controlling it locks up or crashes. If you do not enable the failsafe feature, the channel will carry out whatever instructions it was last given until it is explicitly told to stop.
Enabling the failsafe feature starts a recurring failsafe timer for the channel. Once the failsafe timer is enabled, it must be reset within the specified time or the channel will enter a failsafe state. The failsafe timer may be reset by sending any valid command to the device*. Resetting the failsafe timer will reload the timer with the specified failsafe time, starting when the message to reset the timer is received by the Phidget.
*(get requests do not typically send commands and won't reset the failsafe timer)
For example: if the failsafe is enabled with a failsafe time of 1000ms, you will have 1000ms to reset the failsafe timer. Every time the failsafe timer is reset, you will have 1000ms from that time to reset the failsafe again.
If the failsafe timer is not reset before it runs out, the channel will enter a failsafe state. For DC Motor channels, this will disengage the motor. Once the channel enters the failsafe state, it will reject any further input until the channel is reopened.
To prevent the channel from falsely entering the failsafe state, we recommend resetting the failsafe timer as frequently as is practical for your application. A good rule of thumb is to not let more than a third of the failsafe time pass before resetting the timer.
Once the failsafe timer has been set, it cannot be disabled by any means other than closing and reopening the channel.

For DCMotor, DigitalOutput, PowerGuard, RCServo, Stepper, VoltageOutput, PositionController, or BLDCMotor only.

See also

This function is free to use.

Created 16th August 2023, last changed 16th August 2023

Phidget.DisableServerDiscovery - Phidget.EnableServerDiscovery