Sets the state that the analog 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 WatchdogSetAnalogExpirationState ( _
	channels As Integer(), _
	voltages As Double() _
)
C#
public void WatchdogSetAnalogExpirationState(
	int[] channels,
	double[] voltages
)
Visual C++
public:
void WatchdogSetAnalogExpirationState(
	array<int>^ channels, 
	array<double>^ voltages
)
JavaScript
function watchdogSetAnalogExpirationState(channels, voltages);

Parameters

channels
Type: array< System..::.Int32 >[]()[]

An array containing the numbers of the analog 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: .

voltages
Type: array< System..::.Double >[]()[]

An array in which each element contains the analog voltage 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

The WatchdogSetAnalogExpirationState method sets the state that the analog outputs will be set to if the watchdog expires. Most cards do not allow this state to be configured. The expiration states must be set prior to starting the watchdog timer using the WatchdogStart(Double) method.

The Quanser Q8-series cards may be configured to reset the analog outputs to 0V. In this case, the digital outputs must also be configured to go tristate. If no expiration states are configured for the Q8-series, then the analog and digital outputs will not be reconfigured when the watchdog expires.

Examples

This example configures the first three analog outputs to go to 0V upon watchdog expiration. Exceptions are ignored for simplicity.
C# Copy Code
int []    channels = { 0, 1, 2 };
double [] voltages = { 0, 0, 0 };

card.WatchdogSetAnalogExpirationState(channels, voltages);
Visual Basic Copy Code
Dim channels() As Integer = {0, 1, 2}
Dim voltages() As Double = {0, 0, 0}

card.WatchdogSetAnalogExpirationState(channels, voltages)
Visual C++ Copy Code
array<int>^    channels = { 0, 1, 2 };
array<double>^ voltages = { 0, 0, 0 };

card->WatchdogSetAnalogExpirationState(channels, voltages);

Exceptions

ExceptionCondition
Quanser.Hardware..::.HilException If the analog 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 analog state provided is not supported by the card.

See Also