LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error logging with a usb-8473 high speed can interface

I wrote an application that monitors data from a board - mostly status of the board. I am using the NI USB-8473 High-Speed CAN Interface. My application consists of a while loop that writes a request every 100 milliseconds and another while loop that reads every 20 milliseconds. When it reads it parses the data accordingly. This program is suppose to log errors on the BUS. I am currently using the ncGetAttr.vi and reading Transmitt Error Counter and Receive Error Counter, but I am not sure if these two are the ones that I need. I noticed that if I run the application and then disconnect one of the interfaces (not the usb cable connected to my computer, but disconnect the computer that's responding to my requests) this number goes up until it hits 128 and then it stays. If I reconnect the interface, that number starts going down back to 0. It looks like all it is doing is keeping track of the frames I sent that were not read by the other computer (or board).

I have made it so if this number returned is ever greater than 0, then I increment an error counter. I still have to add more logic, because when I reconnect the interface this numbers goes back to 0. 

 

Do any of you guys have any experience with this interface? Is there a better way to log errors? 

0 Kudos
Message 1 of 5
(3,008 Views)
Anybody can help me on this one?
0 Kudos
Message 2 of 5
(2,995 Views)

Can anybody help please? I thought that these forums were supposed to be helpful...

 

Let me add to my OP then. I found some examples in teh Find Examples section, but I can't get them to run, because I

am missing some dependencies I guess...

 

There is a few things these guys are using in the example... such as when Initializing the CAN interface, they set the flags

Log Bus Errors and Log Tranceiver Faults, but then I can't follow the example anymore... 

 

When I set this flags, how do I then read the errors?

 

I'll attach a picture of what I see right now, but the whole thing is broken so it won't run...

 

Please help...

0 Kudos
Message 3 of 5
(2,976 Views)

carspidey wrote:

I thought that these forums were supposed to be helpful...


Smiley Happy Definitely 100% true. But can you post it again in the appropriate board for more responses. Please post in Automotive and Embedded Networks and Industrial Communications

0 Kudos
Message 4 of 5
(2,974 Views)
Thank you very much... I was looking for a more specific sub-forum but I could not find it... I guess I did not look hard enough... thanks...
0 Kudos
Message 5 of 5
(2,972 Views)