13.07.2015 Views

VCI - Virtual CAN Interface - Ixxat

VCI - Virtual CAN Interface - Ixxat

VCI - Virtual CAN Interface - Ixxat

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Interface</strong> description4.3.1.6 canControlInitializeThe function sets the operating mode and bitrate of a <strong>CAN</strong> connection. Thecomplete syntax of the function is:HRESULT canControlInitialize (HANDLE hControl,UINT8 bMode,UINT8 bBtr0,UINT8 bBtr1 );Parameters:hControl[in] Handle of the opened <strong>CAN</strong> controller.bMode[in] Operating mode of the <strong>CAN</strong> controller. For the operating mode, acombination of the following constants can be specified:<strong>CAN</strong>_OPMODE_STANDARD:Accepts <strong>CAN</strong> messages with 11-bit identifiers.<strong>CAN</strong>_OPMODE_EXTENDED:Accepts <strong>CAN</strong> messages with 29-bit identifiers.<strong>CAN</strong>_OPMODE_LISTONLY:<strong>CAN</strong> controller is operated in “List only“ mode.<strong>CAN</strong>_OPMODE_ERRFRAME:Errors are indicated to the application via special <strong>CAN</strong> messages.<strong>CAN</strong>_OPMODE_LOWSPEED:<strong>CAN</strong> controller uses low speed coupling.bBtr1[in] Value for the bus timing register 0 of the <strong>CAN</strong> controller. The valuecorresponds to the BTR0 register of the Philips SJA 1000 <strong>CAN</strong> controllerwith a cycle frequency of 16 MHz.bBtr1[in] Value for the bus timing register 1 of the <strong>CAN</strong> controller. The valuecorresponds to the BTR1 register of the Philips SJA 1000 <strong>CAN</strong> controllerwith a cycle frequency of 16 MHz.Return value:If run successfully, the function returns the value <strong>VCI</strong>_OK, otherwise an errorcode not equal to <strong>VCI</strong>_OK. Further information on the error code is providedby the function.The function resets the controller hardware internally according to the functionComments:canControlReset and then initializes the controller with the specified parameters.The function can be called from every controller status.54Copyright IXXAT Automation GmbH C-API Programming Manual, Version 1.5

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!