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. With the use of a HIL Read Timebase, time will progress at real-time with 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 (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 your diagram to execute multiple times for each sample 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 sample time to 10kHz and the decimation option in the HIL Initialize to 10 and place a HIL Read Timebase block in your diagram. When the model is executed, the first sample will read and write to the DAQ. The next 9 samples will be executed as quickly as possible (the integrators will assume the correct period of time has passed, but in real-time these steps will be as fast as they can execute). Data from read blocks will be repeated, and write and set blocks will be ignored. The 11th sample will now wait on the hardware timebase, resynchronizing the diagram to real-time. When the hardware timebase occurs, new data will be sampled by the read blocks and the current outputs will be output by the write blocks.

Since this feature affects everything in the diagram, other features which assume synchronization with real-time may also need to be decimated.

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 QBot Platform Target

No

Not supported.

QUARC Linux QCar 2 Target

No

Not supported.

QUARC Linux QDrone 2 Target

No

Not supported.

QUARC Linux Raspberry Pi 3 Target

No

Not supported.

QUARC Linux Raspberry Pi 4 Target

No

Not supported.

QUARC Linux Raspberry Pi ARM64 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