STISIM Drive
(SDL) - TDO - Triggered Digital Output
Sets up parameters for
processing triggered digital outputs. The AO, CAO, DO, and TDO events
are the only way you can control external equipment during a simulation run.
The AO and DO events
work fine when an output must occur at specific instances during the driving
scenario. However there are times when you may want to send a signal to the
external machinery independent of the driving scenario and based on something
that occurred during the simulation run. For this reason, we have supplied a
special digital output event called Triggered Digital Output (TDO).
The TDO event uses the same
hardware as the DI and DO
events, and is limited to outputs on pins 3 through 10 (Port B) of the digital
I/O board. You may use any or all of these pins if you would like.
Additionally, you may use the DO and TDO events at
the same time as long as you do not use the same pin for both a DO and TDO output. Once the TDO event is active it
will continue to be active until the control byte is set to a value of 0. The
simulation events that trigger an output are listed in parameter 1 below.
The way that the TDO event
is implemented, you should be able to turn individual triggers on and off,
change output pins and change the pulse duration at anytime during the
simulation run. Refer to the hardware
configuration section (Additional I/O) for details about the boards that
are supported and configuring them. In addition, if you will be using the TDO
event you must make sure that the digital I/O option has been enabled in STISIM
Drive's configuration. To enable the digital I/O, simply check the box on the I/O controls tab box found in the Configuration
option.
EVENT PARAMETERS:
PARAMETER 1: |
Control byte that tells STISIM Drive what event(s) will trigger a digital output. The control byte must be constructed based on the individual events that can trigger an output. This allows you to group triggered events together and have them all sent across a single pin, or you can specify them individually and have them each sent across their own pin. To set the control byte so that the simulation will trigger on the specified events, the bit position that corresponds to the trigger event, must be set to 1. if not, the event will not trigger an output pulse In the table below, the decimal value for each bit position is listed next to the event trigger. You specify multiple events with 1 trigger by adding these values together and using this value as parameter 1. The control byte has the following format:
To turn off any event trigger, simply set its corresponding bit to 0, therefore if parameter 1 is set to 0, all triggers will be deactivated. |
||||||||||||||||||
PARAMETER 2: |
Sets the pin that the triggered output pulse will be transmitted on. The allowable values for this parameter are as follows:
|
||||||||||||||||||
PARAMETER 3: |
Duration of the output pulse that will be sent over the digital I/O pin. The length of the pulse will be a function of the simulation frame time and may not be exactly what is specified with this parameter. See the section on simulation timing. |
EXAMPLE:
0,TDO,7,8,.5
Using the TDO example line
shown, any time the driver has any type of accident (collision, off road, or
pedestrian) the simulation will send a .5 second pulse out on pin 3. The reason
it will send a pulse for all types of collisions is because we specified a
value of 7 for parameter 1. The value of 7 was determined by adding the decimal
values for each trigger that we would like to use. This is shown below:
Collision Type: |
Decimal Value: |
Collision with objects: |
1 |
Off road accidents: |
2 |
Pedestrians hit: |
4 |
Total: |
7 |