Information

static HIL.get_version()

Returns the version of the Quanser HIL API that is installed.

Raises

HILError – On non-zero return code. A suitable error message may be retrieved using get_error_message.

Returns

A version structure.

Return type

Version

Example

>>> from quanser.hardware import HIL
>>> version = HIL.get_version()
HIL.is_valid()

Determines if the given board handle is valid. A board handle is valid if it was opened successfully and has not been closed.

Returns

True if the given board handle is valid; False otherwise.

Return type

bool

Example

>>> from quanser.hardware import HIL
>>> card = HIL("q8_usb", "0")
>>> try:
>>>   is_valid = card.is_valid()
>>>   # ...
...
>>> finally:
>>>   card.close()