- Forum
- Roboteq Motor Controllers
- Controller Configuration & Operation
- AX500 not receiving commands from MBED
AX500 not receiving commands from MBED
- brightjoey
- Topic Author
- Offline
Less
More
- Posts: 6
- Thank you received: 0
11 years 2 weeks ago #29526971
by brightjoey
AX500 not receiving commands from MBED was created by brightjoey
The ax500 is not recognizing any commands from the program. I connected everything right but still nothing.
1 weird phenomenon is even without any program running in it( I delete all program), The left motor will move forward and reverse randomly, almost as if the motor is twitching.
It is in RS232 mode. I connect the wires according to the RS232 wire connection showns
1 weird phenomenon is even without any program running in it( I delete all program), The left motor will move forward and reverse randomly, almost as if the motor is twitching.
It is in RS232 mode. I connect the wires according to the RS232 wire connection showns
#include \"mbed.h\"
Serial pc(USBTX, USBRX);
Serial ax500(p9,p10);
DigitalOut led1(LED1);
int i;
int main() {
ax500.baud(9600);
ax500.format(7,Serial::Even,1);
for(i=0;i<10;i++) { // Carriage Return \'10\' times
ax500.putc(0x0D);
}
while(1) {
ax500.putc(\'!\');
ax500.putc(\'B\');
ax500.putc(\'5\');
ax500.putc(\'0\');
ax500.putc(0x0D);
pc.putc(\'!\');
pc.putc(\'a\');
pc.putc(\'5\');
pc.putc(\'0\');
pc.putc(\'\\r\');
pc.putc(\'\\n\');
led1 = !led1;
}
}
Please Log in or Create an account to join the conversation.
- roboteq
11 years 2 weeks ago #29526973
by roboteq
Replied by roboteq on topic Re:AX500 not receiving commands from MBED
practice your commands via terminal emulator like hyperterm. This will tell you if the controller doesnt understand or if you send wrong.
You may need a delay between the each of the 10 CR\'s
You may need a delay between the each of the 10 CR\'s
Please Log in or Create an account to join the conversation.
- brightjoey
- Topic Author
- Offline
Less
More
- Posts: 6
- Thank you received: 0
11 years 2 weeks ago #29526987
by brightjoey
Replied by brightjoey on topic Re:AX500 not receiving commands from MBED
Hyperterm reads it properly.
If input \"!B50\" it moves for a second before stopping. watchdog mode enabled.
But that is connecting directly from the PC serial port to the ax500 DB15 pins.
If input \"!B50\" it moves for a second before stopping. watchdog mode enabled.
But that is connecting directly from the PC serial port to the ax500 DB15 pins.
Please Log in or Create an account to join the conversation.
- roboteq
11 years 2 weeks ago #29526989
by roboteq
Replied by roboteq on topic Re:AX500 not receiving commands from MBED
Then the controller works. Something is wrong in the way that you send the data from your program.
Please Log in or Create an account to join the conversation.
- brightjoey
- Topic Author
- Offline
Less
More
- Posts: 6
- Thank you received: 0
11 years 2 weeks ago #29526991
by brightjoey
Replied by brightjoey on topic Re:AX500 not receiving commands from MBED
Is there any example program where there is successful control with the ax500 and a microcontroller? Preferably something that controls DC motors.
Please Log in or Create an account to join the conversation.
- roboteq
11 years 2 weeks ago #29527009
by roboteq
Replied by roboteq on topic Re:AX500 not receiving commands from MBED
There are some source programs that may be useful at dev.roboteq.com/dev1/tech-support/application-notes-source-code
Please Log in or Create an account to join the conversation.
Moderators: tonysantoni
- Forum
- Roboteq Motor Controllers
- Controller Configuration & Operation
- AX500 not receiving commands from MBED
Time to create page: 0.068 seconds