Documentation Home Page RT-LAB Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.



Model Configuration, Acquisition


Set the acquisition trigger dynamically during the simulation. Data will be acquired only when a specific signal is triggered.

The option of starting data acquisition only once a specified threshold is reached allows users to obtain information about a specified time-slice of the simulation.

If a block OpTrigger is present in the model when activating the dynamic acquisition, the triggering will be set to the value of parameters provided by SetAcqTrigger.

When the parameter “triggerEnabled” in the SetAcqTrigger interface is set to zero, the block OpTrigger will regain the triggering control once again.

Required Control

Acquisition Control


RtlabApi.SetAcqTrigger( acqGroup, signalName, level, trigSignalName, offset, condition, triggerEnabled, trigType)


  • acqGroup: Acquisition group (numbering starts at 0).

  • signalName: Name of the signal to be triggered.

  • level: Specifies the value that must be reached by the trigger signal to trigger acquisition.

  • trigSignalName: Specifies a triggering signal instead of a constant value. If “level” is specified then trigSignalName must be NULL.

  • offset: Used to set the number of steps (cycles) to wait before starting the acquisition system.

  • condition: Condition to be satisfied so that the acquisition system is triggered. See OP_TRIGGER_CONDITION.

  • triggerEnabled: Indicates the status of the trigger: (1/0 = Enable/Disable).

  • trigType: Indicates the trigger type : TRIG_BY_SIGNAL(0) / TRIG_BY_VALUE(1).




  • EOK: success.

  • EACCES: error saving parameters to .probe file.

  • EBADF: Model not specified by previous Connect or OpenProject.

  • EINVAL: invalid acquisition group.

  • EIO: Error sending the request or receiving the reply.

  • ENOMEM: Memory allocation error.

  • EPERM: System control has not been granted to this client.

  • OP_API_EBAD_SIGNAL: The given signal is invalid.



Related Items



import RtlabApi

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | | +1 514-935-2323