13.07.2015 Views

VCI - Virtual CAN Interface - Ixxat

VCI - Virtual CAN Interface - Ixxat

VCI - Virtual CAN Interface - Ixxat

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Accessing the bus3.2.2.1 Controller statesThe following diagram shows the various states of a controller.linControlOpen()undefinedlinControlInitialize()linControlReset()offlinelinControlInitialize()linControlStart(...,TRUE)linControlStart(...,FALSE)linControlReset()onlineFig. 3-9: Controller statesAfter opening the control unit, the controller is normally in an uninitialized state.This state is exited by calling the function linControlInitialize. Then the LIN controlleris in “offline” state.With linControlInitialize, the operating mode and the bitrate of the LIN controllerare set . The bitrate in bits per second is defined in the parameter wBitrate. Validvalues for the bitrate are between 1000 and 20000, or betweenLIN_BITRATE_MIN and LIN_BITRATE_MAX. If the connection supports automaticbitrate detection, this can be activated with LIN_BITRATE_AUTO in the field wBitrate.The following table shows some recommended bitrates:Slow (Bit/Sec) Medium (Bit/Sec) Fast (Bit/Sec)2400 9600 19200The LIN controller is started or stopped by calling the function linControlStart.After successfully calling the function with the value TRUE in the parameter fStart,the controller is in “online” state. In this state the LIN controller is actively connectedto the bus. Incoming LIN messages are forwarded to all active messagemonitors.Calling the function linControlStart with the value FALSE in the parameter fStartswitches the LIN controller “offline”. Message transport is interrupted and thecontroller deactivated.30Copyright 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!