Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

PCMCIA 2port high speed CAN card

Hi to all,
I am new to CAN based applications.
I have few basic questions
 
1.)Say I am sending three messages periodically to a CAN network.Message1 to be sent in every 10ms, message 2 in every 20 ms and message3 in every 50 ms.How to achieve this usig LabVIEW.
2.) If i am sending messages continuosly (say 1byte data) ,what will be the maximun number of messages i can sent per second?
3.) When using PCMCIA CAN hardware time is counted from hardware or software? Whether operating system performance affect the timer accuracy.
 
Hope some body can guide me.
0 Kudos
Message 1 of 5
(5,305 Views)

Hi Sajk,

There is an example that ships with LabVIEW that demonstrates how to send periodic messages using the Channel API.  If you go to Help >> Find Examples... this will launch the Example Finder.  If you browes to Hardware Input and Output >> CAN >> Channel API >> Basic, the VI is Single Sample Periodic Output.vi.  This demonstrates how to use CAN Init Start to set up the sample rate for periodic transmission.  In the Measurement & Automation Explorer you can select the baud rate of the bus.  Just select you CAN interface and press Properties.  The baud rate multiplied by the frame size gives you the maximum transmission rate.  The timing is performed in hardware both for the baud rate and the sample rate.

0 Kudos
Message 2 of 5
(5,284 Views)

Hi Sajk,

Please note that the maximum rate for periodic objects is limited to 2 ms. So you can have two periodic CAN objects with a rate of 4 ms each or ten periodic CAN objects with a rate of 20 ms each. In both cases the combined rate is not faster than a transmission every 2 ms.
If you exceed that limitation, you'll get an error (hex 0xBFF620A1 or hex 0xBFF62130) from the NI-CAN driver.

-B2k

Message 3 of 5
(5,278 Views)
To All,
         I have a question.
         I use a PXI 8464 2 ports CAN Card. Port0 is used to send 10 frames message, and port1 to send 9 frames message. The sample rate of each frame is 1Hz. But Labview tells me the error "The number of periodic output tasks (Mode = Output, Sample
Rate > 0) exceeded the limit. Solution: Reduce the number of
periodic output tasks in your application; If you are using
LabVIEW RT you can schedule periodic transmit (Sample Rate
= 0) in the diagram."(eror code:0xBFF62130).
        According to the explain of biker2000, I think in a second ,to send 19 frames CAN message is easy to any ECU.So where is the problem?
Thanks,
Lai
 
0 Kudos
Message 4 of 5
(4,765 Views)
Lai,

I assume you only have one task open on each port at a time, and you are running windows. Please correct me if I am wrong. Judging from the error message you are receiving sounds like it more has to do with how many tasks you have open, rather than the rate. What you would like to do sounds like it is well within your hardware's capabilities. What development environment are you working in? A simple way to create a multiple periodic tasks is just create two copies of the "Can Transmit - periodic.vi" example.

Also, in the future I would recommend opening a new thread rather than posting in a 3+ year old thread, more people will see it. You can still reference the old thread through a link.
-Marshall R
0 Kudos
Message 5 of 5
(4,745 Views)