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.

NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Are there some document about mixed mode development (C++ with LabVIEW)

Dear All:

I'm dealing with IEC 61850 ethernet, and the TCP frame type is TYPE 88ba, the payload are encoded with TLS, I have a verified C/C++ coder who's willing to help me decoding the frame date.

I noticed we can include C/C++ code in DLL while we are in windows, even in phalarps, but I didn't found much of information on NI site about that, but I assume that should work, since Linux should be more friendly to C?

Also, would it be possible if I want to use C as main development tool, and include some working codes LabVIEW provided in C?

So, are there any guideline about C/LabVIEW mixed mode development?

Thanks!

0 Kudos
Message 1 of 5
(4,689 Views)

You have a few options to mix LV and C on the Linux targets. 

You can use the call library node in LV to call compiled code.  I think the Linux equvalent of .dll is .so.  This works well if most of your coding is done in LV but you have a few existing algorithms or some driver calls that you need to make from C. 

The other option on Linux is to run a program created and compliled in parallel with your LabVIEW code.  The Eclipse tool-chain is supported on all the Linux targets for developers that want to use C.  If you want the program created in Eclipse to communiate with LabVIEW you will need to impliment a communications channel between them.  Common options are an IP connection (you can use localhost) or File R/W. 

As a side note, depending on the complexity of the 61850 application, you may want to start with a stack instead of doing low level decoding.  If you search on-line you can find some companies who have stacks.  You may also want to send a request to NI through your local support.  NI has a 61850 tool-kit but I think today it only supports MMS and GOOSE.  I don't know the status of SV support but I know there is an active dev team.  It never hurts to ask. 

0 Kudos
Message 2 of 5
(3,386 Views)

Hey jiangliang,

We definitely recognize the need for more documentation on this topic and its something we're working on improving by adding more tutorials and examples.

Here are some of the introductory documents that I think are useful for you,

Building Applications for NI Linux Real-Time

http://www.ni.com/tutorial/52578/en/

Getting Started with C/C++ Development Tools for NI Linux Real-Time

http://www.ni.com/tutorial/14625/en/

C/C++ Embedded System Design Tools

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

During NI Week we gave a handson on titled, Explore C Develoment Options with 3rd Party Packages with NI Linux RT. I'll attach the presentation and exercises. The exercises are,

C/C++ Application with Eclipse with NI Linux Real-Time Target

oSet up environment

oRun an application on the target


Explore CLFN and Shared Libraries with NI Linux Real-Time Target

oCall into a shared library on target

oWrite a wrapper to interface with shared library on target


FPGA Interface C API in Eclipse with NI Linux Real-Time Target

oCall into NI Linux Real-Time target’s running FPGA bitfile with FPGA Interface C API in Eclipse


Using Open Source Software with NI Linux Real-Time Target

oTake a look at opkg repository

oCompile OSS on NI Linux Real-Time Target

Note that the exercises do require that you have an NI Linux RT target to develop on.

Lastly, there are a number of examples provided in the documents section of this community on different IPC techniques. The IP sockets ones might be of interest to you.

https://decibel.ni.com/content/groups/ni-linux-real-time?view=documents#/?tagSet=undefined

Hope you find these helpful.

Tim A.
Message 3 of 5
(3,386 Views)

I also recommend starting with this article:

Choosing a Software Architecture for Programming NI Linux Real-Time Systems

http://www.ni.com/tutorial/52579/en/

The tutorial walks through the options for mixed mode software architectures and leads you to the relevant getting started tutorials based on which architecture you choose:

Using LabVIEW for NI Linux Real-Time System Design (while integrating C/C++ shared libraries)

http://www.ni.com/tutorial/52572/en/

Building C/C++ Applications for NI Linux Real-Time

http://www.ni.com/tutorial/52578/en/

National Instruments
Message 4 of 5
(3,386 Views)

NI also provides a LabVIEW Toolkit for IEC 61850 - http://sine.ni.com/nips/cds/view/p/lang/en/nid/210960.


Are you looking to do GOOSE, MMS, or SMV?

Sunaina K.
Product Marketing Manager for CompactRIO & TSN

Making the intangible, tangible
0 Kudos
Message 5 of 5
(3,386 Views)