Skip to main content
Open topic with navigation

triggerEx

CAPL Functions » General » Function Overview » triggerEx Valid for: CANoe DE • CANoe:lite DE • CANoe4SW DE • CANoe4SW:lite DE

Function Syntax

void triggerEx(char name[]);

Description

Sends a trigger event to a CANoe DE product Logging or Trigger Block specified by name. For a Logging Block, the trigger event starts and stops logging, depending on
  • the trigger mode (single or toggle trigger)
  • the trigger conditions for toggle on and toggle off
set in the Trigger Configuration dialog of this block. For a Trigger Block, the trigger event starts and stops the data stream (like a filter) for the whole analysis branch or a single analysis window, depending also on trigger mode and trigger conditions in the Trigger Configuration dialog. If you enter no name, the event will be sent to all Trigger and Logging Blocks that are located behind the CAPL node with the CAPL function triggerEx() in the Measurement Setup. If you want the CAPL node to have effect on all Trigger Blocks, the CAPL node has to be placed directly after the online/offline switch. Note: Please note help of the Trigger Condition: CAPL

Parameters

  • name: Name of the Logging or Trigger Block. Note: If you use the function in standalone mode and if you activated logging and Trigger Block in the standalone mode configuration settings you can address the (single) Trigger Block available in this case by passing an empty string as parameter.

Return Values

Example

on message 100 
{
  write("logging starts in Logging Block ""Logging""");
  triggerEx("Logging"); // start logging
  setTimer(logging,1000); // for 1000 ms
}

on timer logging
{
  triggerEx("Logging"); // Stop logging
}
triggerstop