FIRST Tech Challenge Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging tip for TETRIX Motors and Servos

If your motors or servos don't seem to move when you program them to, and you have already ensured that power is on and the wire connections are in tact, you may have a problem with your motor addressing.

For the program to command the motors, it needs to know the following information:

1. What NXT Port is the motor controller connected to?

2. What is the Motor Controllers position in the daisy chain?

3. What Motor / Servo are you referring to on the Motor Controller?

4. Do you want this motor to run in reverse?

These details should be defined with the Motor Configurator which will generate a Ring control for you that encodes this information. However, a quick way to ensure that your settings are correct from the block diagram is to "decipher the code."

Right Click on the ring control and choose Edit Items... The following dialog will pop up giving you the value of all the motors that you have previously configured in the Motor Configurator.

Motor Config.PNG

The value in the right hand column gives you the code for that particular motor. The first digit is the port (1-4), the second is the order in the daisy chain (1-4), the third is the motor (1-2) or servo (1-6) and the last is Reverse (1 = True, 0 = False) [note = Servos can not be reversed].

In this case, "Left Front" describes the motor on NXT Port 4, the 1st controller in the chain, Motor 1 with no Reverse. Likewise, "Right Rear" describes the motor on Port 4, the second controller in the chain, Motor 2, with Reverse = True.

This configuration is compatible with the following wiring diagram.

Motor Wiring.png

If you find an inconsistency between your wiring and your motor configuration, DO NOT MAKE THE CHANGE FROM THE RING CONSTANT PROPERTIES WINDOW. Doing so will only change this one instance of the Ring. Any other places in your code that use this Ring will not be updated. To ensure that your changes propogate through all your VIs, close your VI and change the configuration from the Motor Configurator. Make sure when you save the configuration, you choose Update VIs as you exit the Motor Configurator so that the changes get applied to all VIs.

Comments
pallen
Active Participant
Active Participant
on

Great tip!

---------------------
Patrick Allen: FunctionalityUnlimited.ca
Contributors