The Daily CLAD

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Variables Types

SercoSteveB
Active Participant

Place the following Variables Types in order from top to bottom?

Variables.jpg

a) Single Process Shared, Network Published Shared, Local, Global

b) Single Process Shared, Network Published Shared, Global, Local

c) Network Published Shared, Single Process Shared, Local, Global

d) Network Published Shared, Single Process Shared, Global, Local

Comments
Musale
Member

I'l go with C. never heard of single process shared, network published shared.

LordNobady
Member

C I think.


Learning LabVIEW since January 2013
crossrulz
Knight of NI

C

I've heard the term Single Process Shared variable, but I just think that was just to distinguish it from the Network Published Shared Variable.  I mostly just hear it called a Shared Variable.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
SercoSteveB
Active Participant

I agree.  Originally this question was going to go out with 'Shared Variable' instead of 'Single Process Shared Variable' in the answers; but after doing a quick check on the dialog used to create variables I changed it. 

I know how you guys are sticklers for accuracy.

Single Process Shared Variable.bmp

Not applicable

Ans: C

If you are considering using Network Shard Variables, then be sure to look at Network Streams. Network Streams give you the near speed of TCP without the hassle of managing the TCP connection.

MrStevenUND
Member

I put my money on C. 

Is 2012 the first time the variables changed to look like this?  I've installed 2012 but haven't worked with it yet.  I'm still using primarily 2009.

nmpundlik
Member

C

SercoSteveB
Active Participant

Hi Steven

The screen shots are from LV2009.  I can't say that I use variables all that much.  A couple of my guys recently did a project using Network Published Shared variables and the solution worked really well, but other than really occasionally I don't use them. 

It might be a hang up from when LV variables were a dataflow nightmare......thoughts anyone?

crossrulz
Knight of NI

I used Network Published Shared Variables once for a RT to PC communication.  It worked extremely well.  This was also back in the LabVIEW 8.5 era.

I once used Single Process Shared Variables to create a global variable for a specific library.  The variable was part of the library so nobody else could access it.  The variable was a setting that was rarely changed, so race conditions were next to impossible.

Local variables I try very hard to avoid.  Race conditions abound when using them and simple wires or queues/notifiers will typically do the job.  But often times with GUIs, it can't be helped (multiple places need to update indicator).

Global variables I find myself using more in the last couple of years.  There are discussions on these all over the place.  I subscribe to the Write Once Read Many philosophy.  So I have one place that will set the global and then many places that will read it.  I typically do this when I have a LOT of subVIs (especially buried subVIs) that need that setting data and it would be a pain to wire to each of those VIs.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
SercoSteveB
Active Participant

Answer: C.  Nice one Musale, LordNobady, crossrulz, DavidCorney, MrStevenUND & nmpundlik.

Nice additions crossrulz & DavidCorney thanks

mini09
Active Participant

Nice discussion here i agree with C..

ashwinilele
Member

C