PLC & VFD MODBUS Communication Mode

PLC & VFD MODBUS Communication Mode


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 ([email protected]) Thank you so much 🙂

Danny Hutson

100 thoughts on “PLC & VFD MODBUS Communication Mode

  1. hi mr RAJVIR SINGH thank you for all informations, please can you show us how we can command a servopack with a PLC for example S7 300 and a type of signale that we should send from PLC to servopack thank you very much

  2. Dear sir, video you have posted is very useful and thanks a lot, i need a help i.e i want to communicate my plc(dvpss2series) with external devices like bar code scanner such as to drive the input in the program is possible if it is please guide me …..

  3. Dear Rajvir sir, i am getting feedback of command & output frequency but i want to get feed back of output current & voltage so i have written H2104 & D1052 for current feedback & H2106 & D1054 for voltage feedback but it's not working.please suggest. FYI i have sent the screen shoot to your mail, thanks

  4. hello,
    I would like to control VFD drive using PLC analog output can you share details of its connection and configuration process?

  5. respected rajvir sir
    sir i don't know about plc and other electronic equipment such as modebuss profibus sir i am ecectrical technicians pls suggest any book . or from your program . [email protected] 9920194202
    thanks

    kuldip singh

  6. Good evening Sir, i've been watching videos online always, i must say you are really helping us. I am using Delta SIPSOFT TO Program , please i need a vodeo on Delta ISPSOFT as a beginner to home automation lighting control. Thank you

  7. hi sir ..I want to communicate yaskawa v1000 with Omron cp1l plc…please help..i want to know Modbus instruction and v1000 address for speed change.

  8. if i read the data from different slaves the data will saved in d1050 and d1051 and so on what ever the number of data addressees i read from the same slave and different slaves

  9. I can help in communication yaskawa v1000 with omron cp1l Plc… you can see example in my videos

  10. very informative this video thanks sir….I am in trouble to connect a analog module to fx3u Mitsubishi plc and also in floating point plz help me…

  11. thanks for such an informative video!!! I have a small doubt is it possible to operate 2 vfd's simultaneously? and if I read the two vfd's output frequency together in which data register it will be saved?

  12. Sir, i am your student at NFI , i need to perform Modbus operation using delta PLC and Siemens vfd!! I am facing a lot of problems! No parameters are there for ASCII mode in manual moreover no address for functions!

  13. Thanks for the above video.. but i am facing small problem in our PLC … Please can you help me… The problem is we are communicating ABB ACS800 VFD drive to Forbes Marshall PLC successfully. but the problem is in one direction of rotation only we are getting correct reading of RPM, Frequency and Torque reading, if we change the direction of rotation of motor … we are not getting correct reading… the above three parameters address for both direction is only one address, he is not given (ABB) for two address for both direction so that's way it is not correct like that our Forbes Marshall PLC engineer said. but my doubt is it is only program mistake in PLC…. Please give suggestion for our problem or please send me mobile number

    Regards
    Venu
    8885683830

  14. hello very thanks for your all videos

    can you put give a short notes about device net bulider and it communication with plc in delta

  15. Dear Rajvir, Please make a tutorial on Modbus RTU with Omron PLC and Other VFD.I am studying since more days But I cant. Plz help me

  16. Hi,
    I had contacted PLC Siemens 1215 to LS VFD (ig5a) via modbus RTU…
    My problem is it tells me that slave timeout, but can be read the parameters.
    The question is why the error is display and is it dangerous in the future?
    Thank you very much.

  17. Hello!
    I just watched your video and I think is very useful. Right now i'm, trying to communicate 1 PLC as master and another as a slave. Two Delta PLCs. I have not succeeded. I would be so grateful if you can give me a few tips or maybe a simple routine to achieve my objective of comunicating 2 PLCs by RS485 using only ladder and WPLsoft.
    Regards.

  18. hello sir , i m using vfd el series and plc 14 ss2 . i m not able to communicate the vfd(el series) with plc (delta 14ss2) by ths programme
    .

  19. HELLO SIR I HAVE A PROBLEM THAT I MADE A SIMPLE CIRCUIT BT WHEN I DO TESTING THEN I GOT A ERROR ……… ERROR IS THAT COMMUNICATION PATH IS NOT CORRECTLY AND DRIVER NOT SUPPPORTED ,………. SO PLS HELP MEE E E E EE PLS PLS [PLS

  20. I am working on a project which requires to remotely control sensors and actuators
    1.ARE their any sensors that give or recieve signals without any other device.?Are they cheap for students project?
    2.If not, then how to recieve and transmit these signals to plc?
    3.Does wireless communication invlove modbus?
    plz help.really confused??

  21. hello Rajvir, thank you sir, I really appreciate your contribution for us . I am electrical engineer graduate and i am new for PLC programming and now I start learning by help of your videos. thank you again

  22. Please make a video on dvp 12sa2 ( R type and T type) relay and transistor what makes difference in wiring w.r.t relay

  23. Hello…I have one question..how about communication direct using another type PLC cpu? also can use this method or not? Because their setting and write method the program is similar with Mitsubishi programming. Thank you.

  24. thank you so much for this useful video, but how can i get the data adress of my VFD-L?
    is it the same as VFD-M series

  25. your videos are wonderful,I've seen all of them and I really Like that.
    But i want to control VFD using my HMI via MODBUS, I know the connections and everything but you can do one more video on that as well..
    I will recommend you when I will start my tutorials on PLC
    Thank You.

  26. Hi Sir, Thank you so much for your explanation.But I have some problem that even I did all procedures (PLC & VFD sides) as you had done, I cannot turn on the VFD by command (e.g K2) and change the frequency (e.g K2000 etc.).Please help me to reply.

  27. hello sir. i made the program of vfd modbus in wpl soft and the program works perfect as you explained in video. Now i tried a delta hmi dop b to communicate with plc with modbus but unfortunately i could not connect hmi with plc .so please guide me what to do. thanks . ajit pal singh

  28. If we use more than one drive what would be data address for plc for showing the output frequency and command frequency

  29. God Bless your parents and do not forget to curse Omar, Abubaker , Osman, Muaviyeh, Yazid and Khalib bne valid laaanatolllah Allaihem. Thanks

  30. Hello sir,

    Mere pas ES2 PLC hai aur DOP 107WV HMI hai aur mai multifunction power meter ke sath communicate krana chahta hu taki mai kilowatt apne HMI screen par dekh saku please sir help me.

    Power mete SATEC PM 174 hai…

    My WhatsApp number is 9624070018 hai please sir help kar dijiye maine aapka hi videos dekh kar ke plc programming sikha hai.

    Guru hone ke nate reply kijiye sir on my WhatsApp number.

    Please sir mera project isi ke chalte ruka huaa hai…

    I am waiting for your valuable and positive reply….

  31. Respected Sir Is this Program Code that u have used here can be utilised only for this Model of Delta VFD??

  32. HELLO RAJVIR, COULD YOU PLEASE HELP IN HOW TO CONTROL DELTA PLC WITH ASDA SERVO DRIVE USING RS 485 COMMUNICATION. THANK YOU.

  33. I tried to read the output voltage and output current from the drive but i was not successful. can anybody help me to solve this?

  34. Hi
    Please establish rs485 communication between delta plc and mitsubishi vfd E700.
    It should contain change of frequency of drive through modbus register.
    Hope you consider my request.

Leave a Reply

Your email address will not be published. Required fields are marked *