I am attempting to control a Folinn VFD Manual with an Arduino Uno via a MAX485 module like this.
- Pins for MAX485:
- DI > D8
- DE & RE > D10
- RO > D11
VFD settings:
- F00.01 set to 2
- F00.06 set to 9
- F13.00 set to 1
- F13.01 set to 5
- F13.02 set to 3
At this stage I am attempting a very simple code just to turn the VFD on:
/*
ModBus RTU control VFD
Address : 01H (is the address of the VFD)
Function : 06H (write function code)
Starting data address : 20H
: 00H (2000H is the address of control command)
Data(2Byte) : 00H
: 01H (0001H is forward command)
CRC CHK Low : 43H
CRC CHK High : CAH
*/
#include <SoftwareSerial.h>
#define SSerialRX 11 //Serial Receive pin
#define SSerialTX 8 //Serial Transmit pin
#define SSerialTxControl 10 //RS485 Direction control
#define RS485Transmit HIGH
#define RS485Receive LOW
#define Pin13LED 13
// From manual vfd Forward command = 01H 06H 2000H 0001H 43CAH
byte request1[] = {0x01, 0x06, 0x20, 0x00, 0x00, 0x01, 0x43, 0xCA};
SoftwareSerial RS485Serial(SSerialRX, SSerialTX); // RX, TX
byte byteSend;
void setup()
{
// Start the built-in serial port, probably to Serial Monitor
Serial.begin(9600);
Serial.println("SerialRemote"); // Can be ignored
pinMode(Pin13LED, OUTPUT);
pinMode(SSerialTxControl, OUTPUT);
// digitalWrite(SSerialTxControl, RS485Receive); // Init Transceiver
RS485Serial.begin(9600);
}
void loop()
{
digitalWrite(SSerialTxControl, RS485Transmit);
RS485Serial.write(request1, sizeof(request1));
}
With the MAX485 connected to the correct ports (S+ and S-) on the VFD, this current setup receives no response is someone able to spot where I am going wrong? I have taken the values for CRC CHK Low & High from a different example, is this the issue?
Have also tried setting F00.01 to an unlisted '3' setting that I have seen pop up in other discussions but this made no difference. Any advice would be much appreciated, let me know if I can supply further details.
(I chose this method based on this example)