capl

createGlobalMarker() function is not allowed within the current context


I am attempting to use the function createGlobalMarker() in a CAPL script of a CANalyzer configuration. The script is inserted on the Send branch of the configuration.

I am sending frames with periodic content/rate and I'd like to log a marker whenever I'm switching from one signal of the frame to another.

This is a poor man's test setup of sorts.

So far, I cannot use this function in switch cases, timers and signal reception. The documentation only provides an example of the on key event, but doesn't describe where the function can be used.

So the question is: where can I use the function? Does it have something to do with my configuration?


Solution

  • As stated in the documentation, the function can only be used in CANalyzer Analysis Branch, the equivalent of CANoe's measurement setup.

    I.e. right of the Offline/Online switch.

    You seem to have placed it in the transmit branch.

    As a rule of thumb, everything that is solely related to analysis has to go to the measurement setup.