01-21-2015 10:53 PM
Hi,
I want to detact the Current CAN BUS utilization. Can any body suggest for that?
01-21-2015 11:36 PM
Are you using NI-CAN or NI-XNET? The implementation should be slightly different depending on which you are using.
If you don't need to do this programmatically you should be able to look at the bus monitor.
01-22-2015 01:17 AM
01-27-2015 09:49 AM
This question would probably be better suited at the Automotive Networks section.
http://forums.ni.com/t5/Automotive-and-Embedded-Networks/bd-p/30
Even so I've never seen a LabVIEW implmenetation for NI-CAN or XNET that actual measured bus load. Which is a little odd because the test panels in MAX have this feature. For me I usually put another node on the bus and measure it this way as a test. But if I wanted to know what it is from a VI the best that I know of is you can calculate it. There is a VI burried that does the math for you.
This VI can calculate how long it will take to transmit a frame, and how many frames per second can be sent. Using this information you can calclate bus load of your actual messages.
<LabVIEW>\examples\CompactRIO\Module Specific\NI 985x\cRIO CAN Periodic Transmit\CAN Rate Calculator.vi
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
01-27-2015 11:26 AM
I'm really not sure how you would do this programmatically but just using the bus monitor you can get a decent idea of your bus load. For me, I find it is usually good enough for simple troubleshooting to know approximately how much your bus load is. For NI-CAN you can do the following.
http://digital.ni.com/public.nsf/allkb/567C4038A2CD279486256FCC00565D07
The XNET bus monitor can be launched from the start menu. I couldn't find a KB but I took a screenshot of what it looks like for me (I don't have anything set up so it's blank).
Hooovahh, that's a neat tool to know about (I think I can use it for an issue I'm currently working on thanks). I haven't been working with CAN for a terribly long time so could you enlighten me as to some reasons you would want to know the bus load programatically? It seems like a nice to know thing but how would you use that info?
01-27-2015 02:05 PM
@Jacobson-ni wrote:
I haven't been working with CAN for a terribly long time so could you enlighten me as to some reasons you would want to know the bus load programatically? It seems like a nice to know thing but how would you use that info?
My UUT has multiple CAN buses, and there is a requirement that each bus load loaded to a simailar amount. Right now we do small checks like what you showed by opening the test panel temporarily. But what would be more tracable is if the bus load was a recorded value in a report.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
01-27-2015 02:52 PM
Thanks for the reply.
As someone who doesn't get to go through the design process of larger systems it is nice to get some insight.
01-28-2015 03:01 AM - edited 01-28-2015 03:02 AM
I've been doing some work recently with software that uses two CAN buses - I think with CAN it's recommended that the CAN bus loading is under about 70% to avoid missing messages due to arbitration/conflicts on the bus so it's a useful statistic to have to verify you're not overloading the bus. Also, most other CAN tools I've used allow you to see this - Kvaser CANKing and PCAN Explorer.
Plus, it can also help you see at a glance if a device or part of the CAN bus isn't working - if you're used to seeing 50% utilisation and it suddenly drops to 10%, there's a good chance that either some devices are unpowered or there's a break in the CAN bus.
02-12-2015 06:46 AM
Hi,
I am using NI-XNET. I want to use in labview program.
Regards,
Ajeet Kumar
02-12-2015 07:25 AM
@Ajeet_Kumar wrote:
I am using NI-XNET. I want to use in labview program.
Then do it what's the problem?
On a more serious note if English isn't the language you are most comfortable with feel free to post in another subforum for your most native speaking language.
Another suggestion is to make your own post instead of continuing one that isn't relavent to your question.
And if you do post please follow the guidelines linked in my signature. Use clear sentences, and provide as much information as possible.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord