To download NI software, including the products shown below, visit ni.com/downloads.
Functional Description
The VI has a subVI that was modified (NetClusterArrayTo2DStringArray_Modified_LV85.vi) to make the NI-CAN example, CAN Receive.vi, appear more like Measurement & Automation Explorer's Bus Monitor (CAN Receive_Modified_LV85.vi). It keeps track of the arbitration IDs that are received, which allows the VI to overlay new data for previously tabled arbitration IDs or it adds a new line for newly received arbitration IDs. This prevents the CAN Receive.vi from displaying multiple lines of the same arbitration ID and only the latest information for that particular arbitration ID. Added programming was included to the CAN Receive example to calculate approximate Bus Load on the CAN Network. This was derived from the NI-CAN CAN Receive with Bus Load Monitoring example.
Caveats and Additional Notes
This example uses the Frame API. NI-CAN driver must be installed as well.
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Great stuff! Thanks for posting.
Could you save it as 8.5
Added in LabVIEW 8.5 too...
Great Stuff Tyler... I have few questions. Why do we need to enter a value for Number of Arbitrations to Monitor? What is this actually doing. Will this limit the Bus load percentage if the number of arbitration ID's that are received on BUS are morethan 10. What should we do if we need to see all the Arbitration ID's that are received on CAN bus.
If I recall, that was just to initialize the size of the array used for the table. If you have 20 IDs, you should make that 20. The only trouble here is if you are unaware of how many arbitration IDs you will be working with, then you'd need to choose a large number or change the logic that determines the array size.
Tyler, Iam trying this vi to monitor the busload. When I run the vi Iam seeing a Bus load of 0%, but when I monitor the busload through CAN Busmonitor from MAX i see a bus load of 6-7%. Can you please help me in trouble shooting this. I really very much need this vi. I am attaching the snapshot of the 2- cases.
I don't have the hardware to test this out, but you'll probably need to tweak the approximation factor for your given baud rate. Again, I don't have the hardware or else I'd try to give you a better idea. I hope this helps.
hi great job dear friend
i try to run this your vi but when change data or id or anything else i only the firt line changed i just keep the last data