Sets the mode for the hardware clocks.
    Namespace: 
   Quanser.Hardware
    Assembly:
   Quanser.Hardware.Hil (in Quanser.Hardware.Hil.dll)
 Syntax
Syntax
| JavaScript | 
|---|
| function setClockMode(clocks, modes); | 
Parameters
- clocks
- Type: array<
            Quanser.Hardware..::.Hil..::.Clock
          >[]()[]
 
An array containing the clocks whose modes will be changed. System clocks do not
support different modes so only hardware clocks, such as Hil.Clock.Hardware0,
should be specified.
 
Select a board type from the list for board-specific details:
.
 
- modes
- Type: array<
            Quanser.Hardware..::.Hil..::.ClockMode
          >[]()[]
 An array of clock modes containing the new clock mode for each channel. Each element in 
the modes array corresponds to the same element in the clocks array. 
Hence, there must be as many elements in the modes array as there are channels.
Refer to the Hil..::.ClockMode enumeration for a list of valid clock modes.
Remarks
 Examples
Examples
This sample illustrates how to use the 
SetClockMode(array<Hil..::.Clock>[]()[], array<Hil..::.ClockMode>[]()[]) method.
It configures 
Hil.Clock.Hardware0 as a PWM output.
| C# |  Copy Code | 
|---|
| 
Hil.Clock []     clocks = { Hil.Clock.Hardware0 };
Hil.ClockMode [] modes  = { Hil.ClockMode.Pwm };
board.SetClockMode(clocks, modes);
 | 
| Visual Basic |  Copy Code | 
|---|
| 
Dim clocks() As Hil.Clock = {Hil.Clock.Hardware0}
Dim modes() As Hil.ClockMode = {Hil.ClockMode.Pwm}
board.SetClockMode(clocks, modes)
 | 
| Visual C++ |  Copy Code | 
|---|
| 
array<Hil::Clock>^     clocks = { Hil::Clock::Hardware0 };
array<Hil::ClockMode>^ modes  = { Hil::ClockMode::Pwm };
board->SetClockMode(clocks, modes);
 | 
 Exceptions
Exceptions
| Exception | Condition | 
|---|
| Quanser.Hardware..::.HilException | If the clock modes cannot be set then an exception is thrown. This situtation
typically arises when the card does not support one of the modes specified. | 
 See Also
See Also