importcanopen# Start with creating a network representing one CAN busnetwork=canopen.Network()# Add some nodes with corresponding Object Dictionariesnode=canopen.RemoteNode(6,'/path/to/object_dictionary.eds')network.add_node(node)# Connect to the CAN bus# Arguments are passed to python-can's can.interface.Bus() constructor# (see https://python-can.readthedocs.io/en/stable/bus.html).network.connect()# network.connect(bustype='socketcan', channel='can0')# network.connect(bustype='kvaser', channel=0, bitrate=250000)# network.connect(bustype='pcan', channel='PCAN_USBBUS1', bitrate=250000)# network.connect(bustype='ixxat', channel=0, bitrate=250000)# network.connect(bustype='vector', app_name='CANalyzer', channel=0, bitrate=250000)# network.connect(bustype='nican', channel='CAN0', bitrate=250000
python canopen_Python canopen包_程序模块 - PyPI - Python中文网
最新推荐文章于 2023-01-03 21:20:38 发布