PLC & VFD MODBUS Communication Mode

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Hello guys. This is Rajvir here and welcome to of our new lesson of PLC to VFD modbus communication ASCII mode. This video is for the special request of few enrolled candidates who wants to learn PLC modbus so this video is dedicated for you guys. So what we are going to do in this video is we are going to control our VFD using a Modbus communication with a PLC. Alright! So this is the program which we have made for this MODBUS communication and what you can see here is like this is my MODRW commands right so if you can see in the camera if I go to k2 this is going to run the drive this is the frequency command all right now put 3500 the motor is going to run at 35 Hz 3500 divided by 100 is the number of it's the Hertz which comes out so it's 35 Hz alright! This is the run command and I can even change the direction of this motor. For this I have calculated, I have calibrated few constants here so to change the direction after put K34. Now motor is going to stop and it is going to change the direction you can see that action has been reversed alright so how to make this program? What are the different data registers i have used ? What are the bits I have used ? I hope you can clear the clear that from this program right !!! Just kidding so let's see let's break up this program and let's see what are the different bits and data registers we have used! How to make this program ? Alright.. what are the different elements of that? So let me just stop the drive for a moment okay let me just reset the frequency as well okay so let's start with what is Modbus? MODBUS is the serial communication between various devices now you know in the electronic automation world you may find various types of devices which by different manufacturers like we have different PLC's different drives and different servos HMI so so if you see the internal you know structure of these electronic components we have what we have we have memories we have IC's we have different registers inside this IC we have typically that's a memory right so so this Modbus is directly accessing the memories of different devices all right? As you can see here if you are directly accessing the memories the ICS or the memory register which are inside the drive that is a MODBUS. Now we are not communicating via some voltage or current or you know just like we do in VFD what we do is we used to convert 0 - 10V into 0 - 50Hz which had converted into frequency so we use potentiometer to change the frequency now suppose now suppose if we do not want potentiometer if you do not want a potentiometer you want that to mean that thing to be done using some by directly accessing the memory ..that is the MODBUS right! So how this device will be communicating this is by several parameters it says ASCII mode, baud rate, parity, data length Stop Bit. This are the different parameters which needs to be similar in both the devices all right if baud rate is 9600 in this drive it should be same in PLC parity should be same data length should be same so we have to configure the devices by some default parameters right then only they can communicate with each other just like two people can communicate if they know the same language otherwise it's quite difficult similar way this is the language how they they can communicate with each other so that is a MODBUS. Alright so this is the wiring diagram of Modbus of PLC. So PLC is having a port of rs-485 at the bottom of that this is DVP 14SS Delta PLC and this is the inverter port which is generally found here so if you see in the camera. it is somewhere over here this is the board this is the board of MODBUS Alright this will be this is like this so the same wiring diagram as made in this presentation. This is the Modbus this is the port is used in Modbus communication so here we have third and fourth number pin is negative and positive so third number is going to the negative (-) of PLC fourth number is going to positive (+) of PLC that is the wiring this is the parameter so now next is how to set these parameters? okay so in VFD now configure configuring VFD with communication parameters in VFD there is a parameter number 'P92' which says that if you set '01' in 'P92' it will make this drive at ASCII mode, it will do the parity 'even' Data length -7 and Stop bit - 1 So that setting depends on different drives and in some Allen Bradley and Siemens that will be some different parameters but that you know surely exists there so parameter 'P92' if we put '01' it will make these parameters alright it will you know configure the drive with these parameters with these settings and for baud rate its parameter number 'P89' you have to put '01' there! all right so don't get confused with 01 89 and 92 that's already written in the manual You just have to see the manual that might be 89 or 85 or 82 depends on the drive okay so next is our source of frequency command of course because we are going to control this drive using 485 i.e. Modbus so we have to put 485 that can be you know different protocol as well if you're doing with 485 then you have to use Rs 485. So typically we do Modbus with 485 and source of operation come on is well 485 that is done by parameters number 'P00' for frequency 'P01' for operation so that's how that you can you know put the parameter by putting the values in this parameter on this Drive it's quite easy quite, flexible you can do it very easily so that's the drive part how we can put the parameters in the drive okay so next come how to configure plc with these parameters that is a tough part little complex matter but not that tough okay! So this is the first ladder it says M1002, Now if you don't know why in 1002 this is a pulse this is a bit which get which gets on when the PLC's at run state just for a moment all right! if you know M1000 which gets on continuously if PLC is running state this is a bit which gets ON just once it will just give you one pulse when PLC goes from STOP-RUN mode okay so with the single pulse what it is doing? It is is moving H86 in D1120 now what is that one so let's discuss this command over here I'm just breaking the paths move H86 in D1120 or first of all 'H' is a hexadecimal value 86 the hexadecimal value okay so if I break this value H86 it come it will come like this this is 6 - '0110' is the six 8 - '1000' that's how you convert hexadecimal into binary right first four bits representing the six and the next four bits representing the eight so it's H86 now D1120 is a specialized data resistor inside a pc which will define its communication parameter. Now that data resistor is default for this PLC delta dvp 14SS. it can be different for different PLC's. But it is there so if you are doing Modbus in this plc surely you can do that if you find other others plc you just need to understand what are the basics? Basic says we have to configure the devices with same communication parameters alright so now let's see what will happen if I put H86 which is 134 in decimal now look at this part b0 b1 b2 b3. b0 is a bit that defines a data length and what is the data length we require that is seven if you go back here seven data length.- So we have to put we have to put here '0'. So bit0 is 0 okay let's come to the next part bit1 and bit2 is a parity. We need an even parity this is what is required okay so for even parity wait let me just highlight this one 7 Data length, even parity you have to put 11 this is default these settings are default this is given in the manual of your devices right. So here we have 11 bit3 - Stop Bit. Stop Bit is 1 1bit is stop okay so here we have zero if you want to check again 7 - Data length, parity even, Stop Bit -1, ASCII Mode okay! coming back here so bit0 bit1 bit2 and bit3 has been defined now let's see the next four bits. These four bits defines the baud rate. What is a baud rate we require? - 9600 that we have put in the drive so same here for 9600 you can select that if you put 0001 it is 110 150 600 4800 9600 is over here this is the baud rate we require. For that we have to put 1000 so it's 1000 ok! So that's why this becomes H86 so this is the first command now if you're suppose communicating this PLC with some other device maybe they are baud rate of other devices is somewhere 19200 or sorry 19200 , 115200 so you can vary the baud rates it's up to you and you can also vary the parity, Data length Stop Bit, everything so this first command Mov H86 D1120 has been defined by this H86 okay it's a parameter has been similar so let's move next next other three commands this one and one M1120 It says that Set M1120 is again a specialized bit which whose function is default its function is already default it says that it is used to hold the communication even if the value in D1120 changed! so what is this D1120 this is the D1120 if suppose the value has been changed by mistake to avoid some interruption in the program we can set M1120. it's optional if you set this one your communication parameter will not be changed even if the value of this has been changed okay it's a kind of security you know so get into your communication parameter so we have to do so you have to Set M1120 in parallel that will make our program more secure. Now next is the timeout value is by default we have entered 100 milliseconds. Timeout values is the value at the time for which it will wait for for any successful communication. It will wait till the receiver and transmitter have received the data that is the time out value. How much time you want your device to wait so that is a so we have took here 100 which is 100 millisecond or 0.1 sec okay now come memory bit M1143 which is again a default bit which says that if it is ON then your mode is RTU. If it is OFF its ASCII. So our requirement is ASCII mode so we have to reset that, so our first program this area of program this length of program has been defined. we have understood each and everything okay now let's move beyond Sending your request..now if you know that in a Modbus we have to send a request to send the data for every device or PLC has to get some input that - yes ! now you have to send the data we have entered of the data ,now you have to send that so we have to send a request there so for that we have to use this bit M 1122 this is again a default bit its function is already defined by the manufacturer that it will send the request to the transmitter sorry to the receiver which is a drive that I'm sending the data! Ok when the drive is ready it will receive the data. That's how it works so for that you have to take three bits M0 M1 and M2 okay! So this M0 M1 and M2 has been turned ON by these some comparison command of a counter C0. I'll tell you where we have where we are actuated this counter and why we need that because for every data we have to send the request so we have to keep sending the request we have to keep you know putting this up we have to keep you know because it I generate them generate the pulses to this set M1122. so we have also done the reset of counter so that this will continue in a loop Data sending request is very much you know required suppose if you have if you want your drive to start you have entered the command of start until unless you actuate this command. Data sending request, it will not RUN ok so this needs to be activated every time when your data is entered- the kind of operation you want to actuate that you have to keep sending the request so for that we have to keep generating the pulses here so how we're generating these pulses Let'S see that- So these are the three methods , how which we are generating the pulses we are actuating the counter. First is M1129 this is Data receiving time-out bit okay now when data has been received This will be ON, so this will again generate a pulse for this data sending request. because if you want to keep sending the data so this will keep it will keep on and off when the data has been received it's a time-out bit okay then comes- Data receive error! suppose in case your data has not be received there is an error. So that will also you know that will not halt the program. That will also keep sending the request it will keep continuing the program maybe you know our second data can be received or third and fourth data.. that is very important you want to keep continuing the program, so we have took the loop error also data received error, to run this counter okay! Then data receiving completes so the data has been received then again we are actuating a counter. This is the same counter we see here C0 here we go it's the same counter so we are actuating the same counter this C0 by 3 different bits data receiving timeout, data received error and data receiving complete So just to keep continuing the program I'll show you in the later logic Then comes your MODRW this is the program which will write the values for different operations of a drive for examples Run, Jog, Forward, Reverse, changing the directions. So how does it work? So it says with M1 MODWR this is a mod write syntax of MODRW command K1 this is device address data address now this address H2000 is the address of my drive this is not a PLC address This is the address of my drive as I told you that in Modbus we have to directly access the drive so what PLC is doing is .. PLC is writing the value of D10 - is a data value, whatever value will be here it will be transferred to H2000 now it is up to the manufacturer these values we see here k1 k2 34 this is defined by the manufacturer of my VFD that if I put K1 into H2000 drive will 'stop' okay this is already different if I put K3 into the data address H2000 Drive will 'Run' in 'jog mode' and If put K1 - Stop, K2 -Run and if I put K16 it's the change the relation to 'forward' if i put K32 direction will be change to 'reverse', direction will be toggled by 48 and by 18 it will be directional also be change and and also run command will also go there okay so these different values we can put in D10 to change the operation of a drive that really makes sense so these value constant value we can put in D10 that will be transferred to H2000 immediately at every data setting request that is the operation control command in Modbus communication so let's come to the frequency part this is the frequency part here we are also again using mod write frequency control command mod write K1 this our drive address now this device address means K1 means this is my first device. So this is my firstdrive which is connected to my PLC If I connect another drive I have to write K2, if all the parameters are same, I have to write K2 so that will become my next drive, if I have more than 5-6 drives then I have to write k2 k3 k4 k5, so I can control many drives maybe having up to 286 drives 286 devices can be controlled using Modbus so that's the you know application of MODBUS. it's very easy very flexible you don't have to put so much of wiring of potentiometer to change the frequency you can do it within using a PLC for fully automatic operations so that's a device addressed k1 again, this now this H2001 is specified for the frequency of a drive okay as 2000 was for operation 2001 is for the frequency and data value D11 this is the value which I'll put from PLC into the memory address of the register. So it says that if you put K1 that will be equivalent to 0.01 Hz If you put K5000 it will be 50Hz, all right so that's that's you know directly proportional we can put the value, we will get the frequency and we change the operation these are the different constants we have! Pretty easier so then we have- how to take a feedback from the drive if I'm saying it's MODBUS, it's two-way communication you can also read from the drive for that the command is mod read MODRD that's stands for mod read now in mod read I have took M2 bit now it says MODRD K1 H2120, now H2120 is my command frequency I haven't written here so let me just highlight this one that is my command frequency the frequency which I have commanded to my drive I can write and H2103 that is my feedback of output frequency. Output Freq if you can see if you remember in drive we have out freq represented by 'H' so here output frequency is represented by H2103 That is an internal data resistor which will give you an exact feedback of your frequency ok so we can read the values from the drive itself so all these resistors are typically li you don't have to bug it up it is typically present in the manual of it drive OK, this is always there or you can google it out if you don't have your manual google it out it's always a when Manuals always provide you the data resistors of MODBUS okay! That's the command frequency that is an output frequency we can read that and by default these value will be stored into D1050 and D1051 because we are reading that we haven't mentioned data register here but for PLC if you read the PLC manual if you are reading H2102 that will automatically be stored into D1050 and H2103 into D1051. That is by default that's why I have divided this with 100 to get the exact value here so this was about reading the value writing the value under Modbus address so let's see the exact program now this is the same program which I just explained you this is the part of your setting the parameter MOVH86 okay if you see here it will keep on blinking it is keep on sending the request to the device ok. It is data receiving complete feedback these bits are getting on and off you cannot see that but it's actually getting on and off because they are also resetting itself by this how counter is running this is the equivalent bit by which we are turning on M0 M1 M2 in a continuous loop. These pulses are given to Set M1122 here. OK! Now coming to the mod write MODWR- this is the MODWR M0 --- so here it is K1, K1 says motor is Stop. Let me put K2 okay before that let me put some frequency and see that I can see the motor running so here right now it's K0 frequency is 0 I'm putting K 3500 we'll find frequency 3500 Hz here you can see 3,500 that is a commanded frequency now let me put here K2 (RUN) you can find the drive is running you'll also see the motor it's running okay K2 is for RUN, if I put K3 that will make 'jog run' Jog is by default 6 Hz okay before that I think I have to stop the motor K1 (STOP) then I'll put K3 now you can see that motor is at jog mode it is having 6Hz frequency and motor is running. Running here as well. OK Now, let's stop the JOG! now let's try this Forward + Run = K18 okay the motor is running at forward okay to make it reverse we have to put 34 now there is some deceleration time so it's taking time to stop and getting reverse. now it's rotating at reverse direction okay so if I put K48 it will just toggle the direction. Similarly it will do the similar operation now as I have given both the command so I have to first stop the motor now right now my drive is at forward mode. It's written over here it's forward so to toggle the direction I put K48 now it will keep on toggling because let me just wait I can see that it's now at reverse ! okay actually what happen if you're going to toggle the direction you just you just have to give the toggle command by just sending a pulse you don't have to continuously send 48 so that will create a problem so if I have put 48 here what will happen here you see it's toggling FWD/REV .. FWD/REV.. why it's happening because at every moment this 48 is going so when it goes to forward pulse comes it go to reverse pulse comes, it go to forward so you just have to change the toggle Direction just once okay so let's just over this right now I'm putting K18 that is Forward + Run okay so you can even change the frequency here. K2000= 20 Hertz K200 = 2 Hz similarly if I put K5000 it will take you to take it to 50 Hertz and here you can see that this is the commanded frequency this is the feedback of energy which is being reflected by this H okay so if we see here D1 that is a exact replication of this H here H50 so let me just change the frequency you can see that both getting change proportionally am putting here k100 = 1Hz can you see here it is decreasing and similar way it is decreasing in the drive itself now it's going in 1Hz okay which is which I guess I will not take 1 Hz. I have to put some more value. So minimum value drive requires a minimum value to run at 100 is not much! So that was about Modbus communication so our main resistors are 2000 2001 to give the value and even you can give the value using an HMI connected HMI takes them in numeric value D10 and D11 or you can make some buttons and you can move the value so it will make very easy to control the drive using an HMI just by two wires rs-485 that is the beauty of this MODBUS communication similar way you can control your PIDs and you can also control this drive directly from HMI without the use of PLC again by Modbus okay that we'll be doing in later on lessons so that was all about PLC to VFD Modbus communication ASCII mode between delta 14 SS and Delta VFD M series so if you have any queries any doubt you can post a comment in this video or you can write me mail (nfiautomation@gmail.com) Thank you so much :)
Info
Channel: Rajvir Singh
Views: 265,653
Rating: 4.88412 out of 5
Keywords: VFD Training, VFD Tutorials, PLC MODBUS, VFD MODBUS, PLC VFD MODBUS, nfiautomation, AC Drives Tutorials, Delta Drive Tutorials, PLC VFD MODBUS Communication, VFD MODBUS Settings, Delta VFD MODBUS, AC Drive MODBUS, VFD MODBUS Tutorials
Id: PDDEjl50muw
Channel Id: undefined
Length: 25min 20sec (1520 seconds)
Published: Mon Mar 17 2014
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.