LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-XNet Problems

Highlighted

I'm learning and reading about CAN communications as I go! Like I said, this whole thing is completely new to me, so I'm doing research and reading everytime it seems like I need some new information. I feel like I need to reiterate again the fact that I'm very thankful for the help I've received. 

 

I've attached the gutted database that we're using: it doesn't have the thousand or so messages, just the few that we're looking to read. We're communicating to the ECM of a CG137 engine which uses the J1939 protocol.  

0 Kudos
Message 11 of 22
(856 Views)
Highlighted

I don't know if you and I are using different versions of XNET, but even with your DBC file, I get a broken wire between the XNET Signal constant and the property node - I do not have the "Signals" property available.  I'm using XNET 1.1.1.  I assume you do not get this broken wire, but I wonder if that's part of the problem.  I can get rid of the broken wire by replacing the property node with Build Array, although I still can't run your example as I do not have an appropriate CAN card.  Does the same replacement work for you?  Are you using a more recent version of XNET?

0 Kudos
Message 12 of 22
(853 Views)
Highlighted

I agree with nathand, it seems you are doing something wrong with the signals. You are not select them right.

 

I have tried to correct your vi a bit. Hope this helps you.

 

0 Kudos
Message 13 of 22
(849 Views)
Highlighted

Sorry I've been out for a while running other tests, but now I've had a little time to revisit this CAN issue. You mentioned that I'm doing something wrong with the signals, what could that entail? Is there a way to adjust the signals or some type of setting I can change? As far as I know, the only thing I can do when bringing the signals in is select the signal box, drag it into my vi, ensure it's calling the proper signal from the database and connect it. Perhaps that's why this process has been so maddening for me, there's some simple solution that I am just completely ignorant of.

0 Kudos
Message 14 of 22
(830 Views)
Highlighted

Using one of the examples I was able to read frames. I tried copying it block for block but it didn't work, just like some of the signal examples which I have been messing with. I think there must be something that I'm doing fundamentally wrong, but it seems to be eluding me. Considering I'm able to get something from the frames and nothing from the signal blocks, would it be worth my time and effort trying to figure out how to manually parse the frames to get my temperature readings? From what I can tell, it seems that the signals are there to help you avoid this step (which I have been desperately trying to avoid) but if they aren't working, then what other option do I have? Please correct me if I'm misunderstanding my own problem. Despite all the time I've put into this, Labview and XNET's methods still seem incredibly hazy to me. 

0 Kudos
Message 15 of 22
(820 Views)
Highlighted

Hi Christian,

 

What hardware are you using to pull in the CAN packets, something like an 8473? Also, which examples are you looking at for guidance?

Cheers!

TJ G
0 Kudos
Message 16 of 22
(801 Views)
Highlighted

We have an NI PCI-8512 CAN/HS card. As far as examples go, I've looked at all of the XNET examples that are provided to some extent or another but primarily have been focused on the CAN Signal Input XY example. 

0 Kudos
Message 17 of 22
(788 Views)
Highlighted

Hi Christian,

 

This is a really good getting started guide for the X-NET API. Have you seen it before?

Cheers!

TJ G
0 Kudos
Message 18 of 22
(772 Views)
Highlighted

I read through that before I started and again when I started to encounter issues. I've tried running all of the examples and the only one that has actually run correctly (as far as I can tell) is the 'Frame in Stream' example. Do you think there may be a problem with interfacing with the ECU because it is running J1939 protocol?

0 Kudos
Message 19 of 22
(761 Views)
Highlighted

Are you still getting the "empty name for an XNET database object error"?  That would be the first thing to resolve, maybe try opening the database in the XNET database editor and then save it as an XML file.

 

In addition, I just went back to look at your database and your log file again, and I noticed that the IDs you are looking for (according to the database) never appear in your log file.  If you're not getting an error but also aren't reading any data, this would explain it.

0 Kudos
Message 20 of 22
(749 Views)