Author Topic: Stoping and Restarting a Sequencer  (Read 5876 times)

pstiles

  • Newbie
  • Posts: 12
    • View Profile
Stoping and Restarting a Sequencer
« 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

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:Stoping and Restarting a Sequencer
« Reply #1 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
Email: support@triplc.com
Tel: 1-877-TRI-PLCS