06-24-2009 04:08 PM
I have a device which outputs CAN J1939. I would like to get my Labview Real Time target to recieve messages from this device. I am using SIT for the model on the real time target. I created several CAN channels with the correct arbitration ID of the specific data I want using MAX and signals can be read from the device correctly using the test panels in MAX. I configured my RT target using the SIT connection manager. I configured the CAN PXI card that is in the target using the CAN channel configuration file I created in MAX. For some reason, I cannot get the RT target to read the messages output by the device as I could in MAX. Is this not supported with Labview RT or is it something else? What am I doing wrong?
Thanks,
Eric
06-25-2009 09:22 AM
Hi Eric,
Here is a good KB to double check that your doing every thing correctly.
Setup an NI-CAN Real-Time Application in MAX
http://digital.ni.com/public.nsf/allkb/D2D8B947369F453986256F89006F40B0?OpenDocument
When you say you CAN can't get it to read, does it give you errors or juts not read anything?
Thanks
Scott
06-25-2009 09:34 AM
It does not give errors, it just reads zero. That document is more for just Labview realtime. I am using SIT for my model. In the SIT connection manager, there is a field when setting up hardware that asks for a configuration file. I have created these files by specifying messages and channels in MAX and then saving them to file. It works if the arbitration ID is 0x0 to just send messages from one thing to another, but I have a device which uses the J1939 protocol (arbitration ID is 0x18FFDB3F). I created channels in MAX that can recieve this information (I was using the test panels in MAX to see if it worked and it does), but when I specify the configuration file in SIT connection manager, it doesn't seem to work. I just get a zero as a response.
-Eric
06-28-2009 08:15 PM
Hi Eric,
Let's start with the basics:
06-29-2009 08:36 AM
I am using a PXI-8106 controller with a PXI-8464 CAN/XS Series 2 card. I am using Labview 8.6.1. I have tried a wrap back test with the J1939 arbitration ID I want (0x18FFDB3F) and I still get no response, just like with the device I am trying to communicate with. The wrap back test works with and ID of 0x0. If I just use the 0x18FFDB3F ID in MAX, I do get a response and it is correct. Is J1939 not supported in Labview RT and/or SIT?I am linking the message to the model through SIT Connection Manager. I save the configuration as a .ncd file in MAX and then open that file in the configure hardware section.
-Eric
06-30-2009 06:31 PM
Hi Eric,
I got your message this afternoon. I will attempt to reproduce your issue on Wednesday. Stay tuned!
07-01-2009 10:50 AM
It appears that my wrap back test is no longer working with any configuration in RT. I had done it before (before I started trying the J1939 configuration out) and it had worked with the 0x0 arbitration ID and 11 bit frame format. Now it does not work for either 11 bit or 29 bit. The CAN card still works correctly in MAX for all configurations. Does baud rate need to be changed when running in RT? My device outputs at 250k. I'm not sure if that is relevant.
-Eric
07-05-2009 07:25 PM
Eric, you may need to set the default CAN interface baud rates in MAX if you are not explicitly setting it in your program. The configuration is slightly different from DAQ cards and people often miss it. In MAX, look under Tools -> NI-CAN -> RT Hardware Configuration.
07-06-2009 06:36 PM
Hi Eric,
What example program are you using, can you post screenshots of the MAX configuration for the RT target that Paul had mentioned? Also, can you post the CAN database that you are targeting with the SIT Connection Manger? It would probably be also a good idea to post the MDL and DLL that you are using with SIT too.
07-07-2009 01:17 PM
Here is everything I'm using to try the loop back test. Port 1 and port 2 are connected through a serial cable.
-Eric