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.

C-API | OP_ACQGR_SIGNALS

Description

Defines the output structure from signal acquisition functions. The monitoring signals are described as follows:

  • missedData: number of values between two acquisition frame. If the value is 0, there are no missing data between the two frames. Missing data may appear if network communication and display are too slow to refresh the value generated by the model.
  • offset: simulation time when the acquisition started.
  • TargetSimTime: simulation time of the model when the acquisition has been done.
  • SamplePerSec: number of sample/sec received from the target. The calculation is made for one sample. For example, if a model is running at 0.001s, the sample/sec value must not exceed 1000 sample/sec.

Fixed signals are signals displayed at the diagram level, these signals are the input to the console subsystem.

Dynamic signals are Simulink signals within a real-time subsystem and that we can virtually connect to through the RT-LAB API to any acquisition group such as OpComm blocks inside the console subsystem.

Moreover, any element in a signal (as a Simulink signal is a vector of scalar elements) can be addressed separately (see OP_SIGNAL_ID).

Usage

typedef struct {

OP_SIGNAL_INFO* pFixSignals;

unsigned short numFixSignals;

OP_SIGNAL_INFO* pDynSignals;

unsigned short numDynSignals;

double* pValues;

unsigned short numValues;

unsigned short endOfFrame;

unsigned short decimation;

double missedData;

double offset;

double targetSimTime;

double samplesPerSec;

} OP_ACQGR_SIGNALS;

Elements
  • pFixSignals: Pointer to where the API stored the fixed signals.
  • numFixedSignals: Number of fixed signals (number of elements of pFixSignals).
  • pDynSignals: Pointer to where the API stored the dynamic signals.
  • numDynSignals: umber of dynamic signals (number of elements of pDynSignals).
  • pValues: Pointer to where the API stored the acquired signals values (fixed and dynamic).
  • numValues: Number of values (fixed and dynamic signals).
  • endOfFrame: Boolean: true if these are the last samples of a frame.
  • decimation: Decimation factor.
  • missedData: Number of missed data.
  • offset: Simulation time at the first signal acquisition.
  • targetSimTime: Target simulation time.
  • samplesPerSec: Number of samples per second.
ExamplesNone.
Related ItemsOpalGetSignalsForGroup (internal)
Library and Header

WINDOWSLINUX
Static LibraryOpalApi.lib-
Dynamic LibraryOPalApi.dlllibOpalApi.so
Header FileOpalApi.hOpalApi.h

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter