LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to close a subvi programmatically

And much appreciated. I will make me one of these for sure. I guess I wanted to add the remarks for completeness sake. I also appreciate people making the effort to make a document for people without LV 7/7.1.
0 Kudos
Message 11 of 19
(2,300 Views)
Oops! My apologies 😛
 
Pls find attached for LV6.1
 
Regards
 
 
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 12 of 19
(2,397 Views)

Something else you should consider is handing the errors properly. You have error clusters passing through, but they don't do anything...

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 13 of 19
(2,295 Views)
Like I said I build this really quick and didn't take the time to follow the guidlines that have been set forth.  If I were developing this for a project I would do so.  Overall it can be very flexible and can be called from anywhere.  The main point to get across is the LV2 style global to hold the reference.  This is what really makes it flexible.
 
BJD1613

Lead Test Tools Development Engineer

Philips Respironics

Certified LV Architect / Instructor
0 Kudos
Message 14 of 19
(2,289 Views)

I understand that this was a quick thing, but when you start handging titles after your name people start look to you for examples and guidance. So if they see you doing (or in this case, not doing) something they will think it's alright too. I hate to think how many problems I've helped people fix that came about because they were modeling their programming style after what they saw in the examples that ship with LV.

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 15 of 19
(2,285 Views)

Since when did the developer zone become a beauty contest... it is for us to help people out.  Most of us don't have time to answer questions as it is because of work and are just doing this to help promote LV and help new developers become better.  Here, my examples have been corrected... Sorry for any confusion. 

I am proud of my titles by the way... I am not boasting about my abilities...

 

BJD1613

Lead Test Tools Development Engineer

Philips Respironics

Certified LV Architect / Instructor
0 Kudos
Message 16 of 19
(2,284 Views)

I'm sorry if I offended you, it wasn't intended. The point is that the yellow bars by our names--and in your case the titles (which you have every right to be proud of) make us role-models, like it or not. That's just the way things are.

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 17 of 19
(2,266 Views)

Ian, thanks for the example, I found this really helpful.

 

I am working on a similar program, where the subVI is a continuous wavefunction generator which outputs to Ao - this is a case where there is no predictable "done" condition, so the subVI can't terminate itself. Instead, the main program determines when the wavefunction needs to be changed, started, stopped, etc.

 

Of course, I could probably keep the function generator code in the main VI, such as in a "wave function change" case structure. Then I wouldn't need to control a running subVI. However, I like having a stand-alone subVI for the wavefunction generation which I can run and test independently of the main code.

 

 

 

0 Kudos
Message 18 of 19
(1,757 Views)

@Gustep12 wrote:

Ian, thanks for the example, I found this really helpful.

 

I am working on a similar program, where the subVI is a continuous wavefunction generator which outputs to Ao - this is a case where there is no predictable "done" condition, so the subVI can't terminate itself. Instead, the main program determines when the wavefunction needs to be changed, started, stopped, etc.

 

Of course, I could probably keep the function generator code in the main VI, such as in a "wave function change" case structure. Then I wouldn't need to control a running subVI. However, I like having a stand-alone subVI for the wavefunction generation which I can run and test independently of the main code.

 

 

 


Hi Gustep12,

 

It is great that it helped 🙂

And, what surprises me is that this VI(s) still helping after nearly 7 years since it was uploaded... lol Cheers!

Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 19 of 19
(1,745 Views)