2 wire reverse speed

This is a question about programming the 2 wire ports on the cortex controller (1 & 10).

When a 2-wire motor is plugged into these, they only work with a negative power value, and any power value (-1 --> -127) is the same. this is the same for both port 1 and 10. Also, with the same value (-127) port 1 and 10 are reverse of each other (CW and CCW). The pragma config generated for robotc for the 2 ports are:

#pragma config(Motor, port1, a2, tmotorNormal, openLoop)
#pragma config(Motor, port10, a1, tmotorNormal, openLoop)

so basically:

motor[port1] = -127; //would work, spin CCW
motor[port1] = 127; //wouldn’t work

Sorry I really haven’t searched the forum enough yet but it’s really late and I gotta wake up early tomorrow so if you guys can point me to a document about programming the 2-wire ports that would be great. Thanks so much,

I tested both ports 1 and 10 separately with the following code, and everything checked out:

#pragma config(Motor, port1, rightMotor, tmotorNormal, openLoop)
//!!Code automatically generated by ‘ROBOTC’ configuration wizard !!//

task main()
motor[rightMotor] = 127;
motor[rightMotor] = -127;
motor[port1] = 127;
motor[port1] = -127;

Are you using the latest version of ROBOTC, version 2.30? If not, try upgrading it here: http://www.robotc.net/download/cortex/

Gotcha, I’m using the 2.26 on trial. Let me see what happens when I upgrade it. Thanks.

A little update:

It’s not a software problem since the other one I have runs the code fine. I poked an oscilloscope in there to see what happens. That was the first time I see the signal running the motors by the way. It was very interesting but in the end didn’t yield much result. I decided to put that off for now since everything else works perfectly.