Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN Serie2/Driver2.1.2: Periodic Frame stops unexpectedly

I configured my CAN board to send a periodic frame (ID=0x036) with a period of 100ms.
Sometimes the can board stops sending the periodic frames unexpectedly.
I never had this problem with my old board (serie1 / driver 1.6) with the same application.
I have the problem with the new CAN board Serie2 / Driver 2.1.2
0 Kudos
Message 1 of 10
(5,165 Views)
Are you using the frame or channel API?
Are you getting any error messages?
Are you performing any other CAN operations, like writing?
Are you updating the message?
Have you check the transmit and receive error counters (get property) to see if you're entering an error state?
0 Kudos
Message 2 of 10
(5,165 Views)
I am using the Frame API.
I am using an old application under Labview 6.1.
This application has been running for months without any problem on a CAN board Serie1 with CAN drivers 1.6.
In this application there are also write operations (single frames) and read operations (with can objects configured in "receive unsolicited" mode).
The periodic message is sent every 100ms. Its data are never updated during all the test.
I checked the CAN bus load: it is always under 10% during the test.
I have inserted the "get properties" function to check the CAN network object state:
Transmit Error Counter = 0
Receive Error Counter = 0
Transceiver Mode = 0 (Normal mode)
Write entries pending = 50 (corresponds to my write queue length!!!)
The CAN write queue is Ful
l!
I observed that no more frame is sent on the CAN bus.
I obtain the error (-1074388984 = Write error)
0 Kudos
Message 3 of 10
(5,165 Views)
It sounds like there are no CAN devices acknowledging your messages. (Some devices are listen-only devices or can be set to listen-only.) If no devices acknowledge your message, the message stays in the write buffer and gets sent repeatedly until a device does acknowledge it. Meanwhile your single frame writes can't be sent and are overflowing the buffer. Here's what you can do:

A) Configure your device to acknowledge messages, or
B) Attach another device to the network to acknowledge messages. (ie You can attach another NI CAN port to the bus and just configure a network interface object with a comparator of CFFFFFFF.)

If this does not work, let me know what happens. By the way, if you never write any of the single frames, do your period
ic messages still stop?
0 Kudos
Message 4 of 10
(5,165 Views)
I am using a CANalyser in listen only mode to check all the frames on the CAN bus.
There are 4 CAN devices on my bus:
-> 2 CAN ports on the PXI board (normal mode).
-> 1 CAN device which is my unit under test (normal mode).
-> 1 CANalyser (listen only mode).
I checked the bus communication with the CANalyser.
The frames are acknowledged correctly.
The frames are not auto repeated. They are just not sent on the bus (no signal).
There is no error frame on the bus.
I have tested 2 different PXI systems in the same configuration (same bus, same devices, same program):
PXI 1: CAN board 8460/2 serie1 (drivers 1.6)
PXI 2: CAN board 8460/2 serie2 (drivers 2.1.2)
--> PXI 1: no problem after 50 hours.
--> PXI 2: CAN error in less than 1 ho
ur.
0 Kudos
Message 5 of 10
(5,165 Views)
That is very strange. I want to see if I can reproduce this behavior.
  • On PXI 2, does the port stop transmitting if you run the CAN Transmit - Perodic example program? (Help»Examples»Hardware Input and Output»CAN»Frame API)
  • As a test, if you swap out the series 2 card with the series 1 card does the series 1 board exihibit the same behavior with the 2.1.2 driver?
  • If you sent me your program, could I run it by simulating your device with a CAN port running bus monitor? If not, can you modify your code so I can?
  • Can you post a Spy capture of your program running? (Please also list or post a screenshot of the parameters passed to ncConfigCANNet and ncConfigCANObj since spy only records a pointer to the paramet
    ers and not the paramers themselves.) NI Spy Tutorial

0 Kudos
Message 6 of 10
(5,165 Views)
Do you by any chance start and stop your network interface? In NI-CAN 2.1 and later, ncAction Start/Stop is supported only on the Net Interface.
0 Kudos
Message 7 of 10
(5,165 Views)
I replaced the series 2 board with a series 1 board in the new PXI system.
-> same program
-> same drivers (2.1.2)
-> the only difference is the CAN board.
I did not reproduce the problem.
0 Kudos
Message 8 of 10
(5,165 Views)
Yes. I am using theses functions.
I already detected that they were not supported in the new drivers. I have reported the problem and I have obtained patches from NI support to fix the problem.
I also modified my program not to use theses functions.
I still have the same problem, even with the original driver 2.1.2 (with no patch).
0 Kudos
Message 9 of 10
(5,165 Views)
NI R&D is currently working on your issue and have requested NI-Spy logs. I will email you directly so your logs will not have to be posted in a public forum.

Note: If anyone else is reading this thread at a later date and have a similar issue, please create a new discussion forum thread and include the link to this discussion thread.
0 Kudos
Message 10 of 10
(5,164 Views)