Hi everyone, I need some help with my proyect. I want send some data to an AFD Yaskawa V1000. I have the bytes test and I send it but I cant comunicate with it. The AFD just show an 'CALL' error, means dont have connection. We have many AFD connected to a PLC Omron and the 'CALL' is an error of comunication.
AFD Config:
ID: 3
BaudRate: 19200
Parity: none
#define SerialControlPin 3
#define RS485Transmit HIGH
#define RS485Receive LOW
void setup()
{
Serial.begin(9600);
pinMode(SerialControlPin, OUTPUT);
digitalWrite(SerialControlPin, RS485Receive);
Serial1.begin(19200);
delay(2000);
}
void loop()
{
digitalWrite(SerialControlPin, RS485Transmit);
byte request[] = {0x03, 0x08, 0x00, 0x00, 0xA5, 0x37, 0xDA, 0x8D}; // Test loop code
//byte request[] = {0x03, 0x10, 0x00, 0x01, 0x00, 0x02, 0x04, 0x00, 0x01, 0x02, 0x58, 0x63, 0x39}; // Change to 60Hz and turn on
Serial1.write(request, sizeof(request));
digitalWrite(SerialControlPin, RS485Receive);
delay(10);
while(Serial1.available())
{
Serial.print(Serial1.read(), HEX);
Serial.print(" ");
}
Serial.println();
delay(500);
}
Thanks and sorry for my english. Also, this is my second post.
modbusv1000comunicacionesenmodbus.pdf (394 KB)