Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

nican backwards compatibility between nican versions 2.1.3 and 2.6

Hello folks,

 

I have inherited a VC++ application that uses nican.  It was apparently compiled using nican version 2.1.3 (assumed to be true because the VC++ program works with nican 2.1.3).  We recently installed LabVIEW 8.6 (including nican 2.6) and the VC++ program no longer worked.  After uninstalling nican 2.6 and reinstalling 2.1.3 the program works again.  This is fine except that for new development, we would like to use the nican 2.6 (the latest we presume?)

 

This raises a couple of questions:

1. Is nican 2.6 expected to be backwards compatible with 2.1.3?

 

2. If the answer to the question above is "yes", then can anyone offer any suggestions on why the VC++ program would no longer work when nican 2.6 was installed?

 

3. If nican 2.6 is not backwards compatible with nican 2.1.3, where can I find the necessary documentation (e.g. well documented .h files etc) to begin trying to decipher what is and isn't compatible so I can make the necessary changes?

 

Any help is greatly appreciated.

Best Regards,

Chris

 

 

  

0 Kudos
Message 1 of 8
(7,927 Views)

Hi Chris

 

First off, yes NI-CAN 2.6 is supposed to be backward-compatible to previous NI-CAN versions.

 

What's the symptom you are seeing? Do you get an error message? Even if your application does not report an error message, you can 'look under the hood' of your application using NI-Spy. When you use NI-Spy to log the NI-CAN fucntion calls first with NI-CAN 2.1.3 installed and then with NI-CAN 2.6, are there any differences (errors)?

 

Launch NI Spy at:
Start » Programs » National Instruments » NI Spy

 

-B2k

0 Kudos
Message 2 of 8
(7,920 Views)

Hello B2k,

 

Thanks for the information.  I wasn't too sure where to start, so I don't have any more information yet.  The application does not report any errors, it just doesn't "do" anything.  For example, when I connect to the UUT using the VC++ application, the first thing I would normally do is read the EEPROM (over CAN), but this doesn't work with NICAN 2.6 installed.

 

It looks like NI-Spy may very well help me determine where (i.e. what calls) are failing, thanks.

 

1. Do you know where NICAN 2.6 puts nican.dll and nican.h?

 

2. You explicitly stated that NICAN 2.6 should be backwards compatible with 2.1.3, but IF something has changed in the interface (e.g. a function signature etc.) do I need to search the nican.h files to try to find the difference, or do you know of another document that lays them out more clearly? (I found several documents/revisions on the NI website (e.g. "NICAN Programmer Reference Manual" and "NICAN Hardware and Software Manual and Specifications"), but I don't have any idea which document/revision goes with which version of NICAN?

 

Thanks for your time and the helpful information!

Chris 

0 Kudos
Message 3 of 8
(7,910 Views)
Hi Chris,


  • The nican.dll file should be located in the %WinDir%\system32
  • The nican.h file should be located in the %ProgramFiles%\National Instruments\NI-CAN\MS Visual C\
          o Newer versions of NI-CAN (incl. 2.6) additionally install the header file (and the libraries) in a new location:
            %NIEXTCCOMPILERSUPP%

There is no behavioral change that I can point you to that  'is known' to break applications. Since NI-CAN 2.1.3, there have been several bugs fixed, so there have been changes. But unless the application was making use of a behavior that a bug exposed (which by fixing the bug got changed), I don't know of any functions that got modified.

If the NI-Spy approach does not help, could you try intermediate versions of NI-CAN (e.g. 2.2, 2.3, 2.4, or 2.5) to isolate the problem?

What CAN hardware do you use, what OS are you running on?

-B2k
0 Kudos
Message 4 of 8
(7,905 Views)

Has a solution been found for this problem? I am having similar issues between CAN 2.5.2 and 2.6.1 with LV8.5   With 2.6.2 installed I get nothing... no communications on the BUS monitor and no error messages. 

 

-Eric

0 Kudos
Message 5 of 8
(7,852 Views)

Hello Eric,

 

Other than the statement that CAN 2.6 should be backwards compatible with 2.1.3, no solution has been discovered.  I haven't been able to investigate this any further because uninstalling CAN 2.6 and reinstalling 2.1.3 allowed the VC++ program to work, which has rendered this a "back burner" issue (managerially speaking).

 

Best Regards,

Chris

0 Kudos
Message 6 of 8
(7,841 Views)

I finally figured out what was going wrong with my system.  Apparently, the default CAN settings for different driver versions are not the same and your preferences are not saved when the new version is isntalled.  Version 2.6 has a default Baud rate of 125kHz. If this is not your intended rate, you may just need to update your device preferences.  At least this worked for me.

 

-Eric

0 Kudos
Message 7 of 8
(7,839 Views)

Eric,

 

Thanks for the info.  I didn't not even look at the settings after I installed CAN 2.6.  As soon as I get a chance, I'm going to reinstall 2.6, check the settings, and see if that works.

 

Best Regards,

Chris

0 Kudos
Message 8 of 8
(7,832 Views)