06-18-2018 10:12 AM
Hello to all,
I am using NI CAN frame API to write and read data from a CAN device , I have no problems with all frames except a frame than has a length of 10 bytes and the problem is that the DataLength of the ncWriteNet function can't be greater than 8 bytes, I would like to have a solution for this problem to send my data,Any suggestion? for example can I divide the frame to 2 parts and send it in two attempts. I am using pci-can/xs2 series 2 as hardware.
Houssemeddine Snoussi
Certified LabVIEW associate Developer | Certified TestStand Developer
Solved! Go to Solution.
06-19-2018 08:54 AM
What kind of product expect a 10 bytes CAN payload?
The CAN standard, that the NI-CAN frame API uses, has a maximum of 8 bytes of payload.
The protocol that your device is using might have a method of transferring more than 8 bytes of data using 2 or more CAN messages. But you need to look at the protocol for that.
06-19-2018 09:47 AM - edited 06-19-2018 09:47 AM
It is an automotive product. one of my CAN frames that I should send to the product has 10 bytes of payloads.
06-19-2018 09:51 AM
The protocole of the product is CAN Low speed bus standard.
06-19-2018 10:47 AM - edited 06-19-2018 10:49 AM
@HoussemeddineSnoussi wrote:
The protocole of the product is CAN Low speed bus standard.
That is not the protocol, that is the CAN hardware/ low level specification.
So now we know that you are running on a Low Speed CAN bus.
What is the name of the protocol that is uses?
What is the product?
06-19-2018 11:01 AM
The protocole is not mentioned in the specification document. I know only that the product is communication using a low speed CAN interface with a specified baudrate. I am communicating with the product successfully . the only problem is that same frames are greater than 8 bytes that I should send them.
The product is a steering wheel of a car.
06-19-2018 11:12 AM
And the specification document is found were?
So it is not a SAE J1939 or CANopen compliant product?
06-19-2018 11:39 AM
There are protocols which run on top of CAN to handle messages longer than 8 bytes, for example Keyword Protocol 2000/ISO-14230. This is commonly used in automotive applications, following the Diagnostics over CAN (DoCAN) specification, ISO 15765, in particular section 2 (and can coexist with J1939 traffic on the same CAN bus). Does your device use this protocol?
06-19-2018 12:27 PM
As others have said this device does not communicate of the CAN2.0 spec established in the 90s for the Frame API. That by definition is limited to 8 bytes in payload. This is covered in my Part 2 CAN Basics blog post, but in various other places like the CAN wiki. Working around this limitation are things like XCP/CCP or the ISO-15765 protocols which sit on top of the standard CAN frame API for doing other things. Several of these protocols are described in Part 8 of my blog. Nothing on XCP or CCP yet from me but NI sells the ECU Measurement and Calibration toolkit which covers this for NI hardware. NI also has the Automotive Diagnostic Command set for other protocols. Both toolkits have free trials but if you are unsure of what CAN is in general then I'm guessing you won't have all the information needed to communicate with these protocols yet. Consult the manufacturer and get more information about what is needed to communicate with the device.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
06-21-2018 06:19 PM
Thank you all for your great response , it's a KWP protocol.