没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
CANBus Example
This library gives the user the ability to easily make use of some CAN Bus functionality. The library is optimized
for object oriented programming with Structured Text and graphical programming with languages like CFC.
Therefore it uses internally the system library CAN Bus Low Level.
Product description
This is an easy to use library for CANBus which internally uses the system library CANBus as base. Two
example programs with a different implementation (object oriented in ST and graphical in CFC) are provided
together with this library.
Range of functions
1. Interface IMessageProcessor
All received messages are passed to the MessageProcessor. The method ProcessMessage of
IMessageProcessor must be implemented by the user.
Methods:
ProcessMessage Process the received CAN telegrams
here.
1.1. ICANDriver
CANDriver_11bit and CANDriver_29bit implement this interface. CANSender, CANMaskReceiver,
CANAreaReceiver and CANBusDiagnosis expect a CANDriver instance that implements the ICANDriver
interface.
2. Graphical POUs
The following function blocks are optimized for programming in graphical languages e.g. CFC.
2.1. CANDriver_11bit (FB)
The CANDriver can handle frames with 11bit CAN-IDs. If a CAN Sender gets instantiated with this driver all
messages are sent in 11 bit frames. Any receiver instantiated with this driver will only receive frames with 11 bit
CAN-IDs. In case of a Bus Alarm it’s possible to reset the driver through xResetBusAlarm.
Input:
xEnable BOOL TRUE: action running FALSE: action stopped, outputs xDone, xBusy, xError,
eError, xBusAlarm are reset
xResetBusAlarm BOOL TRUE: Reset the Bus Alarm (applies only if the Bus Driver is in alarm state).
In_Out:
DriverConfig DRIVER_CONFIG Information to setup the CANbus Driver
Output:
xDone BOOL Action successfully completed
xBusy BOOL Function block active
xError BOOL TRUE: error occurred, function block aborts action FALSE: no error
xBusAlarm BOOL Indicates if a Bus Alarm occurred
CANBus Example
1/10
资源评论
光着脚飞奔
- 粉丝: 0
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功