Hello world,
I have a servo motor "Trinamic PD-146-60-SE" which I want to control with my "Arduino MEGA 2560". But how can they communicate each other with RS232? I can find in Datasheet of the Trinamic Motor that the pin 10 is "RS232_TxD" ->RS232 transmit data
the pin 11 is "RS232_RxD" ->RS232 receive data
Which pin has to be combined which pin on Arduino?
If this problem is solved my second question is, which how commands can I control the Motor?
Standard RS232 is high voltage (+/- 12V perhaps, though not always), so you have to be
careful when interfacing to logic-level serial connections such as the Arduino TX/RX pins.
Thanks for the answers but it doesn't help much. The RS232 is a 26-pin sub-d socket. I connect pin 10(RS232_TxD) to the Rx1 pin of my Arduino and pin 11(RS232_RxD) to the Tx1 pin of my Arduino. Now I had to write some commands to the Arduino Mega 2560 to move the Trinamic servo motor.
If I write the TMCL commands to control the motor
Tmcl Commands
ROL 0, 500000 //Rotate motor left with speed 500000
WAIT TICKS, 0, 500 //wait
MST 0 //Stop motor
But it doesn't work.
I get this message:
exit status 1
'ROL' was not declared in this scope
of course, it doesn't work because ROL is not a arduino command. but how can i move the motor?
I have had a look at that document. There are 107 pages. It would take me too long to figure it out. Sorry. In any case i don't think I could figure it out well enough to explain it to you without having a motor to experiment with.
On page 5 it seems to suggest that there is a
Step/Direction/Enable Input (Step/Direction support in hardware, differential, single ended and open
collector signals accepted)
That would make life much simpler but I can't find any details about it. Maybe there is another document.
Hi,
in the PDF document you can find in page 14, how it is possible to control with binary commands. An example to this is given in page 23 and 24.
I found a few tmcl code library in this link: https://www.trinamic.com/support/software/tmcl-ide/
if i want to test the program, i get an error from arduino "exit status 1: variable or field 'SendCmd' declared void".
I am not good at programming, because of that I would be very thankful for every help!