Stops a running monitor.

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

Syntax

Visual Basic (Declaration)
Sub Stop
C#
void Stop()
Visual C++
void Stop()
JavaScript
function stop();

Remarks

The Stop()()() method stops a monitor that is running. A monitor may be stopped at any time. Monitors may also be restarted using the Start()()() method.

Examples

This example illustrates how to stop a monitor. The monitor reads interrupt sources 0-3. 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 an error occurs attempting to stop the monitor then an exception is thrown. This situtation is unlikely to occur if the monitor was successfully started.

See Also