Clocks Analog Inputs Analog Outputs Digital Inputs Digital Outputs Encoder Inputs PWM Outputs Other Inputs Other Outputs Interrupts Watchdog Board-Specific Options Properties Targets See Also navigation bar

Quanser Null Device

The Quanser Null Device is a virtual device that supports an unlimited number of inputs and outputs (though encoders are restricted to 9999 devices). The purpose of the device is to provide minimal support such that models can be developed in the absence of a DAQ card while still implementing the HIL framework. The QUARC driver name for this card is null_device.

Clocks

The Quanser Null Device supports one hardware clock, but it is actually implemented as a software clock. When using the HIL task-based I/O functions, the clock is limited to the accuracy that the system timebase can achieve.

Analog Inputs

The Quanser Null Device supports an unlimited number of analog input channels starting from 0. All inputs return a value of 0.

Analog Outputs

The Quanser Null Device supports an unlimited number of analog output channels starting from 0. Any value can be written.

Digital Inputs

The Quanser Null Device supports an unlimited number of digital input channels starting from 0. All inputs return a value of 0.

Digital Outputs

The Quanser Null Device supports an unlimited number of digital output channels starting from 0.

Encoder Inputs

The Quanser Null Device supports up to 9999 quadrature encoder inputs. All encoder inputs will return the last value set by the hil_set_encoder_counts function (default is 0).

PWM Outputs

The Quanser Null Device driver supports two PWM output channels using its two hardware clocks. Change the mode of a hardware clock to use it as a PWM output. See the section on Clocks above.

The Quanser Null Device supports an unlimited number of PWM output channels starting from 0 in any mode at any frequency.

Other Inputs

The Quanser Null Device supports an unlimited number of other input channels starting from 0.

Other Outputs

The Quanser Null Device supports an unlimited number of other output channels starting from 0.

Interrupts

The Quanser Null Device does not support any interrupt sources.

Watchdog

The Quanser Null Device supports a watchdog based on the system timer. Note that due to variation of the windows system timer as a timebase, the sample times can widely vary based on your computer's performance. It is not unusual to see several milliseconds variation in the sample time which can trigger the watchdog if the watchdog time is set to be within milliseconds of the sample time.

Board-Specific Options

The Null Device only as a single option at the moment:

decimation

Defaults to 1. This is an advanced feature that is designed to allow task reads and writes to only occur every N samples of the hardware timebase. At a decimation of 10 for instance, the DAQ will only read and write once every 10 samples. A typical scenario is that you want to run a simulation of your physical system at a higher resolution than your sample rate (particularly with a slower DAQ). Assume your DAQ is capable of a maximum of 1kHz, but you require the model to be simulated at 10kHz. Set your clock frequency in hil_task_start to 10kHz and the decimation option in the hil_set_card_specific_options to 10. When the task is started, the first sample will read and write to the DAQ. The next 9 samples will be executed as quickly as possible. Data read will be repeated, and writes will be ignored. The 11th sample will now wait on the hardware timebase, resynchronizing the task to real-time. When the hardware timebase occurs, new data will be sampled by the hil_task_read call and the current outputs will be output by the hil_task_write call.

Properties

The Quanser Null Device card does not support any properties.

Targets

Target

Supported

Comments

QUARC Win32 Target

Yes

Fully supported.

QUARC Win64 Target

Yes

Fully supported.

QUARC Linux Nvidia Target

No

Not supported.

QUARC Linux Raspberry Pi 3 Target

No

Not supported.

QUARC Linux Raspberry Pi 4 Target

No

Not supported.

QUARC Linux RT ARMv7 Target

No

Not supported.

QUARC Linux x64 Target

No

Not supported.

QUARC Linux DuoVero Target

Yes

Fully supported.

QUARC Linux DuoVero 2016 Target

No

Not supported.

QUARC Linux Verdex Target

Yes

Fully supported.

QUARC QNX x86 Target

Yes

Last fully supported in QUARC 2018.

Rapid Simulation (RSIM) Target

Yes

Supported with no communication to the hardware.

Normal simulation

Yes

Supported with no communication to the hardware.

See Also

 

navigation bar