Sets the state that the digital outputs will be set to if the watchdog expires.
Namespace:
Quanser.Hardware
Assembly:
Quanser.Hardware.Hil (in Quanser.Hardware.Hil.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Sub WatchdogSetDigitalExpirationState ( _
channels As Integer(), _
states As Hil..::.DigitalState() _
) |
Visual C++ |
---|
public:
void WatchdogSetDigitalExpirationState(
array<int>^ channels,
array<Hil..::.DigitalState>^ states
) |
JavaScript |
---|
function watchdogSetDigitalExpirationState(channels, states); |
Parameters
- channels
- Type: array<
System..::.Int32
>[]()[]
An array containing the numbers of the digital output channels for which the expiration state should be set.
Channel numbers are zero-based. Thus, channel 0 is the first channel, channel 1 the second channel, etc.
Select a board type to the list for board-specific details:
.
- states
- Type: array<
Quanser.Hardware..::.Hil..::.DigitalState
>[]()[]
An array in which each element contains the binary values to which to set the
corresponding channel in the channels array upon watchdog expiration.
This array must be the same size as the channels array.
Remarks
Examples
This example configures the first three digital outputs to go tristate upon watchdog expiration.
Exceptions are ignored for simplicity.
C# | Copy Code |
---|
int [] channels = { 0, 1, 2 };
Hil.DigitalState [] states = { Hil.DigitalState.Tristate, Hil.DigitalState.Tristate, Hil.DigitalState.Tristate };
card.WatchdogSetDigitalExpirationState(channels, states);
|
Visual Basic | Copy Code |
---|
Dim channels() As Integer = {0, 1, 2}
Dim states() As Hil.DigitalState = {Hil.DigitalState.Tristate, Hil.DigitalState.Tristate, Hil.DigitalState.Tristate}
card.WatchdogSetDigitalExpirationState(channels, states)
|
Visual C++ | Copy Code |
---|
array<int>^ channels = { 0, 1, 2 };
array<Hil::DigitalState>^ states = { Hil::DigitalState::Tristate, Hil::DigitalState::Tristate, Hil::DigitalState::Tristate };
card->WatchdogSetDigitalExpirationState(channels, states);
|
Exceptions
Exception | Condition |
---|
Quanser.Hardware..::.HilException |
If the digital expiration states cannot be set then an exception is thrown. This situtation
typically arises if the board does not support a watchdog timer, or the digital state provided
is not supported by the card.
|
See Also