setout

The setout Statement

The setout statement sets one or more output fields of a motor on one or more ports to the value specified by the coupled input arguments. The first argument is either a scalar value specifying a single port or a byte array specifying multiple ports. After the port argument you then provide one or more pairs of output field identifiers and values. You can set multiple fields via a single statement. Valid output field identifiers are listed in the Output field constants section. Valid output port constants are listed in the Output port constants section. The syntax of the setout statement is shown below.

 set theMode, OUT_MODE_MOTORON  // set mode to motor on
 set rsVal, OUT_RUNSTATE_RUNNING // motor running
 set thePort, OUT_A  // set port to #1
 set pwr, -75 // negative power means reverse motor direction
 // set output values
 setout thePort, OutputModeField, theMode, RunStateField, rsVal, PowerField, pwr

Generated by  doxygen 1.6.2