Discussion:
-1074388885, but only sometimes
(too old to reply)
pelle2005
2007-09-18 12:40:07 UTC
Permalink
Hi,i work to make a sequence of test for an electronic unit (for an automotive application). The I/O with the unit
is made by a 6025e board and a CAN board (2 port sw selectable). Sometimes, after a random number of test
(between two consecutive test i turn the key off, and the unit shutdown) i receive the CAN error:
 
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Error -1074388885 occurred at CAN Write (Multi-Chan Single-Samp 1D Dbl).vi
Possible reason(s):
NI-CAN:  (Hex 0xBFF6206B) CAN bus problems (no ack) caused all communications to stop.  This error corresponds to CAN Bus Off state.  Solutions: Verify that cabling is correct, devices are connected and operational, and proper bus power is applied.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
I don't understand why, there aren't a "time rule" that help me to understand, because the error sometimes
appear, sometimes not, sometimes after few test, sometimes after many test, and there aren't a group of test
that specially put this error.Someone have the same problem or know the reason (and the solution)?I don't work with th CAN communication from much time, but i think that probably the error appear because the
CAN card have a several behavior, much more rather than teh unit (the unit support the no-reception of a
certain number of frame, perhaps the CAN card not).
DirkW
2007-09-19 14:10:14 UTC
Permalink
Hi pelle,
 
If you shut down your device under test, there is no Acknowledge anymore for the CAN Frame send by your application. The CAN driver works that it reports a noACK warning immediately after the firmware has detected the noACK. That means if a FrameWrite is not successful because no one acks, the next CANWrite should bring the warning. The Channel APi uses a internal write Queue of 10 frames, thus if the error condition is still there if you write the 10th time, you will get the mentioned error which indicates data loss.
The warning is allways generated only ones if the SJA 1000 CAN controller error counter reaches the 128 . That means the controller tried 16 times to transmit the last frame and was not successful.
You could configure your task to "single shot transmit" using the set attribute function. That means the CAN controller would not retry to transmit a CAN frame if it fails the first time. The next CANWrite would overwrite the last frame.  In this case the error counter would only count if the CANWrite gets executed again. Thus you would get the warning after the 16th CAN write and no error anymore.
On the other hand you would loose all frames written during no ack.
 
If you have configured a sample rate, the warning appears faster depending on your rate, because the driver internaly writes frames without waiting for the CANWrite to execute.
 
Hope that helps
DirkW

Loading...