Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Communication with PIC-CAN/XS2

Hello, everybody
 
I'm very new in this forum and i have some problems when i'm trying to communicate with my card CAN.
 
First of all, i use a CAN Card NI PCI-CAN/XS2 that i try to configure under MAX. I imported firstly a database created under CANalyzer which dispose only one channel (his ID is 0x01 with 8 bits data). I restocked this configuration as "File.ncd". Now, in LabView (7.1), i have a simple program such as : when i click a button, the function InitStart will be called to initialize and begin the communication. The inputs of InitStart are : File.ncd as filepath, CAN1 as interface, output as mode and 0 as sample rate. But, i have always 0 as Reference task at the output of this function!!!
 
Then, i gave up Labview and only want to "talk" with my card CAN under MAX. So i think sending some messages from the port CAN1 and reading them from CAN2. The 2 ports are connected with 2 fils on the pin 2 and 7 (CAN_L and CAN_H). I want to know if it is possible and how to configure CAN1 as Transmitter and CAN2 as receiver only under MAX (without software, vi).
 
Thanks a lot, i'm waiting for your responses... Have a nice weekend
 
P.S. : i should use my card as High-speed!!!
 
zuzu
 
0 Kudos
Message 1 of 3
(4,155 Views)

First of all keep in mind, the XS board comes in configuration 1st port HS 2nd port LS. In your case you need to change the second port to HS in order to get a Loopback running.

If this is not the problem, connect your ports together and run the Object to Object Example comming with the Frame API. If this works it should work with the Channel API as well.

In Max you could run alternatively the Bus Monitor on One Port and the TestPanel for your channel on the other Port.

DirkW

0 Kudos
Message 2 of 3
(4,142 Views)
Have you placed the two resistances of termination (120Ohms) at each extremity of the bus ?
Pierre R...

Certified LabVIEW Developer
Message 3 of 3
(4,123 Views)