VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN buffer overflow

Hi.

I have a HIL system where I have a Simulink model (dll) running a 1kHz on an RT system with VeriStand. Some outputs from the model is mapped directly to CAN signals. Theese CAN messages are sent periodically typically at 10, 50 and 100Hz.

Looking from the outside, i.e. listening on the CAN interface the messages seems to be sent correctly. However I get a lot of errors shown in the console viewer, see below. The errorcode is -1074388984 which is CAN buffer overflow.

 

buffer overflow.JPG 

 

When I disable the the messages which contains parameters mapped from the model the error code reporting stops.

It seems that a CAN message is stored in the transmit buffer after every iteration of the model i.e. every 1ms, then causing buffer overflow.

 

Is there a setting somewhere to avoid theese error messages or is it a bug? I have no problem with this the I was using the beta.

 

Regards

Roger

0 Kudos
Message 1 of 6
(10,317 Views)

Hey Roger,


Let's get some background information straightened out:

 

  • Did you upgrade from NI Dynamic Test at one point?
  • What version of NI CAN are you using?
  • What CAN card are you using?
  • Are you using any other I/O (DAQ, etc.)?


What happens if you create a blank configuration and map one CAN signal to your model, do you get the same error?

Joshua B.
National Instruments
0 Kudos
Message 2 of 6
(10,308 Views)

Hi.

1. Yes, I have used NI Dynamic Test and then later the VeriStand beta. However, my client PC has been reinstalled (Windows XP) meaning that I have a "clean" installation of the released Veristand software. On the RT target I have uninstalled all NI-software and then installed the new softare according to the VeriStand installation instructions.

 

2. The version of NI-CAN is 2.6.3 (f2)

 

3. It is NI-CAN 8461 board that are used.

 

4. My configuration is PXI chassie 1042Q, 8106 controller, FPGA board 7813R ans CAN 8461. I have a custom device configured that uses the FPGA board

 

5. I have created a blank configuration, added my model and mapped only one signal to the model and this results in the same problem. If I stop the model the error reporting stops. If I remove the mapping the error reporting stops.

 

/Roger

0 Kudos
Message 3 of 6
(10,291 Views)

Hi Roger,

 

Thanks for your reply. It turns out that the messages you are seeing is a known issue and is filed a Corrective Action Request (CAR) 186603. The error does not mean anything bad so you could ignore the error or you can make sure that one incoming message is specified for each port. Let me know if specifying an incoming message for each port prevents the error from appearing. 

Joshua B.
National Instruments
0 Kudos
Message 4 of 6
(10,280 Views)

Hi.

No it does not help specifiying an incoming message on each port. I still get the same error when a model parameter is mapped to a CAN outgoing message.

What is the timeplan for fixing this? The error continiously adds data to the log file (/ni-rt/VeriStand/Logs) which increases in size. After approx 2h the log is 135Mbytes. There is a big risc that I do not detect other important erors due to this behaviour.

 

It is very simple to recreate the faulty behaviour. Starting from a new system definition file I add an outgoing CAN message, import the sinewave.dll (included in the original Veristand installation). When mapping the model output to a CAN signal the error reporting starts.

 

Regards

Roger

0 Kudos
Message 5 of 6
(10,275 Views)

Hi Roger,

 

What are the Transmit Mode and Message Rate of your outgoing CAN message? Because you're seeing that error message so quickly and so often, it makes me suspect that your Message Rate is pretty slow. The CAN loop in VeriStand actually runs at 200 Hz, and that's not something we can change. Would you be able to increase the Message Rate of your CAN message to 200 Hz? I think we'll see then that the buffer won't overflow and the errors will be gone.

 

Regards,

Product Support Engineer
National Instruments
0 Kudos
Message 6 of 6
(10,232 Views)