Constructs a Hil object that is not associated with a particular board.
Namespace:
Quanser.HardwareAssembly: Quanser.Hardware.Hil (in Quanser.Hardware.Hil.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Sub New |
C# |
---|
public Hil() |
Visual C++ |
---|
public: Hil() |
JavaScript |
---|
Quanser.Hardware.Hil = function(); |
Remarks
The Open(String, String) method must be called
prior to using any other methods of this object.
Examples
This sample illustrates how to use the default constructor for the Hil class.
C# | Copy Code |
---|---|
try { Hil card = new Hil(); /* Open must be called first since default constructor used */ card.Open("q8"); try { /* ... use card ... */ } catch (Exception ex) { Console.WriteLine("Exception occurred accessing card. " + ex); } card.Close(); } catch (Exception ex) { Console.WriteLine("Exception occurred opening card. " + ex); } |
Visual Basic | Copy Code |
---|---|
Try Dim card As New Hil() ' Open must be called first since default constructor used card.Open("q8") Try ' ... use card ... Catch ex As Exception Console.WriteLine("Exception occurred accessing card. " & ex.ToString()) End Try card.Close() Catch ex As Exception Console.WriteLine("Exception occurred opening card. " & ex.ToString()) End Try |
Visual C++ | Copy Code |
---|---|
try { Hil^ card = gcnew Hil(); /* Open must be called first since default constructor used */ card->Open(L"q8"); try { /* ... use card ... */ } catch (Exception^ ex) { Console.WriteLine(L"Exception occurred accessing card. " + ex); } card->Close(); } catch (Exception^ ex) { Console.WriteLine(L"Exception occurred opening card. " + ex); } |