NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Messaging Routines across LabVIEW/C++ Code

One of the nice things that LabVIEW does is to abstract away the operating system on which it is running.  This makes using Queues/Events/FIFO's simple for applications that have to be used on PXI's, cRIO's, etc.  With the possibility of using C++ tools for architecture and LabVIEW as a scientific computing platform, this abstraction becomes difficult to manage (in my mind).

With the use case of developing a very large application that will have a long life span and development cycle, I am considering development in C++ for all administrative code while using LabVIEW for scientific computing.  Given this desire, I perceive a need to build my own operating system encapsulations to prevent coupling in the architecture with any given OS. 

Does anyone have any idea how one might pass queue/fifo/event references across a LabVIEW/C++ architecture?  Having read the VxWorks reference manual, I can appreciate that there is not necessarily a one-to-one relation with the interfaces LabVIEW provides and what is provided on any given OS - I am sure this is the case for RT Linux too.  I understand that POSIX isn't scoped for RT applications yet either.

Regards,

Jordan

Jordan McBain, PhD
LabVIEW Controls Engineer
Revolutionary Engineering
0 Kudos
Message 1 of 5
(3,805 Views)

This is certainly related https://decibel.ni.com/content/message/3357#3357 but not quite what I am after.

Jordan McBain, PhD
LabVIEW Controls Engineer
Revolutionary Engineering
0 Kudos
Message 2 of 5
(3,163 Views)

There are many options for communication protocols between LV and C, although most are going to require some code to be written both on the LabVIEW and C++ side of your interfaces to package and unpackage your data.

I would recommend you should check out DDS. It's a communication protocol that we use extensively for sharing data between LV and C, C++, and C# (also supports Java and a few others) and pretty much any processor/OS combination you can think of. Supports communicating over shared memory internally to a cRIO (or PC) and can communicate over UDP and TCP externally between machines. For a large project with a long life span it's actually an ideal solution for you since it's standards based and there are open source and multiple commercial vendors available.

We use RTI's implementation as the messaging backbone of many of our products and I highly recommend it, although it is not free once you are working outside of LabVIEW it is well worth the price in my opinion.

http://sine.ni.com/nips/cds/view/p/lang/en/nid/211817

Graham

Message 3 of 5
(3,163 Views)

Fantastic. Thank you.

Jordan McBain, PhD
LabVIEW Controls Engineer
Revolutionary Engineering
0 Kudos
Message 4 of 5
(3,163 Views)

Wow. Super impressed. Where's the kudos button? geez

Jordan McBain, PhD
LabVIEW Controls Engineer
Revolutionary Engineering
Message 5 of 5
(3,163 Views)