Getting Started with the HIL C API End of trail navigation bar

Table of Contents > QUARC > User's Guide > QUARC External Interfaces > C Functions > Hardware > HIL API

HIL C API Function Reference

Quanser provides a whole suite of functions for using the features of supported data acquisition hardware from the C language. There are functions for configuring the hardware and performing both synchronous and asynchronous I/O in various forms.

The Configuration functions provided by the HIL API give you the ability to open a hardware-in-the-loop card and configure it. For example, the count values, filter frequencies and quadrature modes of encoder inputs may be configured. Likewise, the ranges of analog inputs and outputs may be defined. The Configuration functions set up a card in preparation for I/O.

The Information functions provided by the HIL API give you the ability to get information about the version of the HIL API currently installed and to check the validity of a card handle.

The simplest I/O functions of the HIL API allows single samples to be read or written immediately from the data acquisition card. This form of I/O is called "immediate I/O" and is supported by the Immediate I/O functions of the HIL API. This form of I/O is useful in control applications for writing computed motor torques to analog outputs, for example.

Traditional data acquisition applications collect a set of samples at a particular sampling rate and then post-analyze those samples for system identification, validation, etc. The HIL API supports such bulk synchronous I/O using its Buffered I/O functions.

Control applications and data streaming applications generally require some form of asynchronous or "overlapped" I/O in which samples are acquired from the hardware in the background while processing of the most recently acquired data occurs in the foreground. The HIL API supplies "tasks" for this purpose. The Task functions provide a simple, yet flexible and powerful, paradigm for control, data streaming, and other high-performance applications.

Finally, safety and robustness are crucial to many applications. The HIL API supports robust software development via its Watchdog functions, which allow the data acquisition hardware to be used for watchdog timers that ensure that software failures do not compromised safety of the application.

The HIL C API functions are both grouped by category and ordered alphabetically. Refer to one of the links listed below for information on the functions provided:

 

navigation bar