Hello in this video. 1
We are going to learn serial communication plc programming example for vfd parameter settings. 2
Okay. 3
We are adapting our plc or master plc to communicate with the slaves but also if you are communicating 4
with the AC drive or vfd you need to communicate, adapt parameters of this vfd or AC 5
drive. 6
First of all modbus communication address of the device is specified must be plc is master. 7
So address of plc is one vfd address cannot be one so you can give to your VFD address as to 8
three or another the parameters that will be communicated with RS485 must be set. 9
So your source of first master frequency command and also source of first operation command must be 10
adopted RS485 so for the vfd-e 11
You can see it in here. 12
Parameter 2.00 must be 3 and also parameter 02.01 should be 3 or 4. 13
And also if the frequency read and write operation is to be done from plc the related parameters should 14
be adjusted stop operations will be done from plc the relevant parameter input must 15
be made. 16
These are so we can give operation command to go run forward or stop or backward parameter 2.01 17
is relevant parameter and for the frequency read and write operations source of first frequency 18
command. 19
So we will give frequency value from our plc to our vfd so we need 20
adopt parameter 2.00 4 VFD-E drive parameter setting should be done for 9600 baudrate. 21
This is an example for example if you are using baudrate as 19200 So what 22
you need. 23
You need to adopt your these parameters these parameters are starting from 09.00 24
And it goes on. 25
So in here you're gonna see a communication address of your device for vfd-e. 26
you need to give a address for example two or three or five. 27
You need to change your parameter 9.00 parameter. 28
This is important and also transmission speed is means our baudrate. 29
You need to change your 09.01 parameter, parameter must be entered for example seven. 30
E 1, 7 even 1. 31
It's our protocol. 32
Imagine like this. 33
You need to put it in here. 34
09.04 35
So timeout detection and also transmission fault treatment. 36
These are whole parameters that you're gonna use for the vfd side and also the last thing it should 37
be noted RS485 communication between PLC and inverter is cross in here. 38
You can see VFD-E side or vfd side or AC drive side connection cabling. 39
So it will be RJ45 jack. 40
if you look behind it or front it. 41
So from the right side to the left side it is starting from 1 to 8, 8 pin so 14 should be SG- 42
15 should be. 43
SG+ and 13 should be ground so for the ground doesn't matter it is important but the for RS485 44
communication you need 2 cable because RS 485 communication is 2 wiring cabling it is need just 2 cable 45
+ and - in here the first part. 46
of our program in the first scan we are writing k1 So this is our Master Plc address in D1121 47
in here we are writing our protocol the timeout and we are resetting 48
complete steps no from starting S1 to S45 and we are setting S0 and then in S0 49
step we are activating M0 bit so we are using a timer timer it's going to the count or after two. 50
multiply by 100 milliseconds so after two hundred milliseconds this timer will be on in m0 after 51
M0 activated so suddenly S0 step is activated M zero will be activated so m0 in the 52
rising edge contact we are setting M1122 53
So this is our sending request auxiliary relay or internally special bit. 54
So in the previous lesson we already showed it to in the table remember that. 55
So we are setting this one modrw command or modrw instruction what we are 56
doing in here ,in here D50 is written to hexadecimal 2001 57
Let's take a look what is it. 58
It is frequency 59
command 60
So what you entered inside of D50 this will be your frequency and then we are waiting. 61
M1123 62
And if I'm sending or receiving is completed. 63
So we are resetting this flag and inside of this time already we write this data because the communication 64
is very high very high speed communication also according to our baudrate and we are writing 65
and reading a lot of data inside of the seconds. 66
So we are setting after these timer is on in the rising edge contact we are setting S1, S1 is 67
activated so M1 is activated this auxiliary relay bit is activated. 68
So in the rising edge of this bit in we are using M100 auxiliary relay also. 69
So if M100 goes high or activated by you we are sending request read and write request 70
again. 71
So now what we are using -> H2000. 72
Let's take a look. 73
H2000 so we are gonna give a command to our vfd run forward or backward or similar or 74
something like this. 75
So let's go back here what we are writing in here we are writing to third slave K3 is the slave number 76
slave number is three. 77
So third slave. 78
We are writing hexadecimal twelve so in here let's go back to in here how can we calculate it in here. 79
Let's take a look. 80
Our calculator and go back to programmer 81
-- 82
I will use binary 83
in here. 84
OK. 85
So hexadecimal12 (h12 / 16#0012) 86
hexadecimal eight. 87
I will activate this. 88
Not this one. 89
I'm going to 90
find it. 91
So this is seven. 92
This is f this is D. 93
This is C. ten and twelve so forth bit is one so Fifth bit is zero so 0 and 1. 94
This is forward command. 95
So first bit is zero. 96
Okay bit zero is zero but bit 1 is 1 so 01 is what is the meaning of it. 97
Or 1and 0 98
We can we should look from left to right. 99
It is run ,run and forward command is used in our example. 100
So we are writing in this step to our vfd run and forward turn forward and run command is write 101
it in here and also after M101 auxiliary relay bit or this contact is activated by 102
you in the after is activated or goes from off to on. 103
We are sending request again and then we are writing to 3.slave hex 1. 104
what was the hex 1 so hex 1 in here let's take a look. 105
1 should be stopped. 106
So if you want to stop your machine or stop your vfd in step 1 after M101 is activated 107
by you you are stopping your VFD. 108
So what we get. 109
Till now we write our frequency command here. 110
Okay. 111
This. 112
is written into the vfd. 113
So this is forward button and run button. 114
This is stop button from your HMI or it's coming inside of HMI or you can put these contacts 115
as output with your physical inputs and etc or you can use it inside of your plc in any 116
any part of your project. 117
And after these are finished are these writing and reading is completed. 118
But we are writing in here. 119
Writing is completed. 120
This flag is activated and then suddenly it is resetted and we jump to set S2, S2 step in here. 121
Let's go to S2 in here. 122
We have two part for S2 and in here a request to read and write to specified. 123
That's okay. 124
The current frequency information was read from the drives from where , from h2102 125
address 2102 is here it is frequency command 126
let's go back here from the 3.slave we read these data how many will be read. 127
Six data is read automatically and saved in D1050 and D1055 128
So at the moment also after is ,reading is completed this flag is goes high the rising edge 129
Okay then the block move we are moving this data 130
six data from this D1050 to it starting from D300,301 131
d302,303,304,305.. 132
So read data stored in D300 to d305 and in here we are resetting 133
this read data from slave first time we read data from our vfd and this data readed and that 134
moment it can be changed so already the output frequency is or the output current and the a lot of 135
things are all parameters can be changed so we are resetting this data in here so we are resetting these 136
read or write it is completed flags again and we are resetting M1129 137
auxiliary relay bit , special bit also and we are going back to S0 so this is just for the 3. 138
slave communication program imagine that ,this is just one function block and it is starting from 139
here so you can put these codes to your function block or your program if you are communicating with 140
a five device so you just need to change this address so we are now reading and writing with this 141
from 3. vfd or 3. AC drive. 142
So you can if you put here to two so that the address of 2 which address which drives or vfd 143
address is 2 we will communicate with it if you put in 4 which drives or AC drive or vfd addresses 144
4 then we will communicate with it. 145
So you can communicate with your vfds or drives or external devices via serial communication 146
and you can write the frequency you can give a command to run forward or stop and run an etc. and 147
you can monitor or read frequency, output frequency and the current and etc. are complete list 148
in here you can see them all with like this. 149
This is the example of the communication between plc and the drives this was the first example. 150
So see you in the next video there will be a second example about the communication about the modbus 151
communication for delta plcs.