| The oNavCon Object takes the value of the Object pointed to by the Input1 property (which is considered to be the speed value) and both add and subtract the value of the Object pointed to by the Input2 property (Which is considered to be the turn value). The resulting two numbers (considered to be the two motor's speed values) are then stored in the Objects pointed to by the Output1 and Output2 properties where Output1 = (Input1 + Input2) and Output2 = (Input1 - Input2). If the Input2 value is 0, then both of the outputs will be set to the Input1 value. For example, if the Input1 value (speed) is 97 and the Input2 value (turn) is 0, then both of the Output values (right speed and left speed) will be set to 97. If the Input1 value is 0, then the Output values will be set to the positive and negative forms of the Input2 value. For example, if the Input2 value (turn) is 32 and the Input1 value (speed) is 0 then the Output1 value (right) will be 32 and the Output2 value (left) will be -32. If both the Input1 and Input2 values are 0 then both the Output values will be set to 0. A Limit property is provided for the cases where either of the output Object's value properties cannot exceed +127/-128 (8-Bits signed). The oDCMotor Object is an Object which may require use of the Limit property. Setting the Limit property to cvTrue (1) prevents either of the Output values from exceeding the 8-Bit limitation. For example: if the Input1 value (speed) is 120 and the Input2 value (turn) is 10 then the Output1 value (right) will be 130 and the Output2 values (left) will be 110. The output Object will use the 8th bit of the number as a sign bit which results in the value of 130 being seen erroneously as a negative 126. By setting the Limit property to cvTrue, the value of 130 is limited to +127 which will be seen correctly by the output Object. A Adjust property is provided to adjust the turn value to compensate for mechanical differences in the drive motors. This value is added to the Input2 value (turn) before the calculations are performed and allows an Input2 value of 0 to drive the motors at different speeds. In normal operation, the two calculations are performed once each Object List Loop. If the property option "C" is used, then the operation is modified so that this function only occurs once each time an oLogic Object transitions. |