Internet PLC Forum

General => Technical support => Topic started by: pstiles on October 22, 2006, 06:18:22 PM

Title: Stoping and Restarting a Sequencer
Post by: pstiles on October 22, 2006, 06:18:22 PM
Can someone please tell me how to from within a custome function, stop a sequence, and then at then restart it at the end of the custom function?


Thanks
Title: Re:Stoping and Restarting a Sequencer
Post by: support on October 23, 2006, 09:01:06 AM
When the program is executing inside a custom function, the sequencer doesn't get advanced at all since the ladder portion of the program can only continue execution after returning from the currently executed custom function.

But if you want to change a sequencer step # from within a custom function, you can simply assign

           CTRPV[m] = n
where m=sequencer # (1-8) n = the step number (0-31)

E.g.

    CTRPV[1] = 5    ' set sequencer #1 to step #5