12-19-2015 09:27 PM
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!
12-21-2015 09:07 AM
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.
12-21-2015
09:22 AM
- last edited on
01-09-2025
09:24 AM
by
Content Cleaner
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
https://www.ni.com/en/shop/linux/building-c-c---applications-for-ni-linux-real-time.html
Getting Started with C/C++ Development Tools for NI Linux Real-Time
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YHR7CAO&l=en-US
C/C++ Embedded System Design Tools
https://www.ni.com/en/shop/linux/c-c---embedded-system-design-tools.html
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://forums.ni.com/t5/NI-Linux-Real-Time/ct-p/7013
Hope you find these helpful.
12-21-2015
10:50 AM
- last edited on
01-09-2025
09:25 AM
by
Content Cleaner
I also recommend starting with this article:
Choosing a Software Architecture for Programming NI Linux Real-Time Systems
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)
https://www.ni.com/en/shop/linux/using-labview-for-ni-linux-real-time-compactrio-systems.html
Building C/C++ Applications for NI Linux Real-Time
https://www.ni.com/en/shop/linux/building-c-c---applications-for-ni-linux-real-time.html
12-23-2015
09:51 AM
- last edited on
01-09-2025
09:26 AM
by
Content Cleaner
NI also provides a LabVIEW Toolkit for IEC 61850 - https://www.ni.com/en-us/shop/product/ni-industrial-communications-for-iec-61850.html.
Are you looking to do GOOSE, MMS, or SMV?