Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

2 port USB-8502

Solved!
Go to solution

If I had 4 CAN buses to test independently can I use two USB-8502(2 port) for all 4 CAN buses without any slowdown(fastest signal is around 10ms)? Will a single 2 port device need to take turns waiting for each session to finish/complete a task before the other session can take over? Or can the two ports work independently of one another. 

0 Kudos
Message 1 of 6
(1,706 Views)

There is a good chance it will work just fine.  You don't mention your bus load, or baud rate, but the 8502 is CAN-FD capable.  So that means it supports 8 MBaud, on both ports at the same time.  Most people that use CAN only use it at the 500 kBaud.  And most of the time that people have a 500 kBaud system, they aren't fully loaded.  When the bus load approaches 90% the likelihood of missing data, and needing a retransmit goes way up.  So most bus loads when testing a single ECU is probably around 10%, with a secondary diagnostic bus around 50%.

 

All of this is to say that your USB 2 speed of 480 Mbps will handle 2 USB-8502s even with the various overhead needed.

 

Many (if not all) XNet functions are reentrant, and can be ran on multiple ports simultaneously.  You shouldn't be holding up one bus, while the other does extra work, or is waiting for a reply.  I've used two USB-8502s loading all 4 CAN ports on a single older laptop with an second generation I5, and 4GB of ram without any issue.  Years ago I also saw 9 USB CAN devices put into a single USB hub, and plugged into a single USB port on the PC.  I suspect that system couldn't log all CAN frames, but for the periodic transmit and read it actually functioned to my surprise.

0 Kudos
Message 2 of 6
(1,697 Views)

Thanks for your response, it's actually going to be 10 CAN buses but I figured I'd try with 4 and scale up. So I can get away with 5 8502's instead of 10.

 

It's a 500K baud for 10 Buses using USB 2.0 through 1 USB hub into 1 USB slot of the computer. Will be a desktop with a newer generation CPU and about 12gb ram.

 

I ran into some issues using 12 USB 8473's and I believe we learned that the older API was non-reentrant with 12 of them so having the XNET as reentrant will definitely help.

 

0 Kudos
Message 3 of 6
(1,689 Views)
Solution
Accepted by topic author PatrickMiller

@PatrickMiller wrote:

it's actually going to be 10 CAN buses

...

It's a 500K baud for 10 Buses using USB 2.0 through 1 USB hub into 1 USB slot of the computer.


My confidence level is lower, but depending on what you are doing it could still work.  You should still be way under the theoretical bandwidth of USB 2.0, but it is possible there will be issues.  If this is a desktop I'd suggest splitting up the system so it is more evenly distributed among internal hubs of the PC.  If this causes issues this might involve installing more USB cards to make sure no single one is over loaded.

 

The XNet API is pretty advanced, and can read and write single point data, without having to constantly get or send data to the bus.  In this session type I suspect you can put a ton of devices on a single bus.  But if you are intending on logging all raw CAN frames, and have a queued write mode for every device, then you may run into issues.  It is hard to say because I've never pushed it that hard.

 

Another option if USB does give you issues is ethernet.  NI sells a 2 port high speed XNet device in a Compact RIO form factor.  Here is also an 8 slot ethernet chassis that you could put 5 of them into.  Then you can connect it to the PC directly with ethernet, or through a hub.  This design then lets you add other C Series modules too if you ever need to take temperature readings, pressure, load cells, voltage, current, etc.  The code you write for the USB devices, is the same as any XNet ones, so you won't be starting over if you do need to change platforms to make it work.

0 Kudos
Message 4 of 6
(1,679 Views)

I actually think your solution is better with the 8 slot cDAQ chassis and 5 of the cRIO modules for CAN since they are dual port. I need a USB relay module as well so I was going to have roughly 10 devices or so being connected into various USB hubs. This would really cut down on the amount of USB connections.

 

 

0 Kudos
Message 5 of 6
(1,656 Views)

Glad I could help, now if only I got commission.

 

NI does have several digital out relay devices in the C Series form factor too.  The NI-9482 is a 4 channel SPST relay devices that can handle at least an amp.  The NI-9485 also works, but is a solid state relay, supports 8 channels, but less current.  There are also 16 channel digital out devices, but they are mean to control a relay or contactor that you need to supply.

 

But if you already have a working USB relay device, these industrial ones will likely be more expensive.  I know an Arduino, using LINX, and a relay shield would probably be $60 or so and these cards are 10 times that.  You do get support, a warranty, and drivers, as well as the form factor with these NI devices.

0 Kudos
Message 6 of 6
(1,634 Views)