GPC combos, wait, and call
Author timed first-level combo steps with legal wait durations and compose sequences with combo-only call.
Overview
A combo is a named timed sequence that runs alongside the repeating main logic. wait divides its first-level statements into time segments.
call composes combo behavior from another combo context. Both wait and call have placement rules enforced by the compiler.
Key facts
- wait is allowed only in combos.
- wait must be at the first level of a combo.
- A wait duration is from 1 through 32767 milliseconds.
- call is allowed only in combos.
- User functions and main cannot use wait.
GPC syntax examples
Examples are intentionally small. Replace identifiers only with values documented for your target.
combo Tap {
set_val(XB1_A, 100);
wait(60);
set_val(XB1_A, 0);
wait(40);
}Functions, commands, and terms
Names below are catalog entries, not guessed signatures. Open the official sources for current parameter and return-value details.
combokeywordDeclares a named timed sequence.
waitcommandEnds a combo time segment for a duration from 1 to 32767 ms.
callcommandInvokes a combo from within combo execution.
Common mistakes
Calling wait from main or a function.
Nesting wait inside if or another block in a combo.
Using zero, a negative value, or more than 32767 ms.
Using call outside a combo.
Official GPC sources
Use these first-party references to confirm exact syntax and runtime behavior for your installed firmware and Studio version.
Related GPC references
Control named combo instances from main and avoid restarting an active sequence every loop.
Executioninit and main execution modelKnow what runs once, what loops, and why blocking or one-time work belongs in the correct execution block.
Input and outputController input and output functionsRead current, physical, and prior values; detect transitions; write outputs; and understand when script changes affect later reads.