CAPL Script

Set Ocr

This reference collection includes Vector documentation reproduced with permission. Snippets may require configuration-specific symbols and are not all standalone programs. Sources and validation limits.

Syntax

setOcr(long channel, byte ocr);

Function

Sets the Output Control Register. The values do not become active until the next call of the functionresetCan(). It should be noted that these values depend on the CAN platform used.

Parameters

CAN channel

OCR

Value of the Output Control Register

Return Values

1: success

0: error

Reference example from the CANoe 12 help. This is an incomplete context fragment: omitted surrounding code is shown as comments. Do not paste it as a complete program.

// ... surrounding context omitted

setOcr(0, 0x02); // set
resetCan(); // activate
// ... surrounding context omitted

resetCan | setBtr