Platforms to show: All Mac Windows Linux Cross-Platform

Back to PhidgetDigitalOutputMBS class.

PhidgetDigitalOutputMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Phidgets MBS Phidgets Plugin 22.1 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
The constructor.

PhidgetDigitalOutputMBS.enableFailsafe(failsafeTime as UInt32)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Phidgets MBS Phidgets Plugin 22.1 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
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 either by calling this function again, or using the ResetFailsafe function. 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.

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 Digital Output channels, this will set the output state to FALSE. 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 applicaiton. 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.

PhidgetDigitalOutputMBS.resetFailsafe

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Phidgets MBS Phidgets Plugin 22.1 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Resets the failsafe timer, if one has been set. See EnableFailsafe for details.

This function will fail if no failsafe timer has been set for the channel.

PhidgetDigitalOutputMBS.setDutyCycleAsync(dutyCycle as double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Phidgets MBS Phidgets Plugin 22.1 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Sets the duty cycle asynchronously.

The DutyCycle represents the fraction of time the output is on (high).
This will override the State setting on the channel.
A DutyCycle of 1.0 translates to a high output, a DutyCycle of 0 translates to a low output.
This is equivalent to setting a State of TRUE and FALSE respectively.
A DutyCycle of 0.5 translates to an output that is high half the time, which results in an average output voltage of (output voltage x 0.5)
You can use the DutyCycle to create a dimming effect on LEDs.
If the DigitalOutput channel you are using does not support PWM, then this value may only be set to 1.0 or 0.0
You can check if your device supports PWM by checking the ChannelSubclass property, viewable by selecting Phidget API above. Your DigitalOutput channel supports PWM if it is any subclass other than NONE.

calls setDutyCycleAsyncCompleted later.

PhidgetDigitalOutputMBS.setLEDCurrentLimitAsync(LEDCurrentLimit as double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Phidgets MBS Phidgets Plugin 22.1 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
The LEDCurrentLimit is the maximum amount of current that the controller will provide to the output.

Reference the data sheet of the LED you are using before setting this value.

Calls setLEDCurrentLimitAsyncCompleted event later.

PhidgetDigitalOutputMBS.setStateAsync(state as Boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Phidgets MBS Phidgets Plugin 22.1 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Sets the state asynchronously.

The State will dictate whether the output is constantly high (true) or low (false).
This will override any DutyCycle that may have been set on the channel.
Setting the State to true is the same as setting DutyCycle to 1.0, and setting the State to false is the same as setting a DutyCycle of 0.0.

Calls setStateAsyncCompleted event later.

The items on this page are in the following plugins: MBS Phidgets Plugin.


The biggest plugin in space...