Table of Contents
Host Force Feedback Externally-Triggered Ramp Torque
Produces a ramp torque effect on a game controller on the host that is triggered by an input signal.
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/Ramp Force Effects')Description
The Host Force Feedback Externally-Triggered Ramp Torque block produces a torque on the host game controller in response to the rising edge of the Trigger input that ramps from the starting magnitude to the ending magnitude specified at the block's start and end inputs respectively. The block may be configured to stop the effect on the falling edge of the trigger signal.
The Tx, Ty and Tz inputs define a torque vector whose direction determines the direction of the torque applied by the game controller. The start and end magnitudes and direction of this torque of this torque are updated every time the trigger occurs, according to the inputs to the block. The parameters of the block determine the temporal characteristics of the effect, such as the duration and envelope. 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 a ramp torque effect that is triggered by a signal. If externally-triggered ramp torque effects are supported, a game controller may not support all the axes or features of this block.
Input Ports
Trigger
The signal used to start or stop the effect. Refer to the Trigger mode parameter for details.
Tx
The X component of the direction of the applied torque. 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 Y component of the direction of the applied torque. 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 Z component of the direction of the applied torque. 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')start
The initial magnitude of the normalized torque (-1.0=-maximum, 0.0=no torque, 1.0=+maximum) to apply in the direction specified by the input vector (Tx, Ty, Tz). Negative magnitudes reverse the direction of the applied torque. If an envelope is applied then the torque actually starts at the Envelope attack level and this value is used instead to calculate the ramp torque during the "sustain" portion of the envelope in which the torque ramps linearly.
end
The final magnitude of the normalized torque (-1.0=-maximum, 0.0=no torque, 1.0=+maximum) to apply in the direction specified by the input vector (Tx, Ty, Tz). Negative magnitudes reverse the direction of the applied torque. If an envelope is applied then the torque actually ends at the Envelope fade level and this value is used instead to calculate the ramp torque during the "sustain" portion of the envelope in which the torque ramps linearly.
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 Externally-Triggered Ramp Torque block must be associated with a Host Force Feedback Game Controller block.
Trigger mode
The function of the trigger input to the block. If this parameter is set to "Start" then a rising edge at the trigger input will start the effect. The effect will stop when the effect duration has expired. A falling edge at the trigger input will be ignored.
If this parameter is set to "Start/Stop" then a rising edge at the trigger input will also start the effect. However, the effect will stop when the effect duration has expired or a falling edge is seen at the trigger input.
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.
Number of iterations (tunable online)
The number of times to play the effect in sequence. The envelope is re-articulated with each iteration. If this value is -1 then the effect is played indefinitely.
Envelope attack level (tunable online)
The normalized magnitude (0.0=no torque, 1.0=maximum) of the torque at the beginning of playback. The effect will increase (or decrease) quadratically from this magnitude to the value it would be at the envelope attack time if no envelope were applied.
Envelope attack time (tunable online)
The amount of time in seconds for the magnitude of the effect to increase (or decrease) quadratically from the attack level to the value it would be at the envelope attack time if no envelope were applied. This parameter may be zero.
Envelope fade level (tunable online)
The normalized magnitude (0.0=no torque, 1.0=maximum) of the torque at the end of playback. The effect will decrease (or increase) quadratically from the value it would be at the envelope fade time if no envelope were applied, down (or up) to this fade level.
Envelope fade time (tunable online)
The amount of time in seconds for the magnitude of the effect to decrease (or increase) quadratically from the value it would be at the envelope fade time if no envelope were applied, down (or up) to the fade level. This parameter may be zero.
Effect duration (tunable online)
The total duration of the effect in seconds. It should be larger than sum of the envelope's attack and fade times. The difference between the effect duration and the sum of the attack and fade times determines the time for which the ramp torque is linear and independent of the envelope.
Delay in starting the effect (tunable online)
The time in seconds to delay starting the effect after the trigger has occurred.
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. If this value is zero, the default sampling period is used.
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.