06-14-2016 07:52 AM
Hey guys,
I would like for my program to be started by the user and have them make some selections that would then open a new stand alone program. Where each individual new program would actually be the bulk of the program as a whole and maybe utalize its own probably producer consumer design pattern. once the secondary program finishes I would like it to go back to the initial program for the user to make new selections and open another prgram.
to me this feels do able like basically having a main loop that only calls functions.
If some one could just link me an article or something that would be great. I was looking around and found something about this call chain VI, is that part of what I would need?
also I'm always open to suggestions if this seems like the hard way to go or an improper way of doing this.
Thanks guys
Solved! Go to Solution.
06-14-2016 08:18 AM
I think this might be what you are looking for:
http://digital.ni.com/public.nsf/allkb/5CF9526FF069EA8E862564C400579DBA
Let me know if tha answers your question or if you are looking for something else.
Regards,
Tim
06-14-2016 08:23 AM
No, when I say new program I mean sub VI but its not just open sub vi do one thing and come back, its like ask user something, open sub vi and most of program is in sub vi then come back and ask user to select a new sub VI.
the sub VI would have its own front pannel that the user will interact with.
I may just be over complicating what Im thinking needs to happen.
06-14-2016 08:37 AM - edited 06-14-2016 08:44 AM
You can do this visually by adjusting the visual settings on your VI's.
I usually use a custom setting and call the Front Panel.Window.State property on your VI's, It'd look something like this:
Do the inverse on your subVI and you'll get an interupt. You'll also have to make some changes to the Window Appearence section of VI Properties.
That will give you a visual appearance and the kind of interupt you are looking for. You'll also probably want to use an Event structure as your main loop function.
Regards,
Tim
06-14-2016 08:46 AM
awesome, thanks! is there some kind of event that is on VI open or start or something like that?
06-14-2016 08:52 AM
Nope, Vi's naturally interupt so as long as your want to 'fire and wait' so to speak, this method will work fine for what you want. Change your window settings and play around with the VI property a bit and you'll get it going. Remember to change the settings on your SubVI's window appearance so that it will pop up when called. I do this quite often with the programs I write. If you run into a snag drop another comment.
Regards,
Tim