LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Networking CAN nodes together

I was just looking at the following hardware:

 

http://sine.ni.com/nips/cds/view/modelpopup/p/pcat/9373/lang/en 

 

Do I need this or similar in order to connect various CAN devices together in a network or can they just be daisy chained together with cables? Should all CAN devices effectively have two lots of connections, one to go into the USB-CAN intreface or similar, and the other two daisy chain to the next CAN device?

 

I am just trying to understand how they interconnect together.

 

NI recommends this breakout box but I trust people would tell me if I didn't really need it, even if it means a loss of a sale (I am sure NI value integrity and do not want to try and drive their customers costs up for the sake of a few extra pounds at the expense of their integrity).

 

They also stroingly recommend this cable and I wondered if it was necessary or can I just make my own cables using a d-sub?

 

http://sine.ni.com/nips/cds/view/modelpopup/p/pcat/6938/lang/en 

 

I am looking at buying the USB-CAN interface and need to decide if I need the recommended extras or not.

0 Kudos
Message 1 of 19
(3,765 Views)

Hi David,

 

what exactly is it you want to achieve, so you talk about several CAN devices?

 

The breakout box is basically just a "CAN-Bus". So this is where you would connect all the CAN Devices you want to communicate with. The Breakout Box offers several simplifications, like switchable termination and most importantly the power supply your NI-CAN Devices need. Do you need it? No, you can just wire everything together manually. The important part is that (and this should answer the question about the cable, too) If you build your own cable you need to supply a voltage to certain pins for the NI-CAN devices to work and you must consider termination. Some of your devices might have a termination resistor built into them, depending on their position on the bus.

 

BTW: If I talk about NI-CAN above, I'm always referring to NI-XNET devices. What CAN device are you looking at? I would strongly discourage you from buying an NI-CAN device. Instead, you should go for XNET, because they are much easier to use.



Remember Cunningham's Law
Message 2 of 19
(3,756 Views)

I am linking up the following sensors *2:

 

http://pdf1.alldatasheet.com/datasheet-pdf/view/255387/IVO/GXMMW.html

 

with LabVIEW via one of these:

 

https://www.ni.com/en-us/support/model.usb-8473.html

 

Iniitlally it will just be the 2 sensors, but later it will also be two motors that communicate also, so 4 nodes.

 

I wasnt sure if I can just daisy chain them or I need a breakout box.

0 Kudos
Message 3 of 19
(3,734 Views)
You never really need the breakout box. I like it because it's easy to wire, add termination resistors and power but if you are only going to set this up once then it's pretty expensive.

I very much agree with peter that NI XNET is much better that NI CAN. Getting a 9171 with 9862 is more expensive but it really is worth it. If you want to talk about the specific functionality differences I would call into NI support.
Matt J | National Instruments | CLA
Message 4 of 19
(3,692 Views)

Hi David,

 

in the end, it all comes down to the question if you want to solder everything together or not. Also: Daisy chaining isn't the same as connecting to a bus as daisy chaining requires separate connections between the devices.

As for the USB-8473, I would strongly suggest getting the combo that Matt suggested as it is far superior in ease of use and integrability into bigger systems.



Remember Cunningham's Law
Message 5 of 19
(3,670 Views)

@PeterFoerster wrote:

Hi David,

 

in the end, it all comes down to the question if you want to solder everything together or not. Also: Daisy chaining isn't the same as connecting to a bus as daisy chaining requires separate connections between the devices.

As for the USB-8473, I would strongly suggest getting the combo that Matt suggested as it is far superior in ease of use and integrability into bigger systems.


We use DB9 connectors that push onto ribbon cables - it's very easy to make a CAN network cable as long as you need with as many male/female DB9 connectors for connecting the CAN devices. You can then solder (or use one of those little DB9 screw terminal breakout boards) your termination resistors into two connectors you plug into each end of the cable.

 

Also - we either use Kvaser USB can devices or NI CAN C-Series devices as you can use them on the FPGA for low level/deterministic control and then we still use NI XNET API for parsing the messages from either device. There are valid use cases for both NI CAN and NI XNET CAN devices.


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 6 of 19
(3,651 Views)

I don't really understrand what the differences are with API and XNET etc. I also don't understand what the different hardware options are for high speed and low speed CAN and all these other options and choices like LIN, HS/FD etc. Its making it a bit difficult to select the best hardware for me. I need to keep costs as low as possible and the costs just keep going up. Last week I was asking for a £288 USB CAN interface, now I might be asking instead for an XNET device at nearly £500 plus breakout box and cable, thats nearly £1k. So I have to go back to my project manager and state I need an extra £750. And if he asks me why, and are these costs necessary and could I do the job without these extras, I honestly would struggle to say yes or no as I dont really understand the implications.

 

On the one hand I dont want to overspend unneccessarily. I also don't want to underspend and then come to him next week saying I cant complete the work still as I bought the wrong stuff. It seems a bit difficult to walk the fine line between keeping costs as low as possible without impacting quality of work. I guess this will get easier when I have experience of using this stuff on future projects. 

 

Are you recommending the USB 9862 or the NI 9862? As in a stand alone USB to CAN interface or the CAN module for the cDAQ? I am using a cDAQ 1984 for this project anyway so can use the module if its compatable. The USB device looks even more expensive at nearly £700. Does it have extra functionality or is it just because the USB-CAN interface is stand alone and so more expensive than a cDAQ module?

0 Kudos
Message 7 of 19
(3,633 Views)

I get the dilemma very well, as I am currently in both positions: People come to me and want stuff and I also have to defend budget towards my boss. Two things are to consider if it comes down to budgetary concerns:

1) The cost of your work: Are you confident that you can wire everything together (I think the ribbon cable solution sounds pretty neat) and it works on the first try? If you sum up all the wiring, debugging and rewiring for later projects and multiply with your hourly salary is that more than the cost for the breakout box?

2) Reusability: Right now you just have a couple of sensors, but can you guarantee that there won't be more in the future? If you need a system that you can easily adapt, the breakout box might be a good choice.

 

That said, it's possible to build all that yourself and even build something that can be adapted just as easily. I always liked having the box, but in the finished product we rarely even use it, since our wiring guys can build something similar, fitted to our needs for ten and six.

 

As for the interfaces: I've seen some fairly advanced stuff done with NI-CAN, but personally I have always preferred XNET. Around here the price difference is 270€, which equates to around 3-4 hours of work of a young engineer. I would estimate that you save that much with the Database Editor alone over traditional NI-CAN.

Also: If you already have a 9184 in your project, you can just use the NI 9862 in one of the free slots. This would be the same functionality wise as having it in its own chassis, but plugging into the 9184 has the added benefit of synchronisation to the rest of the measurements taken.



Remember Cunningham's Law
Message 8 of 19
(3,622 Views)

Would the 9862 work with both high speed and low speed applications? I have had a look on the sensor and it has a Baud Rate of 50 kBit/S which according to wikipedia makes is a low speed CAN application. What has confused me is that high speed CAN seems to have no lower limit, so can high speed CAN still handle low speed applications? In which case, what is the point of choosing a low speed CAN module when the high and low speed options arethe same price?

0 Kudos
Message 9 of 19
(3,612 Views)

@PeterFoerster wrote:

I would estimate that you save that much with the Database Editor alone over traditional NI-CAN.


Or get the best of both worlds and use an NI-CAN hardware device (or any other CAN device) but still use the XNET Frame to Signal Conversion API to convert the frame to signals/values (using an XNET database/DBC file etc.). Money and time saved! Just make sure that your C-Series module is supported by the method you want to use to read in the data (e.g. Scan Engine, FPGA, USB etc.). The XNET API is great, but we personally needed more control over the CAN data being transmitted (e.g. deterministically updating some signals in messages on FPGA) which isn't possible with XNET hardware.

 

The choice of high-speed/low-speed depends on the CAN bus specification - if your devices are high-speed then you need a high-speed CAN device.

 

The cost of the breakout box is extortionate for what is essentially a 2-wire interface. Using a CAN cable like this:

2016-01-21_11-31-12.png

 

A reel of cable, couple of bags of connectors (male/female) and the termination probably comes in under £50 and you'd have enough left over to make X more as well. If you need an extra device - just clip another DB9 onto the cable.

 

NI software/hardware is great - but the 'suggested accessories' can be fairly overpriced and are often unnecessary!


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 10 of 19
(3,605 Views)