Forum Posts

May 02, 2022
In Help and Getting Started
Hello. I am trying to send command using python-can with usb2can.dll under windows. I can't send the message and I am not sure whether the error is about the code or it's about the command structure. On the screenshot there's an application that successfully sends the command in the Data field to the rmdx8-pro motor. Device Index field here is the number of the usb2can adapter and frame_id field, if I understand it correctly, includes the motor number. bus = Bus(bustype='usb2can', channel="0", bitrate=1000000, dll='usb2can.dll') data = ['0xa7','0x00','0x00','0x00', '0x10', '0x27','0x00','0x00'] bytear = bytes([int(x,0) for x in data]) with bus: msg = can.Message(arbitration_id = 0x143, data=bytear, is_extended_id=False, is_remote_frame=False) try: bus.send(msg, timeout=0.2) print('Success') except can.CanError as e: print(str(e)) The error message I get: could not send message: status == 33. I've also tried to use Usb2canBus from can.interfaces.usb2can.usb2canInterface, but with no success. Can anyone tell me if it is a code issue or do I have a wrong CAN command structure interpretation? Thank you in advance
Unable to send command RMDX8-Pro. Code or command structure problem? content media


More actions