From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a default value for NC_ATTRIB_BKD_PERIOD

Solved!
Go to solution

I have taken over a project and the value for NC_ATTRIB_BKD_PERIOD was set to 10. I have changed this value to 1 (I assume this is milliseconds) and the software runs much faster saving about 20 seconds over a formerly 60 second test time. I have used NI CAN before and have never came accross this setting before and I wondered if there is a default setting for it and if so what is it?

 

0 Kudos
Message 1 of 6
(7,255 Views)
Solution
Accepted by topic author johneardley

Hello John,

 

If you look at the nican.h, you can see that the NC_ATTRIB_BKD_PERIOD is the legacy version of the NC_ATTR_PERIOD attribute.  ( I say "if you look", but this is not really clear just by looking...) The NC_ATTR_PERIOD is documented as follows in the NI-CAN manual 

 

NC_ATTR_PERIOD (Period)
Period specifies the rate of periodic behavior in milliseconds.
The behavior depends on the Communication Type as follows:
NC_CAN_COMM_RX_BY_CALL
Period specifies a minimum interval between subsequent
transmissions. Even if ncWrite is called very frequently, frames
are transmitted on the network at a rate no more than Period.
Setting Period to zero disables the minimum interval timer.
NC_CAN_COMM_RX_PERIODIC
NC_CAN_COMM_RX_UNSOL
Period specifies the time between subsequent transmissions,
and must be set greater than zero.
NC_CAN_COMM_TX_BY_CALL
NC_CAN_COMM_TX_PERIODIC
NC_CAN_COMM_TX_RESP_ONLY
Period specifies a watchdog timeout. If a frame is not received
at least once every period, a timeout error is returned. Setting
Period to zero disables the watchdog timer.
NC_CAN_COMM_TX_WAVEFORM

 

So the modification you made will have different effects depending on your mode of transmission.  I believe the default is 0, but this may not be valid if you change the transmission mode.

 

Let me know if you need more help.  Have a great day.

O. Proulx
National Instruments
www.ni.com/support
0 Kudos
Message 2 of 6
(7,245 Views)
Thanks. You have answered my question. I was not familiar with setting up CAN for watchdog or transmission periods before, but I am satisfied now. Thankyou.
0 Kudos
Message 3 of 6
(7,242 Views)

Hi

 

i would like to know why this error BFF620A1 occurs. its says that i am trying to sent too many messages at higher transmission rates and the timers are not able to maintain it. is there anyway i can resolve it? i would like to sent so many messages say 30 of them at 10ms, but it shows the same error.

0 Kudos
Message 4 of 6
(4,830 Views)

You are replying to a solved thread, from 6 years ago.  You may want to post a new thread with as much details as possible, which would involve posting code.

 

That being said I do have some conserns.  If you are using extended CAN, and an 8 byte payload, then you have 128 bits to send in a frame.  If you are sending 30 frames then you are at 3840 bits.  If your CAN bus is a 500K Baud this will take 7.7ms to transmit.  If your baud is any slower than 500K you will be unable to transmit this on the physical layer regardless of the hardware.  But on top of that you didn't mention what hardware you were even using.  Maybe your device simply doesn't have a buffer size of 30 frames.

0 Kudos
Message 5 of 6
(4,823 Views)

Hi Dan,

 

I would highly recommend that you create a new thread for this issue, it will get much more attention and will allow future users who experience the same issue to find your case and refer to it for help.

 

As for your error code, you can find a list of NI-CAN errors here:

http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/48064250bbde3f0f86256d9000776eac/$...

 

For your error the following explanation is given: "Too many messages with high transmit rates. The combined timers cannot be accurately maintained. Solutions: Decrease the number of periodic transmissions; decrease the transmit rate for one or more messages."

 

As has been mentioned, if this information isn't sufficient then creating a new thread with more detailed information on your system would allow either an applications engineer or community member to better help you to resolve this error.

 

Regards,

Jake A

Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 6 of 6
(4,807 Views)