LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XNET session problem on cRIO

I’m having a problem reading all the CAN signal into my LV vi through an XNET session on a NI 9862 cRIO module.  I’ve got roughly 12 signals available to read from my device, but I can only get values in the my LV application on a few of them.  The most important signal I need is the speed signal, bytes 5 & 6 on ID# 302 (for a Racelogic device)

 

Here is my hardware: cRIO w/ 9014 RTC & 9111 FPGA, NI 9862 XNET module, Racelogic VBSS GPS Speed Sensor.

 

The 9862 is powered and I’m already reading in signals from another device correctly, so I don’t think the setup from that respect is an issue.  I suspect my problem revolves more around the XNET session in the project.  I’ve tried setting it up multiple ways.  I’ve created an .xml file using the XNET Database Editor to create the frames and signals from scratch, then called that .xml from within the vi with the XNET Create Session vi.  Next I tried creating the XNET session from with the project and wired that directly into the XNET Read vi.  These did not yield any working results.  Lastly I was able to obtain a .dbc file for the Racelogic speed sensor.  That is where I’m able to get 5 of the 16 signals to work.

 

That is a pain, but my biggest dilemma is that I plugged a USB CAN Monitor 8473s into the bus and am able to verify that there is data in bytes I’m specifically looking for.  So I have functioning devices, I have data on the bus, but I can’t read values into my app.  Any ideas why?

Download All
0 Kudos
Message 1 of 8
(3,767 Views)

Sorry, here is the vi as well.  It is pretty messy since just trying to get it to work at the moment.

 

Another question I meant to post originally, what is the asterisk next to 0x301 and 0x302 in the CAN BusMonitor?

0 Kudos
Message 2 of 8
(3,765 Views)

I haven't taken too close a look at your code yet but just real quick what signal type are you using in your XNET session? Single PT, Waveform, or XY? What are you seeing for the signals... anything? Are you even seeing the frames or is nothing showing up.

Ryan
Applications Engineer
National Instruments
0 Kudos
Message 3 of 8
(3,736 Views)

I've tried both frames and single points.  I am seeing that values are filling the indicators, but they are all zeros.  I have verified throug the an NI USB 8473s and the MAX Bus Monitor that there is non-zero data in the CAN frames.  So the crux of my dilema is, why can I not see that data on my VI indicators?

 

Since my previous posts, I was able to obtain a .dbc file for the device.  So I can get the data out of it with that method.  Now, I'm just currios why I can't do it using the XNET Database Editor and the .xml file, since the sales pitch to buy the 9862 modules was the easy setup of frames and signals.  It seems to me that the manuals (and any search results I found) do not detail the steps to setup the frames and signals adequately to acheive this.  If there is some reference out there that does, I'm interested in viewing it.

0 Kudos
Message 4 of 8
(3,723 Views)

Hi AMP12, 

 

I apologize that you have been having trouble reading data from the database editor. Here are some generic resources that may help you to fill in any of the blanks when setting up your CAN interface. 

 

http://www.ni.com/white-paper/12375/en

 

http://digital.ni.com/public.nsf/allkb/861A0C84FB4B75DB86257958005B29A8?OpenDocument

 

 

Could you also try running a loopback test just to double check and make sure your hardware is able to communicate with LabVIEW and is running properly?

http://ae.natinst.com/public.nsf/web/searchinternal/29b1ba306adb423a8625761800594631?OpenDocument

 

Here is the Manual I don't know if it is the same as yours but this is the complete one

http://www.ni.com/pdf/manuals/372840f.pdf

 

Here is some more information on the editor

http://www.ni.com/white-paper/9715/en

 

I hope this helps

 

Ryan
Applications Engineer
National Instruments
0 Kudos
Message 5 of 8
(3,706 Views)

Hi there, we are also having problems reading CAN signals on our NI 9862 module with a cRio 9024. How did you manage to use the NI-CAN BusMonitor? We have tried using the Xnet bus monitor but have subsequently found out that it does not support remote targets such as the cRio.

 

Thanks

0 Kudos
Message 6 of 8
(3,663 Views)

Here is a Knowledgebase article that explains what you just told me and gives an alternative which is a loopback test VI that comes with XNET

 

http://digital.ni.com/public.nsf/allkb/92F10284E8061FB68625793600484D79?OpenDocument

 

Let me know if it is helpful.

Ryan
Applications Engineer
National Instruments
0 Kudos
Message 7 of 8
(3,646 Views)

I didn't use the NI-CAN BusMonitor directly with XNET since, as you found, it doesn't work with cRIO.  I used a CAN to USB adapter (NI USB-8473s) to tap into the CAN bus.  That device shows up in MAX in the devices and interfaces section.  Then you select the CAN port #, and it gives you an option to view the bus monitor there.

 

An easy work trouble shooting maneuver if you have the NI USB-8473s, but if not I don't have any other options for you.  I could see that the signal exited on the CAN bus, but then there is still the matter of playing with the database setup to read your signals correctly.

0 Kudos
Message 8 of 8
(3,633 Views)