54
Procedure
•
Procedure <Name>
Begins a new procedure, which can be called up from the flowchart or another procedure.
•
Procedure <Name> repeat {Value/Variable}
Used to call a procedure. Optionally with a number of times to repeat the call.
Random
•
Random(x)
Generate a random number between 0 and x. (Note, by using Random(x)+1 the user can avoid a zero
value when required). See page 36.
Seconds
Give the elapsed seconds since the program started. See page 37.
Sound
•
Sound <File> {Repeating}
Loads and immediately plays the specified wav file. When saved all file references are given relative to
the location of the saved control program.
By default the sound will only play once each time the symbol is parsed. By using the wait command
the flowchart will wait until the sound file finishes before continuing. With the repeat command, the
sound will be played until the flowchart stops running, or the stop playing command is used.
Start
•
Start <Name>
Begins a new flowchart - up to 10 starts may exist in one program. If the program is downloaded to
K’NEX Interface this will reduce to 4.
Stop
•
Stop
Stops the current procedure and returns to the flowchart or ends the program.
Stop all
•
Stop All
Immediately stops all procedures or flowcharts and ends the program.
Switch
•
Switch Output < Number/Variable/Word> <On/Off
•
Switch Motor <Letter/Variable/Word> <Reverse/Off/Forward> <Percentage/Variable/Word>
•
Binary Output <Number/Variable/Word>
Switches on or off single or multiple outputs or motors. When used with motors it also specifies a
direction and optional speed control.
Examples:
•
Switch Output 1 On 2 Off
•
Switch Output Red On
•
Switch Motor A Fwd (60)
•
Switch Motor Word Rev (x)
Wait
•
Wait < Number/Variable/Word>
Causes the flowchart to wait for the specified time. Timing to 0.1s resolution.
back to Table of Contents