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

What is this function?

解決済み
解決策を見る

What is it.jpg

Hi,

I am really new to LabView. I've been trying to set up a project with several VIs in it. The challenge here for me is to make the VIs happen in a certain order. For this, I've put some stacked sequences and while loops (because each VIs contain an "elapsed time". The thing here is that each VIs are also related to one same value (a control). But when the control is outside the loops, it does not work anymore. 

I think the picture above is the solution for my problem. Basically, I need to "refer" to the same control withing different frame and loops. Could this work?

And could you tell me what is this function? And how to create it?

 

Thank you very much for your help!

0 件の賞賛
メッセージ1/6
3,431件の閲覧回数
解決策
受理者 HZintern

right mouse button on the control-> Create local Variable.
The local variable can be changed to read / write mode. Also on the right mouse button

Labview 4.0, 5.0, 6.1, 8.6, 2009, 2011, 2012, 2014
If you do not know something, ask me.
0 件の賞賛
メッセージ2/6
3,423件の閲覧回数

Instead of peppering the diagram with stacked sequences and local variables, do a few simple tutorials!

 

Look into a state machine architecture. Show us what you have and we will point you in the right direction.

 

(stacked sequences and local variable overuse are a hallmark or beginner code that will scale very poorly in the future).

0 件の賞賛
メッセージ3/6
3,406件の閲覧回数

Thank you so much! Exactly what I needed

0 件の賞賛
メッセージ4/6
3,354件の閲覧回数

Hi,

I attached the project and the diagram of how it is supposed to work.
(The diagram says "read", which is on this project simply controls.)

 

Do you really think the sequences are too much? I'm not sure if it is possible to get rid of it. If you have time to take a look, that would be great 🙂

 

Thank you!

すべてをダウンロード
0 件の賞賛
メッセージ5/6
3,352件の閲覧回数

@Charly.-- wrote:

 

Do you really think the sequences are too much? I'm not sure if it is possible to get rid of it. If you have time to take a look, that would be great 🙂

 

Of course it's possible to get rid of sequences. I have +3000 VI's in just one project and not a single sequence structure (ok maybe one or two).

 

Do some tutorials, including OO tutorials. Learning to program OO is not more difficult then learning "normal" programming. Might as well start learning to program properly from the start .

 

Here's my philosophy. The control is an object you want to use. Put it's reference in the init of a class. Make methods that have error in and error outs (like all VI's should have). The error in\out's will force synchronised execution.

 

If you need to wait, add a timer class (could be very simple), and put them between the VI's you have.

 

No sequence structures are ever needed. During testing they are sometimes convenient, but they are never needed and very undesirable.

0 件の賞賛
メッセージ6/6
3,336件の閲覧回数