I wonder if somebody has experienced with AC servo motor serial communication.
I will be grateful for any help you can provide.
I have 1 servo from china and arduino mega.
Using Serial Port Mini RS232 to TTL Converter Adaptor Module Board MAX3232 with Arduino.
I made communication with driver and i can turn on servo motor hire is my code:
#include <ModbusMaster.h>
// instantiate ModbusMaster object
ModbusMaster node;
void setup()
{
// use Serial (port 0); initialize Modbus communication baud rate
Serial.begin(9600);
Serial1.begin(9600, SERIAL_8N2);
// communicate with Modbus slave ID 2 over Serial (port 0)
node.begin(2, Serial1);
}
void loop()
{
static uint32_t i;
uint8_t j, result;
uint16_t data[6];
result = node.writeSingleRegister(3, 1); //So in this code number 3 is parameter for turning motor on or off.Communication working because when i upload code with 1 motor get power.If i upload (3,0) motor turn off.And i can change all parameters via this code only i dont know witch are for position or turning cw or ccw speed and torque.
}
So i need write correct parameters hire for position,speed and torque.
I red servo manual over 20 times but i cannot found way how to do it.
I send email to seller 3 times but no respond.
Hire is manual so please if somebody know help.Thank you!
I did read most of the manual. After studying a bit of the communications section, I, personally, would not even consider using an Arduino of any type to try to communicate and control such a device. And I have many years of communication programming.
Even with a PC and having a control unit set up and running a machine, programming could take 12 months, or so. You need to realize there is much more than just sending commands. You need to receive the feedback messages and handle the errors that are reported.
Thanks but i setup parameters and wrote the code.And yes is working.
Soon i will make video about how to control ac servo with arduino.
Serial 232 communication and pulls.After i get code for encoder done.
Because i couldn't found any information how to control ac servo via arduino.
Manual is so important and all drivers-motor parameters.But thank you anyway.
If somebody need help i will glad to help you.
I dont know to to send parameters to ac servo drive. And do you connect serial connection between arduino and servo drive directly with wires or do you need some extra "shield"/"controller" to change voltage levels? How did you connect it?
Thanks in advance, if you respond to my message i can explain my problem in more detail. Your code would be very helpfull to me.