Start of trail Channels navigation bar

Table of Contents

Clocks

The HIL Buffered I/O, HIL Timebase and HIL Stream blocks all have a Clock parameter, as do the HIL MATLAB functions for buffered I/O and tasks. The Clock parameter determines the source of the timing for these blocks and functions. Clocks come in two major categories: system clocks and hardware clocks.

System Clocks

System clocks are provided by the operating system. System clocks, in general, may be used by more than one HIL block or function at the same time. In Windows, only one system clock is supported:

SYSTEM_CLOCK_1

A system clock supporting rates up to 1 kHz on Windows and up to 100 kHz on QNX (although 100 kHz may not be achievable).

Under RTSS, three system clocks are supported:

SYSTEM_CLOCK_1

A system clock supporting rates up to 1 kHz.

SYSTEM_CLOCK_2

A system clock supporting rates up to the HAL timer period (10 kHz limit).

SYSTEM_CLOCK_3

A system clock supporting rates up to the HAL timer period (10 kHz limit).

Hardware Clocks

Hardware clocks are provided by the HIL board itself. Hardware clocks, in general, may be used by only one HIL block or function at the same time. This exclusion is particularly true of the HIL Timebase and HIL Stream blocks, and the HIL task functions. Two HIL buffered I/O blocks or functions may share a hardware clock provided they are not using the clock at the same time.

The number of hardware clocks available depends on the HIL board selected. For the Q8 card, for example, two hardware clocks are available: HARDWARE_CLOCK_0 and HARDWARE_CLOCK_1.

The range of sampling frequencies supported by a hardware clock also depends on the HIL board selected. The Q8 card's hardware clocks have 60 ns resolution so fast sampling rates are supported, limited only by the speed of the CPU and the hardware configuration of the computer.

 

navigation bar