10-25-2012 02:31 AM
Hello,
I'm using SequenceFilePostStep callback to check a variable value polling from LV operator interface.
I'd like to use this function to jump back to the mainsequence for the first step of the "Main" group from anywhere from the running sequences.
My idea was to use the Statement step with precondition (check variable valu) and in the Expression field I'd use the step ID to go back to the first step of the Main group of the mainsequence.
How can I do this?
Thanks.
Solved! Go to Solution.
10-25-2012 09:51 AM
@kopisti wrote:
Hello,
I'm using SequenceFilePostStep callback to check a variable value polling from LV operator interface.
I'd like to use this function to jump back to the mainsequence for the first step of the "Main" group from anywhere from the running sequences.
My idea was to use the Statement step with precondition (check variable valu) and in the Expression field I'd use the step ID to go back to the first step of the Main group of the mainsequence.
How can I do this?
Thanks.
Are you in the sequence with the step you want to go to? If so you could use the post action of the step to go to the step you want. You can create a custom post action that checks whatever you are checking in your precondition currently.
-Doug
10-25-2012 11:12 AM
Hi Doug,
Thanks for your answer.
No, I'm not in the same sequence.
I've more sequences, but I want to check the variable value at all the time (with the callback).
I'd like to go to the Mainsequence's Main group.
10-31-2012 09:52 AM
Hi kopisti!
You could use the SequenceFilePostStep to solve this problem.
In this SequenceFilePostStep you should terminate the execution of the subsequence with a statement: ThisContext.RunState.Execution.Terminate()
As the precondition of this step you can use tha value of a station global.
If the SequenceFilePostStep terminates the subsequence, in the cleanup phase you should set the value of the station global back to it's initial value.
If you don't do like this, the SequenceFilePostStep could terminate your MainSequence.
Best regards,
11-01-2012 09:42 AM - edited 11-01-2012 09:43 AM
@kopisti wrote:
Hi Doug,
Thanks for your answer.
No, I'm not in the same sequence.
I've more sequences, but I want to check the variable value at all the time (with the callback).
I'd like to go to the Mainsequence's Main group.
In the SequenceFilePostStep callback you can set the next step index and step group for the sequence for which the callback was called using an expression like the following:
RunState.Caller.StepGroup = StepGroup_Main,
RunState.Caller.NextStepIndex = RunState.Caller.Sequence.GetStepIndex("UniqueIdOrName", StepGroup_Main)
Hope this helps,
-Doug