Showing results for 
Search instead for 
Did you mean: 

Share network variables, or just sharing data

I have never used the the NI shared network variables before.

Is there some type of common interface DLL out there that other programming languages can use?

For example could a python or C#, or c++ developer send me some data and I would just pick it off the shared network without fear of misinterpret data, or corruption?


So, this question is asked many times online and at the NI forums. "What is the best way to share data between programs?"


Well the very nature of that question so so generic there is no real answer.

I have written several applications over the years ranging from active x server to TCP listeners for the exchange of data.


I'm getting tired of doing this.


You just cant tell some other group to "send me an ASCII string of something" and I'll type cast it.  HA!!

Guess what, almost every other language out there uses a terminating character for there strings, while labview uses a character count for the first word of the data. Your type cast FAILED!!!!


That is just one example, don't get me started on the nuances of the IEEE 754 number specifications and how some languages out there kinda follow it. 


Anyways, I'm rambling,,,


I want a method of sending data in and out of LabVIEW to the rest of the world in some type of API fashions without the nasty overhead of idiot proofing the data transport.  (of course I still need to do my internal idiot proofing, I'm ok with checking the range of a 'double'. I don't want to be checking if the 'double' has the correctly formed mantissa or if somebody sent it to me little Indian)

I want somebody else to manage that code.


I understand there will be tradeoffs for speed vs efficiency. Lets start with the easy slow one first for the programmers out there that insist on using non-graphical programming. 






Engineering - The art of applied creativity  ~Theo Sutton
0 Kudos
Message 1 of 4

Have you explored using web services?

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
Message 2 of 4

That looks interesting.


I have used web interfaces before, but only with real time targets to allow end users easy access when deployed.


I was looking for something that has less development impact on me. I'm in a regulatory industry, so everything I write must be maintained for many years, and peered reviewed by many people. Anytime that I need to add a new variable the interface must also be changed along with any software that goes with it. (often the peer review is more expensivie than the software development)

So the needs to have COTS (Customer Off The Shelf) solution is greatly emphisized.


That is why I was looking into the shared network variables.

If there is a third party tool that already manages the data, then that is one less code review.

(documentation and configuration reviews are cheaper)



Engineering - The art of applied creativity  ~Theo Sutton
0 Kudos
Message 3 of 4

It looks like this topic has lost steam. 


I'm surprised this isn't a more intense conversation. There are many applications that need to share data.


In my application I have many hundreds (in some few cases in the thousands) of different types of data streams including DIO, Analog, and many different types of Serial buses.


My application is already controlling the hardware and data streams, but others want to peak into my I/O including what is happening on the serial buses.


To create a 'get' function for each I/O in a web page would seem farily intense (although I could probably create a VI script to help build it).


I was looking for solutions along the lines of maybe coping the data into a VISA service (if that is possible), or publishing to a datasocket server, or creating a network published variable.


I need to be considerate of the possibility of hundreds of serial buses banging a service and the possible bandwidth impacts. So I'm searching for a solution that is both easy to implement and low on resources.


For now I'm leaning towards datasockets. Does anybody have an opinions on this?

Engineering - The art of applied creativity  ~Theo Sutton
0 Kudos
Message 4 of 4