12-17-2015 02:27 PM - edited 12-17-2015 02:29 PM
I have a VI inside a subsequence, which needs to get a loop count parameter from the MainSequence as well as the name of the subsequence in which the VI is placed. Currently, "ThisContext" is passed to the VI but it only offers access to Locals (subsequence) variables. Is there any way to have full access to MainSequence variables as if the VI was placed in that level?
Thank you.
12-17-2015 04:02 PM
You can access the Context of MainSequence by putting down a property node and choosing Caller. Then you can access the Locals of that.
Let me know if that makes sense or if you need more info.
Hope this helps,
12-18-2015 04:37 PM
Thanks! I was able to get the loop count parameter from the MainSequence.
Now how can I get the name of the subsequence where the VI is one of the steps? I looked through variables of the subsequence (with pause) but I couldn't find one that contains the subsequence name.
12-21-2015 08:27 AM
you should be able to use the SequenceContext and use a property node to ge the Sequence. Then use that reference to a property node and get the name.
12-21-2015 08:56 AM
I chose the CallStackName property under SequenceContext and then had to remove "- Cleanup (blah blah.seq)" from the resulting string since the VI is placed inside Cleanup of the sequence. This is the only way I could find after looking through the list of properties.
12-21-2015 09:03 AM
Check out the attached image.
12-21-2015 10:15 AM
That is neat!