02-28-2009 04:49 AM
Hi,everyone.
I want to protect some of my block diagrams from viewing, how can I do without using "VI Property-Protection-Locked or Password Protected" which seems to be a bit of unfriendly. Is there another approach?
- Thank You
02-28-2009 05:30 AM
Additionally, I also don't want to use executable because I will ultilize them as subVIs during edition period.
Specially, for “VISA Write.vi”, as you see, block diagram of which can not pop up if you click its icon from the caller VI' block diagram. I really want to know how it works. Can this technique be used by the ones using LabVIEW but not the ones developing LabVIEW?
Moreover, I have ever seen some SubVis from some Driver VIs in DAQmx sub-palette have a suffix of "clone". Such subVI could not be edited even though you can view its block diagrams by clicking its icon from the caller. And how it works?
-Thank you.
02-28-2009 10:11 AM
You only have three options:
Option 2 will give you behaviour most like the built in functions, but like the built in functions VIs without block diagrams are not editable. You will need to be sure to save a copy of your VI that still has its block diagram because once it's gone, it can't be recovered.
Mike...
02-28-2009 10:16 AM
The Clone state is because the VI is a reentrant VI, you can get to the owning VI by pressing ctrl-m (unless it's locked).
Ton
02-28-2009 10:56 AM
02-28-2009 02:47 PM
03-01-2009 07:11 AM
Hi, Mike
I think the second option you mentioned maybe the perfect solution that I am asking for but I don't know how to save the VI and permanently remove its block diagram. Could you give me some more details about this method.
-Thank you.
03-01-2009 07:59 AM
Removing diagrams is the most unfriendly thing you can do. Your code will be protected forever, but it will also be locked to the version used for development. This because the code can not be recompiled. Back in the days then computer memory was more limited, it could be a useful function. But I have not used this function for several years now. Customers found it very irritating and annoying. The could not upgrade to a newer Labview version.
If I want to protect code I buld a application (exe file), or use password protection for the diagram
03-01-2009 09:26 PM
If that is what you really want to do (I also would recommend Option 1) you can find out information on how to do it in the LV help. Do a search for "Removing Block Diagrams from VIs".
Mike...
03-01-2009 10:41 PM
As others have already said, removing the block diagram from VIs is probably the worst solution you can possibly choose. Don't do it!
Another option that has not been mentioned: you could turn proprietaty code sections into a dll and then place a wrapper VI around it for use as subVIs while developing.
There is nothing wrong with password protecting a VI and I don't see why you don't like it.
I am also wondering about your motives. Are you embarrassed of your code? If you leave your block diagrams visible, others can help find bugs and offer suggestions for improvement. It also allows your customers to make necessary changes 10 years from now, long after you ended support for the code.
Look at NI. Virtually all VIs shipped with LabVIEW have the block diagram visible. Having open code is the best policy in virtually all cases.