The oPower Object manages a signed 8-Bit variable intended to be used as a URCP power value so that it can be used in a virtual circuit. As well as the value of the variable, status properties are provided that can also be used in a virtual circuit.
The oPower Object has properties and methods that support the URCP power value such as SetFullForward and Stop that can be used to control the power level. Examples:
URCP Power values deal with the relative power of an object. The common number system chosen for this +127 for full power, -128 for full reverse power and 0 for no power. This range is used so that a single byte can represent the full range of power.
Typically the URCP Power value is used to drive motors where the power value is translated directly to a speed value. This allows a single byte to control the forward and reverse speed capabilities of a robots movement.
Objects such as the oDCMotor use URCP Distance values.
There are three main differences between this object and a standard Char variable.
This Object's Value property is an instance of the oValue Object which can be pointed to by a Virtual Circuit.
This Object maintains status bits which can be pointed to by Virtual Circuits.
This Object is 1 byte larger in order to store the status information.
The following table lists the size and availability of the oPower Object.
Notes on virtual circuit usage: Not all implementations of the oPower Object have a linkable Negative property. While all instance of the oPower Object that you create in your programs will have a linkable Negative property, some of the ooPIC Objects create a custom oPower Object instance that cannot.
Notes on virtual circuit usage: Not all implementations of the oPower Object have a linkable NonZero property. While all instance of the oPower Object that you create in your programs will have a linkable NonZero property, some of the ooPIC Objects create a custom oPower Object instance that cannot.