11-30-2018 02:05 AM - edited 11-30-2018 02:09 AM
I am trying to write 64bit frame into my ECU using USB-8502, but get an error that my payload length is bigger than 8bit.
I use the NI example of CAN Frame Output Stream.VI and just change the data type in the frame to CAN FD and Payload change to 64bit.
How can I change the maximum payload length for CAN FD?
11-30-2018 10:43 AM
In order to use CAN FD you must specify the CAN IO Mode as CAN FD + BRS.
For Stream sessions, the default :memory: cluster uses an IO Mode of CAN 2.0. We can change the in-memory cluster to :can_fd_brs: which will enable the CAN FD+BRS IO Mode.
Pay close attention to the two semicolons that encapsulate the name of the cluster. Both must be present to work. For example, ":can_fd_brs:" will work while ":can_fd_brs" will not due to the missing semicolon.
12-06-2018 11:51 PM
Hello Jefel,
Thank you for your great help and I can send CAN FD frame to my ECU now. But I have another question now.
I add the read message while loop in the same program with write message while loop which have shown in the following picture.
However the speed of the read is very slow and is irregular. For example, sometimes 3s a message. My ECU will send message out 100ms per frame. And when I also use CANoe to monitor the massage in CAN bus, CANoe can get the message normally.
Could you help to find the bug of my program? Thank you.
And I also have another question that when I use CANoe to read and write to my ECU, then I use BUS monitor(only read and no transmit data to ECU) from NI to read only from CAN bus. The BUS monitor will receive message normally but after 1s it will stop CANoe program. But when I set the BUS monitor "listen only", BUS monitor read rate will be slowly and will not stop CANoe program. That's strange.
12-07-2018 10:55 AM
Lets add a session property that will show us if any bus errors are being detected. Add the Interface:Bus Error Frames to Input Stream property to either of the property nodes in your application. This will allow bus errors to be detected.
Bus errors will be read with an ID of zero and a 5 byte payload describing the problem. If there is a problem during the transmission of a frame a Bus error frame will be recorded and then the transmitter of the frame will try to re-transmit it. This can result in high bus loads of bad traffic on the bus that chokes out other traffic.
03-06-2019 03:30 AM
Hi,
I tried the file you upload with USB-8502. The file has no error but the input port does not read any data.
Can anyone tell me where did I get it wrong? I just want an example that can read and write CAN FD data with 64 bytes payload data.
Thanks.