Jump to content

How to Retail Wire Values for ENTIRE VI Hierarchy


Recommended Posts

Hi all,

 

Have you ever tried to debug a large application and wished that you could quickly retain wire values on all VIs in the main application so you could find your problem with data etc?

 

I would love to have a function where I could quickly toggle the "Retain Wire Values" button on all my subvis (ideally also be able to choose how many levels I do this down the hierarchy).  My colleague and I have searched for a property node or a method in the scripting functions but have not found anything other than "Highlight Execution" setting.  Is this a hidden feature or have we just not looked hard enough.

 

This question was asked by others back in 2009 : http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Enable-Retain-Wire-Values-for-entire-VI-hierarchy/idi-p/1045552

 

Vishal Devanath came up with a JKI RCF vi to do this back then but this no longer seems to work (at least in LabVIEW 2012).

 

 

 

Any ideas? 

 

 

 

P

 

 

"Give a man a fish, and he will live for a day.  Teach him to program LabVIEW™ and he wont need fish again"  Confucius cira 480BCE

  • Like 1
Link to comment

If you activate private stuff (SuperPrivate... blablabla) you'll have access to this as a VI property : post-7452-0-60572600-1358772376.png

 

Then if you want to have a VI that enables this option to the whole sub-hierarchy of a VI you'll need to do some work, but be carefull before doing this on all sub-vis that will slow you down a lot, maybe you want to sort a bit and avoid those VIs that are in vi.lib and user.lib.

 

Also I think it will be much easier to get the VI's project item ref and then use the "get all descendents" method than trying to get the list of all sub-vis from the VI's ref directly.

Edit : or maybe I'm wrong : https://decibel.ni.com/content/message/36585#36585, in this discussion is shown a method to get VI's dependencies with some exclusion options, you could just remove vi.lib VIs fron there. 

 

If it helps, here's a VI I use to get all VIs in a project excluding VI.lib

 

post-7452-0-85229400-1358772955_thumb.pn

 

Edit : not sure the VI posted above sorts VI from vi.lib.

 

Hope this helps (and sorry for my messy answer)

Edited by Antoine Châlons
Link to comment

Put these files in <LabVIEW>resourcedialogQuickDropplugins and Bob will be your Quick-Dropping uncle.  Ctrl-space, Ctrl-e will activate the plugin.

 

It'll ask you for Right Click API.llb, so you'll have to have the RCF installed somewhere.  (It'll be in <LabVIEW>vi.libaddons_JKI ToolkitsRCF API).  These are type-defs for a control on the password-protected VI Vishal Devanath gave us.

 

Now, as far as Flarn2006 hacking it for us, most of us can get at the block diagram without much effort but it's "wrong".  :P

QD_RetainWireValues.vi

Retain All Wire Values core.vi

  • Like 1
Link to comment
[...]

Now, as far as Flarn2006 hacking it for us, most of us can get at the block diagram without much effort but it's "wrong".  :P

 

I didn't notice Neal's post until now.

 

Neal, aren't you worried that someone will accuse you of stealing someone's bicycle?

Link to comment

I'd be upset if someone stole my bike, regardless of whether or not they cleaned and tuned it up before returning it.  On the other hand, I'd be pleased as punch if someone took and used some software I've written (even if they didn't return it).  The presence of a BD password indicates that the author doesn't share our sentiment. Your bicycle example illustrates one of the problems I have with "intellectual property": you can lock (and someone else can steal) a bike but It's impossible to "steal" software because the original "owner" hasn't lost anything.

 

Keep up the good work.

Link to comment
well, the owner perhaps loses some revenue...

 

How has he "lost" anything?  He can still sell the software.

 

The only scenario I can find where someone isn't justified in copying software is if they have entered into a license agreement with the author (or employer, if they've agreed to write software for them).  Copying what you find "in the wild" is never theft.  License notifications in the software notwithstanding, as the copier hasn't, in fact, agreed to anything.

 

That said, I'll obey the law, even the ones I think are monopolistic and protectionist.  :D

Link to comment
The author has potentially lost that single sale.

 

I understand your point of view; I just disagree with it.  :P  When we use words like "theft" and "property" and "stealing" we're not far away from using words like "crime" and "enforcement" and "arrest".  If someone "steals" software, then it seems natural to "punish" them for it.  Now, if the only damage you can point to is that the original author "has potentially lost that single sale" I say that there's no evidence that a crime was committed.  Please, Mr. District Attorney, put me on that jury.  :D

I'm sorry for taking this thread so far off topic...  :oops:  At least we have a few good options for setting Retain Wire Values in our LV2012 projects. :)

Link to comment

I think if someone locks their block diagram for a simple feature that should have been openly included in the API they are making a less than benevolent statement.  On the one hand they are feely providing a help that they are not going to benefit from commercially.  On the other hand they are stopping peers from learning how it was done.  Why?  It's basically saying hey look how good I am!



in any case thanks very much guys for your help.  Antoine, you are right, you definitely have to be careful which VIs you retain the write values for otherwise it will go out of hand. 

 

All the best

 

p

Link to comment

I think the reason NI password-protected the VI is not to prevent people from learning (seriously, why would they do that?) but rather to prevent misuse of a feature which has not yet had enough testing for a public release. Thankfully in the case of private methods and properties they have provided a "backdoor" of sorts for people interested in experimenting with them at their own risk: the SuperSecretPrivateSpecialStuff INI key. (This is what Antoine Châlons mentioned before.) No idea why they chose to do it for this and not built-in Xnode editing though.

 

Also, must every topic containing a mention of disabling LabVIEW's password "protection" turn into a moral debate? :D

Edited by flarn2006
Link to comment

Nope... this one is password protected because that property is unsafe. Toggling the retain wire values at the wrong time causes LV to enter a bad state and crash. I have no idea if this is a technical limitation (i.e. adding the code needed to detect the crash and just return an error would require some change that would have a runtime performance impact) or if this is just a crash we decided not to fix. Regardless, this feature was not made public for a reason. 

 

As I've said before, we don't make things private just to be obnoxious.

 

> Also, must every topic containing a mention of disabling LabVIEW's password "protection" turn into a moral debate?

 

No. It is a moral debate from the beginning. It never turns into one. ;)

 

 

I think if someone locks their block diagram for a simple feature that should have been openly included in the API they are making a less than benevolent statement.  On the one hand they are feely providing a help that they are not going to benefit from commercially.  On the other hand they are stopping peers from learning how it was done.  Why?  It's basically saying hey look how good I am!

 

 

 

In this particular case, one could make the argument that the NI employee who posted this VI used poor judgement in releasing it, as the VI has the same potential flaw as the property node itself. There is nothing special about the VI that would make it any safer to use than the property node, which we deliberately made private. From that point of view, one would see it as a case of "R&D made the call to make it private, others who have access to private things decided to make it public without actually doing the legwork needed to make it public, but private things must be password protected to limit the spread of them, so they followed procedure and locked it down." Because there are times when wrapping an unsafe property node in some G code can turn it into a safe node, and in those cases, the node should be viewed as atomic... there isn't any "taking it apart" any more than you take apart a compiled DLL. Demanding to see the G code is absurd since all you're doing is disturbing the parts that make it safe to use.

 

 

From another point of view, it is *mostly* safe, and releasing it as a VI on LAVA is vastly different from it being discoverable in the property lists of LabVIEW ... someone who gets that VI probably gets it from a place where it comes with the warnings about "may crash your LV", whereas someone discovering it in the property list would not.

 

In neither case is it as "look how good I am". It is more that exposing it one way promotes it differently than promoting it another way.

 

No one is preventing peers from learning anything. There isn't anything to learn in these cases.

 

 

The evidence that a crime was committed is that they are using the software, and (hopefully for them!) making profit out of it. Cheaper/free alternatives probably exist, but the "thief" chose to use your software. Ergo you have lost a sale and thus money has been stolen from you.

 

In this instance there is a crime that has been committed, and there should be some enforcement; probably not arrest though.

 

 

Doesn't even matter if they are making a profit from it. If you play a video game that you didn't pay for, you aren't making a profit. You're still stealing. Cheaper and free alternatives might *not* exist -- they definitely don't exist in the case of a game title, and often don't exist for specific types of professional software. Doesn't matter.

 

 

If nothing else, you commit a crime by promising to abide by the EULA and then not doing so. That's called lying.

 

 

Actually, due to its virtually zero distribution cost I think all software should be free for non commercial (i.e. playing about) purposes. Smart businesses would realise that once somebody becomes familiar in a tool they are more than likely to use it in a commercial sense, in this case it would then be used in an environment where it had legally been paid for, so the software vendor wins then anyway.

 

 

 

Tell that to the game manufacturers... their software is *always* used for a non commercial purpose. :-) Even if you limit this to production-type software, there's a problem of the software author screwing his own paying customers. You have to be very careful ... if you provide your software free to one group and charge to another group, both groups can now produce whatever it is your software provides. That means you're empowering a non-profit group to completely undercut your paying customers. I have seen student projects worked up in dorm rooms that can be every bit as good as the professional software. You'll lose your paying customers if *their* market is undercut by labor willing to work free that has access to the same high quality tools.

 

I'm not saying that there isn't merit in the idea, but it isn't the slam dunk you claim.

 

 

anyway who more than NI knows that if they really want their IP to be safe they should remove the block diagram?  :shifty:

 

 

 

Which would be problematic since then the VI wouldn't recompile for upgrades or alternate chip sets or when you change the compile optimization settings.

 

but It's impossible to "steal" software because the original "owner" hasn't lost anything.

 

 

 

You gained an ability you did not have by using your copied software. The owner has also lost an ability -- the ability to make further software. The owner has lost the chance to recoup the time, talent and treasure that went into making the software in the first place. Just as what you gained by your theft was an opportunity cost, what they lost by your theft was an opportunity cost. Measuring gain/loss based on first-order value is very 19th century. As any capitalist will tell you, money loses value just sitting in the vault. We measure the economic value of all sorts of things as what they could be traded for, not what they actually are traded for. Software is no different. Weigh the cost of buying the software vs the cost of writing it yourself.
 

Flarn: I realize I have contributed to the hijacking of your thread, but I figure it's ok because I also contributed to the main topic at hand first. :-)

Link to comment
If nothing else, you commit a crime by promising to abide by the EULA and then not doing so. That's called lying.

That's not a "crime". It (the EULA) is a civil offense and last I heard, lying wasn't a crime unless you were in a court under oath.

The war that's raging about whether pirating/copying is stealing will not be resolved on forums and, I don't think it will even be resolved in courts (as bizarre as it may sound). The argument on one-side is that an "opportunity" has been denied and needs to be recompensed to the amount that "could" have been obtained. The argument on the other; that an "opportunity" has no value, cannot be proven and cannot be "stealing" since it was never realised or owned.

Which side you sit on depends a lot on your world view and whether you prize cooperation over ownership. One is a communal view, while the other is feudal. History tells us that they are generally orthogonal and each rises to be the "norm" at various times. Again. Historically, cooperation has been the most common and invariably when the greatest leaps in human progress occur.

Might I suggest we move all these to the "Licencing" thread where they belong?

Edited by ShaunR
Link to comment

Aristos Queue Thanks for your detailed perspective.  I see some of your points.  I didnt realise that the original provider of the VI was an NI employee to begin with (hence my "look how good I am" comment).  As for "stealing" concepts in the thread, I think that's going overboard.  The world is not so black and white (that is more 19th century).  Without a clear defenition of an author's wishes for the use of their creation one cannot make such judgements so clearly.  If I write some software (not as an NI employee) that solves some problem for my peers but I lock it without any intention to gain anything from this other than the awe and respect of my peers then I am actually being annoying and maybe going about it the wrong way.  That's how I had perceived the transaction to be.  Having read your perspective I do look at it differently now.  However, I would not use a one size fits all perspective to all situations where code is shared.  Anyway, thanks again for your comments and contribution to the thread.

 

P

Link to comment
Copying what you find "in the wild" is never theft. License notifications in the software notwithstanding, as the copier hasn't, in fact, agreed to anything
That is fundamentally not the way copyright works! All software you write is covered by copy right as soon as you write it whether you write any copyright notice or not. By default this means anyone else cannot use it. A license attached then permits you to use it where copyright would have prevented you. It all comes back to copyright law.

Now if you find a piece of software in the wild with no license, no author details then it is probably very hard for the author to prove it is his and defend the case but that doesn't necessarily make it right.

(That is not to say I disagree with your point, if it is out there without a license that is probably the way the author intended it to be used, but legally there is no right there)

Link to comment
You're absolutely correct, I know.  I'm saying that copyright is absurd!  To think that legislation can redefine words...

 

Well, copyright was in the first place invented to protect creations, such as writings or even paintings. Maybe some want to claim that anybody can copy a book for instance and distribute it as his own, but I doubt anyone really would want to make that claim seriously. Unless of course you think writing a book is trivial and can not be viewed as an ability and therefore an author has no right to gain anything from trying to sell it. But whoever does that should please start writing their own books first and make them available for free before even trying to make that claim.

 

The application of copyright on software is in many ways flawed but it is the best we have generally come up with so far. It's definitely something not everyone can do, especially doing it good, so it would seem an ability that deserves some protection. Of course it would be nice if that would not be necessary since nobody needs to earn any money anymore as everything in this world is free and available to whomever needs it, but that is not how this world works, as we all know.

 

So why would it be ok to copy software for free and deny the creator a decent income but not to steal money from the rich as they have more than enough of it? Does someone really need Billions of dollars? Do you really want to limit software creation to "free as in beer"? Or do you say that the decision to pay for a software should be voluntary, no matter if you use it to make profit yourself or even just for some leisure time? I think whoever makes such claims should first have a proven track record of providing his own creations under such conditions, before he or she has any right of speaking.

  • Like 1
Link to comment

All I hear are red herrings and appeals to emotion.

 

If I own a piece of paper and a pen, and I write on that paper something that I read somewhere else, the natural conclusion to copyright arguments is that the original author and/or government is justified in using whatever force is necessary (including murder) to prevent me from selling it.

Link to comment
All I hear are red herrings and appeals to emotion.

 

If I own a piece of paper and a pen, and I write on that paper something that I read somewhere else, the natural conclusion to copyright arguments is that the original author and/or government is justified in using whatever force is necessary (including murder) to prevent me from selling it.

 

You realize that the emotional aspect of this thread has really just started when you brought in murder!

Link to comment
[...] So why would it be ok to copy software for free and deny the creator a decent income but not to steal money from the rich as they have more than enough of it? Does someone really need Billions of dollars? [...]

 

An example of an appeal to emotion.

 

You realize that the emotional aspect of this thread has really just started when you brought in murder!

 

That's how far enforcement of copyright naturally extends.  If I don't stop selling my paper when I'm told and, if I resist what I feel to be an unjust arrest, does the enforcement just stop?  Do we only enforce copyright with people that will stop when they're told to?  Or, do we use whatever force is necessary to gain compliance?

Link to comment
That's how far enforcement of copyright naturally extends.  If I don't stop selling my paper when I'm told and, if I resist what I feel to be an unjust arrest, does the enforcement just stop?  Do we only enforce copyright with people that will stop when they're told to?  Or, do we use whatever force is necessary to gain compliance?

 

With this reasoning any law enforcement attempt would be useless. But as it seems it is usually quite effective without the need to get the death penalty invoked, and to my knowledge even in the US exist states where the death penalty is not even an option as means to enforce the law. And in this particular case, stripping the offender of the monetary gain and some additional fine is usually the modus operandi, with possibly jail for repetitive offenders.

 

Death penalty for copyright violation would seem really archaic to me, and at least here it's definitely not an option.

 

As to the fact that reasoning with stealing money or the work of some writer, certainly has an emotional component, claiming that stealing software or a book by copying it is both legally and/or morally right would seem emotional to me too already.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.