10-26-2009 12:17 PM
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?
10-27-2009 11:17 AM
10-29-2009 12:02 PM
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...
10-29-2009 12:10 PM
carspidey wrote:I thought that these forums were supposed to be helpful...
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
10-29-2009 12:14 PM