LabVIEW LEGO MINDSTORMS NXT Module Programming Guide Manual

LabVIEW LEGO MINDSTORMS NXT Module Programming Guide Manual
Pages 97
Views 813
Downloads : 2 times
PDF Size : 572.7 KiB

Summary of Contents

LabVIEW LEGO MINDSTORMS NXT Module Programming Guide Manual

  • Chapter 2Extensions to LabVIEW© National Instruments Corporation2-25LabVIEW LEGO MINDSTORMS NXT ModuleTurnRatioI8NXTOutput: read-writeNXTOutputMulti: write-onlyOptionalInteractive motors onlyLegal value range: [–100, 100]This property specifies the proportional turning ratio for synchronized turning using two motors.You must set other properties appropriately on at least two motor ports for TurnRatio to have the desired effect. Use the following guidelines when setting this property:•Mode bitfield must include MOTORON and REGULATED bits. BRAKE bit is optional.•RegMode must be set to REG_SYNCH.•RunState must be set to a non-IDLE value.•Power must be set to a non-zero value.After you set these property values, the NXT firmware uses the TurnRatio value to adjust relative power settings for the left and right motors automatically.Left and right refer to the physical arrangement of the output plugs on an NXT brick when facing the display screen. The following table includes the only three valid combinations of left and right motors that you can use with TurnRatio:Note that this definition of left and right is independent of the LEGO model you are using.Negative TurnRatio values shift power towards the left motor, while positive TurnRatio values shift power towards the right motor. In both cases, the actual power applied is proportional to the Power set-point, such that an absolute value of 50% for TurnRatio normally results in one motor stopping, and an absolute value of 100% for TurnRatio normally results in the two motors turning in opposite directions at equal power.LeftRightOutput Port AOutput Port BOutput Port BOutput Port COutput Port AOutput Port C