Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

BFF62048 Error after some time

Hello everyone,

 

I need CAN to communicate between a converter and our test cell. I use an NI PCMCIA-CAN/2 Card and LabVIEW 2012 SP 1. My program works fine but after some time I get an the error BFF62048. I know what it means but I don't know where the problem is nor how to solve it.

 

I use the Channel API for programming the CAN-communication.

 

The problem is I need to write at different timings on the can. Some messages need to be sent at 12ms others at 100ms. Therefore I initialized the messages in different tasks.

For CAN 1  have 1 readtask and 4 writetasks. For CAN 2 I have 1 readtask and 2 writetasks. I hope it is not too much for this little card.

 

The readtasks were both executed at 10ms after each other. The writetasks are executed in several parallel loops, except for one writetask. I need to send back an "alive value" immediately, so I read a value from my CAN-read-array and put it back on the CAN with a writetask. Which means I have to access the card 3 times in one loop.

 

I reduced the execution of my CAN-read-loop from 10ms to 20ms and the program runs much longer. (from ~30 min to 4 hours)

 

In my opinion the problem should occur immediately after I started my program not after some hours.

 

If someone have some advices for me, that would be great.

 

Thanks,

Rino

0 Kudos
Message 1 of 13
(7,505 Views)

Hello Rino

 

have you tried to filter out some messages, because the error happend if are many messages on the bus

NI-CAN Self-Reception and Filtering

Can you post the code and which driver and lv version isin use?

Have you tried a different CAN card?

best regards
Alexander
0 Kudos
Message 2 of 13
(7,413 Views)

I use Labview 2012 (fully updated). Driver Version is 2.7.4

 

I don't think there is a problem with the bus load. Only 50 % of the capacity is used.

Unfortunately we are in lack of hardware, but I'm sure my code will work on a "real" PCI-CAN card. Is it possible, that the PCMCIA-card maybe has a problem with too many tasks? I couldn't find any information regarding the task limit in the hardware specification or I'm blind Smiley Wink

 

I attached the project as *.zip file. I had to remove the can database files (*.dbc) because they are confidential.

0 Kudos
Message 3 of 13
(7,405 Views)

Hello Rino,

 

i have looked into your code for your info on a windows system you can replace the timed loops with normal

while loops and the wait until function.

 

Have you tried to insert the self reception fuction did it help in any way.

 

Sorry, i didn´t found any benchmark for the pcmcia device but also some customers has the same effect.

best regards
Alexander
0 Kudos
Message 4 of 13
(7,394 Views)

Hello Rino,

 

like Duffy told it isn't possible to benchmark the pcmcia card.

 

You have slowed your application. You could use NI I/O-trace or Busmonitor for 'debug' the communication.

 

Regards,

 

Philipp

 

AE | NI Germany

0 Kudos
Message 5 of 13
(7,382 Views)

I implemented the little piece of code Duffy mentioned but at the moment I don't have a chance to test my code again. The test rig is occupied.

 

Why do I slow my application when I use timed loops? Shouldn't it be the same behavior? Maybe it is a little bit slower because of the functionality the timed loop has. I don't think this will be a big impact in execution time.

 

Isn't it a little bit weird, that no one knows how much load a PCMCIA card can handle? In my opinion it an handle less than a normal PCI-Card, just judging from its size. But I think 8 tasks is not that much. In my second version I lowered the amount of tasks. The next step is to test the code Duffy told me and the step after that is to replace the timed loop functions.

 

Regards,

Rino

 

 

0 Kudos
Message 6 of 13
(7,377 Views)

Hello Rino,

 

the time loop do not slow down the application, but the timed loop is often used on real time system, because on this

you can select the processor and you can set the priority, so on real time they are very cool, but on windows not necessary.

best regards
Alexander
0 Kudos
Message 7 of 13
(7,372 Views)

I hope this is the correct implementation of the Self-reception. Do I need to activate self reception for every task for input and output? Do I have to filter the self received messages?


If yes, are there any examples to implement filtering with channel API?

 

 

Download All
0 Kudos
Message 8 of 13
(7,242 Views)

Hello Rino,

 

your example should work and yes it should be fresh activated for every fresh started task.

in the link explained how to filter out the signals

 

NI-CAN Self-Reception and Filtering

best regards
Alexander
0 Kudos
Message 9 of 13
(7,235 Views)

Hello Duffy,

I tried it with those Sub-vi's but it pop up an error named:

0xBFF62007

"You attempted to set a configuration attribute while the object is running.  Solutions: Configure attributes prior to opening the object; Stop and restart communication as needed so that you can update configuration attributes."

 

As you can see first I initialize the CAN, stop the CAN, than changing the attribute and start the CAN-communication.

Is it correct that I set this attribute in my CAN-read and CAN-write sub-vi?

0 Kudos
Message 10 of 13
(7,214 Views)