LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using CAN Frame and CAN Channel API simultaneously

Good afternoon.

Here is my situation and what I am trying to implement in LabVIEW 7.1:

I need to both send and receive CAN messages simultaneously.

To send messages, users provide a *.ncd file with message and channel configuration. Each message (containing multiple channels) can have a distinct periodic rate. So the users provide another file with periodic rates for each message in the *.ncd file. I use CAN channel API to create a task per message so I can set individual periodic rates. This sends all of my messages out on the network at it's intended intervals.
Channel interface is also great to input each channel's data in its true format (i.e. vehicle speed in kph, instead of calculating the real value that is sent out on the CAN with all the offsets and resolution multipliers).
This sending part works great.

I also need to receive messages. I need to receive everything I send to verify the data. I use "self reception" feature of TYPE2 PCMCIA card for that. In this case channel API also works great, since I know which messages and channels to look for.

However (here comes the question) I also need to monitor the entire CAN link for ANY communications on it. Because I don't know which Message IDs might show up on the network, I can't use channel API (or can I?). And it doesn't seem like I can use the frame API simultaneously with channel API.

ANY THOUGHTS/SUGGESTIONS.

THANK YOU EVERYBODY AHEAD OF TIME

BorisMoto
0 Kudos
Message 1 of 3
(2,632 Views)
Hi Boris,

In searching for a good link to answer this post, I found this post. The information is correct, and your final conclusions are correct as well. In my opinion, the best solution would be to use a 2 port CAN card, one with Frame API to monitor the bus, and the other using the Channel API. Good luck with your application!

John M
Applications Engineer
0 Kudos
Message 2 of 3
(2,608 Views)
Thank you John.

That is the solution I am going with. Although our hope was to use this CAN card (2 ports) for running on two separate CAN networks.

BorisMoto
0 Kudos
Message 3 of 3
(2,606 Views)