Starts the monitor.

Namespace:  Quanser.Hardware
Assembly:  Quanser.Hardware.Hil (in Quanser.Hardware.Hil.dll)

Syntax

Visual Basic (Declaration)
Sub Start
C#
void Start()
Visual C++
void Start()
JavaScript
function start();

Remarks

Monitors do not process any data until they are started. Starting a monitor causes it to begin tracking the interrupts it was configured to watch when the monitor was created.

The monitor will continue to track events until the Stop()()() method is called.

Stop the monitor using the Stop()()() method. Monitors should always be stopped when no longer in use in order to free up any resources required by the running monitor.

Examples

This example illustrates how to start a monitor. The monitor tracks interrupt sources 0-3. It waits for at least one interrupt to occur before stopping. Exceptions are ignored for simplicity.
C# Copy Code
int [] channels = { 0, 1, 2, 3 };

sbyte [] buffer = new sbyte [channels.Length];
Hil.Monitor monitor;

monitor = card.MonitorCreateInterruptReader(channels);
monitor.Start();
monitor.ReadInterrupt(buffer);
monitor.Stop();
Visual Basic Copy Code
Dim channels() As Integer = {0, 1, 2, 3}

Dim buffer(channels.Length - 1) As SByte
Dim monitor As Hil.Monitor

monitor = card.MonitorCreateInterruptReader(channels)
monitor.Start()
monitor.ReadInterrupt(buffer)
monitor.Stop()
Visual C++ Copy Code
array<int>^ channels = { 0, 1, 2, 3 };

array<char>^ buffer = gcnew array<char>(channels->Length);
Hil::Monitor^ monitor;

monitor = card->MonitorCreateInterruptReader(channels);
monitor->Start();
monitor->ReadInterrupt(buffer);
monitor->Stop();

Exceptions

ExceptionCondition
Quanser.Hardware..::.HilException If the monitor cannot be started then an exception is thrown. This situtation typically arises if the required hardware resources are unavailable. The resources may be in use by another monitor or may not be supported by the card.

See Also