11-07-2019 12:49 AM
I'm developing an application using LabVIEW NXG 4.0.
I have one question, will Shared Variable and Network Stream be obsoleted in near future?
Why I have the concern is, those functions are listed in
Data Communication >> Compatibility
I don't know why the pallet has such name. If those functions are official, name of the pallet should be renamed.
If those will be replaced, I don't want to use those in my application.
In my experience, it was fact that the use of Network Stream had some difficulty,
so if new method will be implemented, it is really good new for me.
11-07-2019 03:48 AM
If I understood correctly: yes, both will be obsoleted in NXG.
Alternatives are promised.
As both are networking techniques (at least network bound SVs), the alternatives will be build more openly on those networking techniques already available. At least, that's how I got the message.
I'm not sure if automatically converting SV\networkstreams from CG to NXG is on the roadmap.
I also hope, but am sceptic, those new libraries will be classes. So if they don't do exactly what I want, I can make a child that does.
11-07-2019 07:10 AM
Shared Variables are already replaced by the Tag API. Based on meetings from many years ago, I believe NI plans to replace the Network Stream with a Stream API eventually. It should look something similar to the Tag API.
Personally, I am not a huge fan of the Network Stream. I just use the TCP/IP library and usually throw the STM library on top of it.
And I still say Network Published Shared Variables are evil.
11-07-2019 07:23 AM
@crossrulz wrote:
Personally, I am not a huge fan of the Network Stream.
And I still say Network Published Shared Variables are evil.
Couldn't agree more.
11-07-2019 07:42 AM
As a CLA I shared the 'shared variables are evil' thought for years. I don't like them because it seems to rely on black magic. But, I have lab which has run for years with no issues using many shared variables. I have a test system using teststand that has not had a problem in 10 years and it is based on SV's.
I'm using on a new project and the ease of use with distributed system manager is a great bonus.
What are the complaints, any horror stories to share? Thanks!
Will the replacement tag engine be a fit for purpose replacement?
11-07-2019 08:46 AM
@MichaelS78 wrote:
What are the complaints, any horror stories to share?
Let's be clear that I am talking about Network Published Shared Variables. I have had no issues with Single Process Shared Variables. But I have had very interesting race conditions due to NPSVs (write the value and then read it and it is still the old value since the update has not been published). My biggest issue is the lack of protection for the data (any computer can write to the variable, again causing interesting race conditions). Every project I have been involved in that used NPSVs suffered from at least one of those conditions.
@MichaelS78 wrote:
I'm using on a new project and the ease of use with distributed system manager is a great bonus.
Will the replacement tag engine be a fit for purpose replacement?
The new Tags will work with System Link, which I think is also supposed to act as a replacement for DSM (I am not going to swear to that).
11-07-2019 11:16 AM
@MichaelS78 wrote:What are the complaints, any horror stories to share? Thanks!
NBSV are globals on steroids. So everything that goes for globals, goes for SV. They're required for FPGA, but other than that, I avoid them.
I usually like to have full control, and SV are not that tame. They do as expected, but only if I lower my expectations.
Put them anywhere (like normal globals)! But there's no way to find them! See how that works in a (inherited) 3000 VIs application. **
I remember the "first read always gives an error" issue. The solution: to put a for loop around the read... Really? **
Where to put the SVE? c or PC? What if there are 5 PCs and 5 cRIOs? I really don't want to think about it. **
I like my libraries to make simple things easy, and hard things possible. Not easy things easy, hard things impossible. I really don't like the "take it as it is or DIY" character of SVs. DIY it is...
Honestly, I gave up on them pretty much immediately. Too complex for me.
** Not sure if this got fixed, but I gave up before that.
11-07-2019 04:27 PM
Ah, i see. race conditions, hosting and finding, update delays etc... I agree with all of those. Thanks for the input. This info (obsolesence) now gives me a kick in the right direction to move away from Data Dashboard and try out the new web module with tags. Secureity is a big issue with NPSV's. I wonder what will happen to DSC? ( I dont care that much, I have never used it)
11-07-2019 06:23 PM
I'm very surprised my post caused heated discussion about SV and NS.
Of course I don't want to use both method actively on CG and NG. Both cause some unexpected trouble.
Especially NS, there is a lot of difficulty handling network endpoint.
I know global variable has been obsoleted in NG and replaced by Tag, it' good idea I think.
There is no alternative at the moment, right? The feature is not required in current but would be in the future.
what is the best way to share data over network. (low level function such as TCP/UDP....? NI doesn't have a plan??)
11-07-2019 09:16 PM
I don't know -- I had a LabVIEW RT routine that had four Network Streams -- two were Message Handlers connecting a Host QMH with a Remote QMH (so they could exchange Messages, like the Host telling the Remote to start a stimulus Sequence) and two "data" Network Streams, one for DAQmx continuous A/D from Remote->Host (started and stopped by Host->Remote Messages) and the other "Event" data from Remote->Host, which included such things as "Button Presses" and changes to DIO registers (Events consisted of Identifiers, enums, and a millisecond Time Stamp, basically the "real" time since the Remote routine started running). Worked like a charm. Was developed originally in LabVIEW 2010, finished in LV 2012. I also tried to send some low-priority "occasional" information from Remote to Host via some Network Shared Variables, quickly gave it up as quirky and unreliable.
Bob Schor