Table of Contents
Host Force Feedback Periodic Torque
Produces a periodic torque effect on a game controller on the host.
Library
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
qc_open_library('quarc_library/Devices/Peripherals/Host/Force Feedback Game Controllers/Periodic Force Effects')Description
The Host Force Feedback Periodic Torque block produces a periodic torque on the host game controller. The periodic torque may take the form of a square wave, sine wave, triangle wave, upward-traveling sawtooth wave or downward-traveling sawtooth wave. The Tx, Ty and Tz inputs define a torque vector whose magnitude and direction determines the amplitude and direction of the periodic torque applied by the game controller. The amplitude and direction of this torque are updated every sampling instant according to the inputs to the block. A Host Force Feedback Game Controller block must be present in the model to configure the game controller.
Limitations
Unused axes
Unused axes should be left unconnected or connected to the
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
doc('Ground')Level of support
Not all force feedback game controllers will support the periodic torque effect. If periodic torque effects are supported, a game controller may not support all the axes or features of this block.
Conditionally-executed subsystems
Force effects are downloaded to the device and implemented by the device itself. Hence, placing this blocking in a conditionally-executed subsystem does not disable the effect when the subsystem is not being executed. Instead of using a conditionally-executed subsystem, set the amplitude of the torque to zero or use a Host Force Feedback Externally-Triggered Periodic Torque block for this purpose.
MATLAB/Simulink R2010a Support
Note that the Host Force Feedback Periodic Torque block available in this build of QUARC 2.1 does not currently support MATLAB/Simulink R2010a. Quanser is currently working on a solution to not only have this block work with MATLAB/Simulink R2010a but also greatly improve its overall performance and capabilities.
Input Ports
Tx
The normalized amplitude of the torque to apply about the X axis (-1.0=-maximum, 0.0=no torque, 1.0=+maximum). The positive X direction is from left to right. If this axis is unused, connect it to a
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
doc('Ground')Ty
The normalized amplitude of the torque to apply about the Y axis (-1.0=-maximum, 0.0=no torque, 1.0=+maximum). The positive Y direction is from left to right. If this axis is unused, connect it to a
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
doc('Ground')Tz
The normalized amplitude of the torque to apply about the Z axis (-1.0=-maximum, 0.0=no torque, 1.0=+maximum). The positive Z direction is from left to right. If this axis is unused, connect it to a
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
doc('Ground')offset
An offset by which to bias the waveform from zero. For example, for a sine wave, the magnitude of the output torque will be equal to:
offset + amplitude * sin(2π*time/period + phase)
phase
The phase in radians of the periodic waveform. See description of the offset input for an example.
period
The period in seconds of the periodic waveform. See description of the offset input for an example.
Output Ports
This block has no output ports.
Parameters and Dialog Box
Controller name
The identity of the associated Host Force Feedback Game Controller block. The Host Force Feedback Periodic Torque block must be associated with a Host Force Feedback Game Controller block.
Effect type (tunable offline)
The type of periodic waveform to generate. The supported types are a square wave, sine wave, triangle wave, upward-traveling sawtooth wave and downward-traveling sawtooth wave.
Effect gain (tunable online)
A normalized gain to apply to the effect. The torques are scaled by this gain before being applied to the device. The gain must be a fraction between 0 and 1 inclusive. This parameter is useful for scaling effects for a different game controller.
Effect sampling period (tunable online)
The sampling period of the effect in seconds. This parameter determines the sampling period of the effect on the device itself. It is not related to the sample time of this block, or to the period of the effect waveform. It is the period at which the magnitude of the effect is updated by the device. If this value is zero, the default sampling period is used.
Sample time
The sample time of the block. A sample time of 0 indicates that the block will be treated as a continuous time block. A positive sample time indicates that the block is a discrete time block with the given sample time.
A sample time of -1 indicates that the block inherits its sample time from its inputs.
To use the fundamental sampling time of the model, set the sample time to qc_get_step_size, which is a QUARC function that returns the fundamental sampling time of the model.
The default sample time is set to -1
because this block typically inherits its sample time from its inputs.
Targets
Target Name |
Compatible* |
Model Referencing |
Comments |
---|---|---|---|
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
Last fully supported in QUARC 2018. |
|
Rapid Simulation (RSIM) Target |
Yes |
Yes |
|
S-Function Target |
No |
N/A |
Old technology. Use model referencing instead. |
Normal simulation |
Yes |
Yes |
See Also
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.