LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to interface CAN with Sbrio 9636

Solved!
Go to solution

Hello,

I am using Labview 2011 and SBRio 9636 to communicate with Maxon's EPOS2 controllers which uses CANOpen protocol for communication. Since, SBRio has only embedded CAN library with it I am just using it to monitor an already setup communication network. Even when communication happens within the network SBRio fails to receive any frame. I am running the Single Input Output frame example for the purpose. The connections are checked and the terminal resistance in the bus is 120 Ohms. SBRio enters "Error Active" mode and quits running. Also it is found that the board also triggers an error in one of the EPOS2 which is connected directly to the Board. Can anyone tell me why this happens? Is there anything left to be done? I am finding difficulty in uploading images and help sending the Front and Block Panel as attachments. P.S.

 

Download All
0 Kudos
Message 1 of 8
(8,342 Views)

Did you have any success with troubleshooting this? I have a similar scenario, embedded CAN with SBRIO 9636.

 

Thanks

0 Kudos
Message 2 of 8
(7,966 Views)

Hi Kevin,

Sorry to disappoint you but I could not resolve the issue till now. The cause of the problem is the mismatch in the drivers of the devices. My purpose is to connect SBrio 9636 to EPOS2 via CAN. EPOS2 uses NI CAN drivers which is not similar to the Embedded CAN used by sbrio. Hence, most of the communication cannot be performed via Embedded CAN for instance my problem. I cannot understand the difference between both the drivers other than their frame structures. I could not find any drivers from National Instruments either and so only solution remains is to program the whole CAN driver circuitry to FPGA and use its DIOs as CAN port. So for your application I suggest to find out which driver is being used by your device.

 

Hope this is helpful..

 

0 Kudos
Message 3 of 8
(7,951 Views)
Solution
Accepted by topic author Surajp

Hello Surajp,

 

I also have problem with CAN communication of sbRIO, but at least I could receive CAN frames just sometime lost some ones.

I found in your block window,  you set Listen only? TRUE, this is not correct, this must be FALSE, otherwise can not read any CAN frame from CAN bus.

 

Here is the description from help file.

 

The Listen Only? property configures whether the CAN interface transmits any information to the CAN bus.

When this property is False, the interface can transmit CAN frames and acknowledge received CAN frames.

When this property is True, the interface can neither transmit CAN frames nor acknowledge a received CAN frame. The True value enables passive monitoring of network traffic, which can be useful for debugging scenarios when you do not want to interfere with a communicating network.

 

Hope it will help you.

Qi

0 Kudos
Message 4 of 8
(7,904 Views)

THank You man,

I tried again and increased the receive queue a little bit and it worked... Probably my termination was not proper.  It works,,,

 

0 Kudos
Message 5 of 8
(7,424 Views)

Hi,

 

I need to know if the drivers on the RIO evaluation board supports the SAE 1939 Protocol.

SAE J1939 defines five layers in the seven-layer OSI network model, and this includes the Controller Area Network (CAN) ISO 11898 specification (using only the 29-bit/"extended" identifier) for the physical and data-link layers.

I think that ISO 11898 specifies CAN/Open, Devicenet and SAE 1939

From the manual of the evaluation board:

NI sbRIO devices populated with one IDC header provide connections to a
CAN bus. CAN-enabled NI sbRIO devices have pins for CAN_H and
CAN_L, which can connect to the CAN bus signals. The CAN port uses an
NXP PCA82C251T high-speed CAN transceiver that is fully compatible
with the ISO 11898 standard and supports baud rates up to 1 Mbps.

Could anyone give me some advice on how I have to use the drivers, because I am not familiar with them.

I need to send and receive messages for a hydraulic valve. The valve uses SAE 1939 with a baud rate of 250 Kbps. (high speed CAN). I use Labview 2013 with NI sbRIO -9636 board (RIO Evaluation Kit).

 

Thanks,

 

Best regards,

 

Gautier

Download All
0 Kudos
Message 6 of 8
(7,148 Views)

You should probably start your own thread rather than hijacking an old one multiple threads.

 

What is the problem you are having? From the looks of your block diagram, you do not have a while loop on your VI so it will only read/write once and then exit. Also verify the parameters for the initialise VI and that your electrical wiring is correct (e.g. termination resistor!)

 

Do you have another CAN device on the network that's sending/receiving messages so you can test with some real CAN traffic?


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 7 of 8
(7,143 Views)

Hi,

 

Thanks, I started a new thread 

http://forums.ni.com/t5/LabVIEW/Does-embedded-CAN-on-RIO-evaluation-board-support-SAE-1939-CAN/td-p/...

I posted this thread on the forum, because I thought it was simular

 

The problem is that I don't know if the embedded CAN on the RIO evaluation board supports SAE J1939  ???????

If no, I will use the NI 9853 CAN module in combination of the cRIO-9030. But this solution is very expansive for the aplication!

 

I don't use a while loop, because I put my VI in run continiously. So the code is repeated. And yes I have a singnal between CAN_L en CAN_H

 

I don't have another device on the network at the moment.  I will have the PVED-CC CAN module from Sauer Danfoss on the 20th of March, it uses SAE J1939 with a baud rate of 250 Kbps. And yes my electrical wiring is correct ( termination resistos of 120ohm).

 

I am a dutch student at VIVES highschool Ostend (BELGIUM) and I have to control a valve (PVG32 Sauer Danfoss) by using a controller of national instruments for my thesis.

 

And I only got 5 weeks left.

 

Thanks a lot,

 

Best regards,

 

Gautier Donald

0 Kudos
Message 8 of 8
(7,137 Views)