LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating VIs with hidden implementation

Solved!
Go to solution

I would like to create a wrapper for a VI where a user will have contol over certain inputs and access to certain outputs, but not be able to see how the VI is actually implemented. What is the best way to do this?

0 Kudos
Message 1 of 19
(5,444 Views)
use this method
after you make your subvi , go to icon editor and make all icons disable
now you can use this subvi inside your code it is invisible now but also try to wrap it behind the some vi or stick to some of vi
0 Kudos
Message 2 of 19
(5,422 Views)
Solution

You can password protect the diagram, but that can potentially be cracked

You can built the code into a dll using the application builder and place that insde a subVI.

You can remove the diagram. Removing the diagram will not allow the VI to be edited or upgraded to a new version.

 

HOWEVER:

It is better to keep code public so everybody has a chance to debug and potentially improve it. Secret code is typically much less trustworthy.

Most often, code is kept secret out of embarassment and to hide ugly code from sight.

 

A better LabVIEW programmer will not be fooled. We know better than to judge a VI by its shiny front panel. 😄

Message 3 of 19
(5,410 Views)

Is there a way that I can pass a variable between a sub vi and the main vi. For example I want a while loop to control something in the sub vi and I want a user to be able to stop it by clicking a stop button on the main vi.

0 Kudos
Message 4 of 19
(5,381 Views)

Yes, there are plenty of ways.

 

Maybe start by explaining what you have in mind in general. What is the purposse of all this? What are you trying to achieve?

0 Kudos
Message 5 of 19
(5,364 Views)

I use two method for what you want in this vi 
I hope it could help you 
but I am strongly agree with what  

0 Kudos
Message 6 of 19
(5,348 Views)

I have a function inside a sub vi that needs to be in a while loop in order to get data from a device. I cannot have the while loop on the main vi because certain functions inside the sub vi should only execute once. The function inside the while loop will continuously read frames from a device until a user input (pressing stop).

 

I have thought of two ways to potentially solve the issue:

1. To create a boolean variable that can be changed in the main vi and will control the while loop.

2. Use a while loop in the main vi and use a case statement or state machine to make certain functions only execute once.

0 Kudos
Message 7 of 19
(5,340 Views)
Spoiler
I use two method for what you want in this vi

The problem with that code is the while loop is in the main vi and I think I want it in the sub vi

0 Kudos
Message 8 of 19
(5,332 Views)

The problem with that code is the while loop is in the main vi and I think I want it in the sub vi

0 Kudos
Message 9 of 19
(5,328 Views)

if you want have while loop inside the subvi  you have to make more complicate code I present you two method why you just not use both of them to hide loop too?
just copy and paste white image in diagram and hide that  loop behind it  insert some other vi code inside the loop for backtrack like timing vis
and if that person again find the subvi
he is cleaver and could write that vi his self and no need that vi 🙂

0 Kudos
Message 10 of 19
(5,310 Views)