CANalyzer CAPL: determine if bus sleep (no messages on bus)

1.4k views Asked by At

I am using CANalyzer 7.0 and an trying to figure out how to determine in CAPL if the CAN bus has gone to sleep (no more messages being sent). How can I do this?

I tried to read BusLoad using sysGetVariableInt() but it always returned zero. Perhaps I had the wrong namespace/variable name. Where can I find all system variables?

Edit - I've tried this:

BusLoad = sysGetVariableInt("_Statistics", "CAN1::Busload");

I've also tried changing the namespace but not sure where to find list of system namespaces.

1

There are 1 answers

9
MSpiller On

Accessing statistics via system variables was introduced with CANalyzer/CANoe version 8.0.

As your are using version 7.0, try the following:

BusLoad = canGetBusLoad(1);

Starting from version 7.1, you would use:

BusLoad = CAN1.BusLoad;

From 8.0 onwards, you can use the systemvariables as in your initial question.

To answer your second question, you can get a list of all system variables from the Symbol Explorer.