I am sorry you are having trouble connecting to your TReX. You should only need those three connections and power across VIN and GND. Could you make sure you are in serial mode by removing all jumpers? Can you tell me what serial settings you use when you connect to your TReX using the TReX Configurator? What baud rate are you using? What do have you selected for “Error Checking”? Also, does your input supply share a common ground with your computer? Have you verified that the cable you are using is working? If it is working, can you post a picture of your connections?
I’m sorry; that question could have been more clear. I was checking to see if you had all of your grounds connected; it seems like you do. We can continue troubleshooting if you answer my other questions.
I am glad you can connect to your TReX. But now I am not entirely sure how you are controlling it. From your earlier post, it sounded like you were using it for serial control, but your question about the parabolic scaling makes it sound like you are using it with RC or analog control. How do you plan on interfacing with it?
The TReX does not offer deceleration limiting. If you are using the serial control interface, you will have to handle the deceleration yourself by sending decreasing speed commands over time. If you are using the TReX in RC or analog input mode, it should automatically set the motors to coast when those inputs are in the deadband, which is the smoothest it’s going to be able to stop your motors. You might check to make sure your TReX is still configured to respond in that way. (You can find the values for those settings inside the Deadband Behavior box, which is under the RC/Analog Params tab.)
Scaling motor speed parabolically is a feature that is used only for RC or analog control, and there is no way to adjust it.
Yes, to set certain parameters on the TReX, you will need to use its serial interface. Yes, you will need to remove the Mode-Select jumper to put the TReX in serial mode each time you configure it. (This is mentioned inside the Jumper Settings section of the TReX user’s guide.) Please note that the control interface is determined by the location of the mode jumper when the TReX is first powered up.
Generally speaking, if you are going to have a microcontroller constantly connected to your TReX, you should probably be using the TReX in serial mode and controlling it serially from the microcontroller. If you still want to be able to control the TReX using a different interface, like RC or analog, you could keep the controller in serial mode, use the serial command to read the remapped channel values (0x87), and then issue a set motor command based on what you read. This would simulate RC or analog control while still leaving your microcontroller in charge.
Also, in typical applications, you should not need to reconfigure the settings very often, so occasionally switching the jumpers should not be much of a burden. Are you doing something that requires frequent settings changes?
A microcontroller is required to change settings (linear or logarithmic work, block one of channels, set reverse direction etc.)
I don’t want to remove cover of my control panel and plug TReX to computer to set new settings every time.
If you do not need to change settings very often, you could just connect your joystick to the analog input on the TReX and switch the jumper (and reset the board) every time you want to change them. If you would rather always use the TReX in serial mode and use your microcontroller to interpret the analog signals read by the TReX and send corresponding motor commands, like Jon mentioned earlier, you would still connect the joystick to the analog input on the TReX. In this case you would not ever need to change the jumper.
In order to change the settings on the TReX it must be in serial mode. However, when the TReX is in serial mode it will still process the signal on its analog input and generate a target speed and direction based off of that input. It will not directly use those targets to move the motors, but you can use the “get remapped channel input values” serial command (0x87) to read the target speed and direction and then send set motor commands with the same target speed and direction to mimic the TReX’s analog control mode. More details on these commands can be found in the Serial Command List and Documentation section of the TReX user’s guide.
You can think of the 0x87 command as reading the TReX’s analog input values and interpreting them as motor speeds and directions that you can use with the serial set motor commands. Here is an example of using the 0x87 command:
command: 0x87, 0x3
response: 0xFF, 0x7F
During default operation, the two received bytes correspond to motor 1 direction and speed and motor 2 direction and speed, respectively. As it says in the TReX command document Claire linked to earlier, bits 6:0 of the remapped value indicate its magnitude (0 – 127) and bit 7 indicates its direction. So, 0xFF interprets as full speed in one direction with motor 1 and 0x7F represents full speed in the other direction with motor 2. You could then use this information to send appropriate serial commands for setting motor speed.