Stops a running monitor.
Namespace:
Quanser.HardwareAssembly: 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# | |
|---|---|
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 | |
|---|---|
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++ | |
|---|---|
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
| Exception | Condition |
|---|---|
| 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. |