Log Triggers

Instead of immediately starting to log data when the StartLog function is called, a trigger can be specified. If a trigger is specified, the log data will start to be collected when the trigger is satisfied.

Triggers are specified using the LogChannelOptions class that is passed using the SetLogOption function.

Condition Trigger

To set a condition trigger, set triggerOnCondition to 1.

For each module that can collect log data, a different condition is checked. The conditions are listed in the following table.

Module

Description

CoreMotion

If at least one data from the CoreMotionLogInput class is logged, then the trigger is satisfied when any of the following occurs.

  1. The position command changes for one of the Position mode axes that are logged.

  2. The velocity command changes for one of the Velocity mode axes that are logged.

  3. The torque command changes for one of the Torque mode axes that are logged.

Log

No trigger condition is associated with this module.

IO

No trigger condition is associated with this module.

UserMemory

No trigger condition is associated with this module.

Platform

For additional information, see each Platform page.

Event Trigger

To set an event trigger, set triggerOnEvent to 1 and triggerEventID to the event ID of the event that will trigger logging.

The SetEvent function is used to set an event and retrieve its event ID.

If both a condition trigger and an event trigger are specified, the log data will start to be collected when either trigger is satisfied.