Controlling a sequence from a switched input

I want my sequence to “skip” a servo cycle when my switch is inputting “1” or full voltage to the Maestro. I have a Maestro 6 and am using channels 0 and 1 to control servos. Channel 2 is controlling an electric motor through a medium mofset switch. I am ok with wiring the switch to the Maestro per section 7.b. para., Button or Switch. I have read the section regarding writing the instruction for the maestro but am now lost, i.e., this is well beyond my experience level.
Can someone provide me with the directions to:
1. Tell the Maestro to delete Channel 2 from the sequence when the switch is “on”.
2. Tell the Maestro to include Channel 2 in the sequence when the switch is “off”.
Also, when Channel 2 is deleted, the Maestro should operate Channels 0 and ! without any delay for Channel 2, in other words, the Maestro should treat Cnannel 2 as being inactive (status box unchecked).
Thanks, Roy

Hello, Roy.

Can you post your script so I can see what it is doing? Also, when you post your script, please use code tags ([ code ][ /code ] - without spaces) to make your code readable.

- Amanda

I don’t have any script to post as I don’t know how to write the script for the sequence with the “skip” feature. Do you want me to post the script that I have that does not include the switched input nor the “skip” feature?

I recommend looking at the “Using a button or switch to control servos” example code under the “Example scripts” section of the Maestro user’s guide to get started with implementing a switch in your script. You can read the comments in the example script to get a better understanding of how the code works. As for your “skip” feature, you can disable the output of a channel by setting the target position to 0, so you could create one subroutine that controls channel 2 how you want and another that sets the target position of channel 2 to 0, disabling it. Then, your script could call either subroutine depending on the position of your switch.

If you try to add those features to your code and continue to have problems doing so, you can post your updated code here, and I would be happy to take a look.

- Amanda