取消
显示结果 
搜索替代 
您的意思是: 

Question about SubVi

Hi to all good fellowz!!!! 🙂

 

I have a question about SubVi. I have some SubVi that something changes inside it. When I try to do some program with that subVi I want to see also that changes happen but it doesnt show these changes. First of all the program runs subVi and after that gives me a final answer from subVi but I want to see the changes in SubVi when I run the program.

 

Thank you.

下载全部
0 项奖励
1 条消息(共 12 条)
3,996 次查看

Do a google search on LabVIEW control references. For a main vi with one subvi, that's what I would use. Something more complicated, queues. Look at the consumer producer examples for a start on queues. You can also share queues between vi's.

2 条消息(共 12 条)
3,991 次查看

Cant you just set the property "open front panel when called" to TRUE in the VI properties of the SubVI?

YOu will have two front panels open in that case, but I guess you only want tot do this for testing?

 

If you're not doing this for testing, then indeed I would suggest producer-consumer architecture, where one loop has your user-interface (showing values), and your other loop executes this subVI.  Data between two loops can be transferred in different ways :

- local variables (bad solution)

- functional global (VI that stores information in one state and that can be read some place else)

- queue's 

 

Where 1) is really easy, 2) is still easy but a bit more work, 3) is a bit harder, but I'm sure that you can do it

 

I would go for the FG in this case, and have the consumer-producer design pattern

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
3 条消息(共 12 条)
3,975 次查看

Thank you,but I prefer if you do my example. I'm pretty new in LabView and I dont really understand how to do this with producer/consumer case.

 

Thanks again.

0 项奖励
4 条消息(共 12 条)
3,966 次查看

how do you want it?  the subVI that pops-up so you can see the values?  or you don't want to see the subVI and just the values.

Producer consumer is really easy, of coarse you will have to know the terms :

- state machine

- queue

 

Have you googles these terms before, and do you know what they are and do?

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
5 条消息(共 12 条)
3,963 次查看

Oh man.... such a quick response.. thank you 🙂

 

for you maybe it's easy but for me not so.. actually I took only 5 lessons and we got pretty complicated exercise after so much easy.. so.. 🙂

 

I just want to see the values changes in my main program includes subVi.. but another solution is interesting too for me as educational purposes 🙂

 

do you have a gmail by any case?. we can chat there if I will not understand something.

 

P.S. actually I know what that queque and what that state machine.. I did something like semaphore in VHDL a 100 years ago 🙂

0 项奖励
6 条消息(共 12 条)
3,960 次查看

let's just stick to this forum, so other people can join in if they want to as well.

 

I'll prepare something in a few hours

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
7 条消息(共 12 条)
3,956 次查看

thank you man 🙂

 

I'll have a many questions further... so we'll keep in touch 🙂

0 项奖励
8 条消息(共 12 条)
3,953 次查看

Hi Dimani,

 

As promissed an example.  If there is something you don't understand, please let me know.

 

The Main VI is Producer_Consumer.vi

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
9 条消息(共 12 条)
3,914 次查看

REMARK

 

There is one thing you need to do for yourself.  You should destroy the Queue in the stop case of the top loop.

It works perfectly this way, but it's not really good programming 😉

 

Gives you a little bit of work to do yourself 😉

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
10 条消息(共 12 条)
3,912 次查看