キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Creating VIs with hidden implementation

解決済み
解決策を見る

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 件の賞賛
メッセージ1/19
7,093件の閲覧回数
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 件の賞賛
メッセージ2/19
7,071件の閲覧回数
解決策

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. 😄

メッセージ3/19
7,059件の閲覧回数

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 件の賞賛
メッセージ4/19
7,030件の閲覧回数

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 件の賞賛
メッセージ5/19
7,013件の閲覧回数

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 件の賞賛
メッセージ6/19
6,997件の閲覧回数

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 件の賞賛
メッセージ7/19
6,989件の閲覧回数
スポイラ
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 件の賞賛
メッセージ8/19
6,981件の閲覧回数

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 件の賞賛
メッセージ9/19
6,977件の閲覧回数

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 件の賞賛
メッセージ10/19
6,959件の閲覧回数