From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

How to compile/link xnet with eclipse for cRIO 9068

Solved!
Go to solution

Hi all,

 

I'm using a cRIO 9068 with a NI9862 (CAN module).

I'm programming in C/C++ with Eclipse on windows

 

Without trying to access CAN via xnet, the C application compiles and runs fine on the 9068.

Now I want to use xnet functions to access CAN.

I found an nixnet.h in <NI installation dir>\Shared\ExternalCompilerSupport\C\include, so the compiler is satisfied.

But the linker doesn't find a library (I tried "nixnet" and "xnet") neither do I find a xnet library for cRIO 9068 on my harddisk.

 

Where do I find this library? Do I have to install another xnet driver besides the normal xnet driver (which I have installed, version 14.0).

 

Thanks for your answer in advance

0 Kudos
Message 1 of 4
(5,246 Views)
Solution
Accepted by JensT

Hi!

 

the driver readme states the following:

The NI-XNET software supports Microsoft Visual C/C++ version 6.

But for Linux-RT based targets (cRIO 906x and 903x) in combination with XNET modules (986x) I found a ressource that states that you should be able to include the "nixnet.h" header (as you seemingly already have done) and "link against libnixnet.so at runtime to get correct symbols"

 

You should find the according file in the following folder:

C:\Program Files (x86)\National Instruments\RT Images\NI-XNET\Linux-armv7

 

Best regards

Christoph

Staff Applications Engineer
National Instruments
Certified LabVIEW Developer (CLD), Certified LabVIEW Embedded Systems Developer (CLED)


Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved
Message 2 of 4
(5,219 Views)

Hi Christoph,

 

thank you for the solution.

It compiles and works now (at far as I tested read serial number of module and blink LEDs).

0 Kudos
Message 3 of 4
(5,213 Views)
Solution
Accepted by JensT

That sounds nice Smiley Happy

Staff Applications Engineer
National Instruments
Certified LabVIEW Developer (CLD), Certified LabVIEW Embedded Systems Developer (CLED)


Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved
0 Kudos
Message 4 of 4
(5,208 Views)