Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN Transmitt frame on RTSI.

Hi all!

I have a problem, I want to send CAN frames when I receive an RTSI pulse. To do that i configured my CAN Network Interface, and i generated a pulse train. At the begining, i configured the delay between two pulse at 700µs. It seems to work, but i noticed that sometimes after a day or after a week, i get the warning 1073094950 : NI-CAN:  (Hex 0x3FF62126) You configured CAN transmit when a RTSI input pulses, and the RTSI rate occurs faster than CAN frames can be transmitted at the specified baud rate. Solution: Configure the source of RTSI pulse (i.e. DAQ counter) for a slower rate.

I read in the data sheet : When you configure a DAQ card to pulse the RTSI signal periodically, do not exceed 1000 Hertz (pulse every millisecond). If the RTSI input is pulsed faster than 1kHz on a consistent basis, CAN performance will be adversely affected (for example, lost data frames).

After that i configured the delay between to pulses to 1ms and tryed again.... with the same result... sometimes i don't know why i receieved this damned warning !!! I also tryed with 1,6 ms ... (the maximum i can have between two pulses).

I don't know why i have these limitation from this card ! I know a solution will be to use FPGA instead on these poor CAN cards but i don't have the time to rewrite the code with FPGA (i meet the customer next week). So i just want to know if someone else meet this problem (and eventually has a solution) or can explain this strange phenomena ....

Thanks.... for all your futures answers!
0 Kudos
Message 1 of 12
(8,139 Views)

Hi,

The driver should be save to handle up to 1 KHz of RTSI pulses. However to get the frames out with 1 KHz puts a lot of work to the onboard processor.

If there is anything alse going on at the same port or a second port, lets say a burst of frames comes in on the second port, then it could happen that the firmware cannot handle the transmit fast enough and thus you will miss RTSI pulses.

When ever possible make sure to use a one port board and nothing else then this RTSI transmit task on your board. If that is not possible, try to reduce incoming traffic using the filter feature and try to avoid object usage on the other port.

Can you tell what happens on your CAN network, whenever the Warning occurs?

DirkW

0 Kudos
Message 2 of 12
(8,121 Views)

Hi Dirk thanks for your answer...

Effectively i use a 2 ports CAN Card ( the 8461). Currently the port 1 was linked to the port 2, and i was reading all traffic on the second port ! As i said, it seems to work, it's only after one day , sometimes after a week that i have this warning... I wasn't able to watch what happen on the CAN Network , I suppose I missed frames, but i don't know because this phenomena only appears sometimes, and i didn't managed to watch the traffic at this time, i only see the consequence (apparition of the warning).

I will try what you suggest. In my configuration i have 2 CAN boards with 2 ports each, i think I have one port left. So i will only use one port on the board used to send CAN frames with RTSI, and i will read the frames with the second board... I hope this will work !

Again thanks a lot ...

 

0 Kudos
Message 3 of 12
(8,118 Views)

Hi Dirk !

I tryed your solution (I use only one port of the CAN card , and this port is only used in order to transmitt frames on RTSI pules). Unfortunately i still get this warning ! So, for the moment i'm lost i really don't have any solution... the only one is to ignore this warning and still proceed ... the problem is : i don't know what happen when this warning appear ...: do i lost frames ? Or does it mean that the frame is send a little bit latter ???

I will try to watch the traffic with CANAnalyser but if you have any ideas, any suggestion will be appreciate ...

 

Thanks !

0 Kudos
Message 4 of 12
(8,057 Views)

Hi dirk !

Sorry it's me again, i tryed to watch the CAN traffic with CANAnalyser, and my conclusions are the following : when i get this warning, the frame is not send, the frame is stored in the buffer and send the next RTSI pulse... In my configuration, that's not acceptable ! So i don't know if you have other solutions ... but for me this problem is due to this damned CAN board ! Send a frame every 1 ms is not really much, and even with this configuartion, the board can not manage this !

 

 

0 Kudos
Message 5 of 12
(8,054 Views)

It seems that somehow the firmware is missing a RTSI pulse and thats what the warning means. Could you try a RTSI pulse frequency of less then 1 KHz? Is there any other activity going on on this port? Any read or more writes? Are you using the Network Interface Write or an Object? If you are using a single ID Object, you could try to change to the Network Interface Object, which is normaly more performant.

DirkW

0 Kudos
Message 6 of 12
(8,043 Views)

One thing i forgot to ask is about the Pulse train signal quality. Perhaps the quality is not good enough, when the CAN board misses the pulse. Did you have a look to the signal, to see how the quality is?

DirkW

0 Kudos
Message 7 of 12
(8,042 Views)

Hi dirk!

The port used to send the frame on RTSI pulse is only used for this .... in fact i only used one port of my 2 ports CAN board (as you suggest in your last message). Moreover, i put the comparator and mask to CFFFFFFF (to ignore incoming frames). So there is no other activity on this port !

I already use Network interface this can not be improved.

The pulse train used for the RTSI signal is generated by a NI board, and i checked the signal with a scope, it seems to be ok ... 

The problem is in my application i can not decrease the frequency of the RTSI pulse ... otherwise i will not be compliant with the customer specification. My last idea to resolve the problem is to use two different ports (of two differents boards) to send the frames. I will send a RTSI pulse on each port every 2 ms... i will try and i hope it will work ...

But  again if you have other ideas ....

Thanks !

0 Kudos
Message 8 of 12
(8,035 Views)

Hello,

 

I have a question related to this thread. I am trying to synchronize a CAN application (8461) with another running on the 7831R using the initernal RTSI bus. I manage to generate the RTSI pulse as required (not very fast, 100Hz) and by running the "CAN Object Transmits Periodic on RTSI.vi" from the examples, I can verify that the CAN card sends the data frames which have been hardwired. 

 

My question is, how can I get the application to send data from a large array, say 8 bits per frame??? Are there any examples for this that I might have overlooked?? My problem is that I have no value using which I can index the array so that the CAN card can send the data I wish at 100Hz. The frequency means that I cannot use a simple timed loop or anything similar.

 

Please advise.

 

Regards,

Shailesh. 

0 Kudos
Message 9 of 12
(7,258 Views)

Hello,

 

First, because your post is different from the first one, you should create a new post for that question.

Then, i didn't really understand what you want to do. usually, CAN frames are composed of 8 Bytes. There is no problem to transmit 8 bits.

Then, what do you want to do with that??what is the array corresponding to? what do you want to send at 100Hz?

 

Thanks.

 

Regards,

Olivier L. | Certified LabVIEW Developer


0 Kudos
Message 10 of 12
(7,245 Views)