Sequences have functions and variables for programmatic access. SequenceName below refers to a particular sequence you wish access to.
Sequence.StopAllSequences(): a quick function to stop all running sequences. If you want to stop all sequences, logging, PID loops and acquisition, use System.SafeMode to switch DAQFactory into safe mode.
Sequence.SequenceName.Running: 0 or 1 on whether the sequence is running. A sequence called from another sequence is not considered running. Only a sequence that has been started with Begin Sequence in its own thread is considered running. Read only.
Sequence.SequenceName.CurrentLine: a numeric with the current line being executed. Read only.
Sequence.SequenceName.strCurrentSequence: a string with the name of the sequence currently running. If a sequence calls another sequence, this variable will contain the name of that sequence. Read only.