InitialTriggerTime

Absolute time of first trigger

Description

For all trigger types, InitialTriggerTime records the time when Logging or Sending is set to On. The absolute time is recorded as a clock vector.

You can return the InitialTriggerTime value with the getdata function, or with the Data.AbsTime field of the EventLog property.

If you synchronize multiple analoginput and analogoutput objects by setting TriggerType to HwDigitalTrigger and use the same digital trigger signal for all of the subsystems, the InitialTriggerTime property will not show the exact identical time for all subsystems.

Although the actual trigger events occurred simultaneously across all subsystems, the InitialTriggerTime events are recorded serially on a single thread. This causes the discrepancy of a few milliseconds. The time difference between InitialTriggerTime for multiple Data Acquisition Toolbox objects will not be consistent due to operating system process scheduling algorithms.

Characteristics

Usage

AI, AO, common to all channels

Access

Read-only

Data type

Six-element vector of doubles

Read-only when running

N/A

Values

The value is automatically updated when the trigger executes. The default value is a vector of zeros.

Examples

Create the analog input object ai for a sound card and add two hardware channels to it.

ai = analoginput('winsound');
chans = addchannel(ai,1:2);

After starting ai, the trigger immediately executes and the trigger time is recorded.

start(ai)
abstime = ai.InitialTriggerTime
abstime =
1.0e+003 *
    1.9990    0.0020    0.0190    0.0130    0.0260    0.0208

To convert the clock vector to a more convenient form:

t = fix(abstime);
sprintf('%d:%d:%d', t(4),t(5),t(6))
ans =
13:26:20

See Also

Functions

getdata

Properties

EventLog, Logging, Sending

Was this topic helpful?