Control of Drives via Profinet or Profibus

welcome everyone to this month's webinar presented by see any sales my name is Scott Henry and I am a automation specialist with see any sales today's topic is going to be control of drives via PROFIBUS and prophy net and we'll get started with the presentation here just a little bit of maintenance before we get started what we'll do is we'll mute everybody to keep the background noise to a minimum and at the end of the presentation what I'll do is I'll raise your hand and I'll unmute the person who raised the hand and we'll go ahead and ask your question or if you want to email us or call us at the end of the webinar with your questions that's fine as well so we'll go ahead and get started traditional drive control at least up until the inception of industrial control networks has been via digital and analog i/o mainly what happened is what's happened is in the past is we use digital outputs to start and stop the drive and get some sort of feedback via digital inputs or analog inputs and then our analog output analog output to the drive and I have these two backwards apologize for that our analog output to the drive controls the speed reference there's a very simple way of controlling the drive and it could be implemented with a wide range of PLC's using discrete and analog i/o one of the problems with that is nowadays with our flash standards the user must access the inside of the cabinet for some diagnostics and troubleshooting so therefore they would have to shoot suit up in addition to that you get a limited amount of info to and from the drive so if you want fault messages and some additional mess information besides speed feedback you'd have to have some extra analog outputs to do that and your remote connectivity depends upon the capability of the drive older drives didn't have communication capability and newer drives most newer drives have some sort of serial or industrial network interface on the front of it in addition to that you got lots of wiring you got lots of wiring to some digital input digital output analog input and analog output modules and therefore it takes up some rack space and cabinet space as well and that's a concern nowadays as well with the inception of industrial control networks especially with PROFIBUS we have a much more simplified wiring scheme this is an example of a topology for a PROFIBUS network as you can see the programming unit can be if you're using the Siemens PLC can be attached to the same PROFIBUS network as the HMI and the drives and if we have remote i/o networks we can tag them onto the same network as well profibus is a point-to-point network and it is commonly used in a line topology if we want a star network or even a line topology and we want it to be over Ethernet we can control it via prophy net / industrial Ethernet we have a programming PC connected up to a managed or unmanaged switch along with our HMI and our PLC and then it is in addition to that with the star network we can hook up one drive to each port of our switch or Siemens drives actually comes with a two port mini switch built in so they can take a line topology if your application requires it in addition to this any extra ports or any ports on the drives or devices can be attached to remote i/o or maybe even more HMI devices so the advantages of a pro feed net or even a profibus interface is we have one common interface for the PLC the HMI and programming and diagnostics devices we have more information can be transferred to and from the drive we have less wiring and we have one of the pluses especially for OEMs we have the ability to do remote connectivity so how if we're not wiring hardwiring to our drives how are the control signals organized well keep the information consistent and organized and to have a common functionality between vendors the developers of the PROFIBUS and prophy net have created the Profi drive profile and pro/5 is valid and available for profibus and pro feed net as well the Profi drive profile as a standard communications interface to and from a drive and the profile is divided into six six application classes based on functionality you won't get into that too much today but that's just a point of information there are two types of data exchange in PROFIBUS and prophy net they're cyclic data exchange and that's the status and control words basically your i/o signals that are transferred at a constant cycle to and from the drive and then there's a cyclic communication which is basically passing parameter data and diagnostic data back and forth from the driver i/o device as well additional profiles exist to handle drives with safety integrated and that's called Profis safe or the newest profile out by the PROFIBUS Trade Organization is prophy energy for energy comfort conservation prophy drive consists of different telegram structures geared towards certain application requirements for the most part they're kind of split in two you know organized into speed control of a drive and they're also organized into motion control applications the Telegram types are available for products is determined by the manufacturer so the manufacturer determines what telegram types it wants to support and that telegram type is defined in the GSD file or GSD EML file produced by that manufacturer and if some of you used Siemens or other vendors that support PROFIBUS or pro finet then you would have to get that GSD or GSD ml file and import that into your configuration software and then you can configure it configure that device in your configuration software the dispute based on the GSD or GSD ml file the user defines what telegram they want to use in the hardware config and also in drive starter and this is working with Siemens products the telegram types are to help the user quickly create the communication interface but user can also create their own custom telegram and with Siemens you can start out with a standard telegram type and then switch over to a custom telegram if you need to the basic telegram types that we're going to be talking today about are telegram 352 and 352 is for general purpose Drive speed control the other telegram we're going to be talking about is telegram 111 and that's for motion control we'll actually be getting into a little bit of software with telegram 352 and I have a little Drive application set up for speed control of the drive using telegram 352 on this slide we can see telegram 352 and the application class that it's associated with and we can also see the telegram structure and they actually give abbreviations for the status word and control word you want to be careful that STW doesn't mean status word it actually means control word so that's something that they've done and taken from over in Europe and then in Seoul a speed set point so that be the speed set point that you would feed into the drive and then over from the drive we would get a status word back which consists of a number of different bits and we'd actually get the actual speed actual current in actual torque for most applications especially speed controller drives this telegram works great and as you can see to the drive we have some additional control words that we can throw to the drive if we need to so basically how you look at the communication interface is the control we're going to the drive would be basically like digital outputs if you were to have a discrete and analog drive control method coming back from the drive you have a status word and that status word on the right-hand side here would be just like digital inputs going into the PLC so called control bits to the driver treated just like digital outputs control words such as your speed reference or any type of reference going to the drive would be treated just like an analog output and then status bits from the drive will be treated just like digital inputs and status words from the drive would be treated just like analog inputs this is a snapshot from Drive starter and basically it gives you a structure of all the control words going to the drive and we can see here on the left-hand side here are the control word control bits if we go over to the right-hand side of this slide and apologize for some reason my slides switching automatically on me on the right-hand side of the drives we have our right-hand side of the slide we have the status word coming back from the drive okay we move on to the next side we take a look at telegram 111 in the telegram 111 we have 12 words going to to drive in 12 words coming from drive okay and we can see that we have a lot more information going to the drive sorry about that and we have some information coming from the drive as well okay and over on the right hand side here this slide I give some information in regards to what each one of these pzd words are defined as and for motion control we have two status words instead of one status word in addition we have two status words related to positioning functions we have a velocity override we have a target position a velocity accel and decel coming back from the drive again we have for status words two of which are related to positioning functions we have excist is actual position and then we have actual speed again the same philosophy holds true here is we got some information going to the drive which B would be equivalent to digital outputs in the plc and we have information coming from the drive which would be equivalent to digital inputs to a PLC moving to the next slide again we have the structure of the status word and are a control word on the left and we have the status word on the right just to give you an example of some of the bits that are possible and some of the information that's possible if I scroll back to the t52 telegram notice that there are some extra the status and control words are a little bit different and now they're in structured the top part is pretty much the same you know we have our on/off one and bit zero and we have our off two or off three which are basically stops from that point on and if we go to the t11 slides we have pretty much the same thing but now since we're dealing with positioning we have our a pause activation and intermediate stop commands from that point on versus on a regular speed control drive we have just ramped control functions okay so there's a little bit of difference between the t 352 status and control words versus the T 11 so what blocks are available from Siemens and see any sales that could help us do our t 352 or t 111 control tasks well in step seven classic they have a FB 60 and it's geared towards T 352 applications and there's also an FB 341 11 motion control applications s 70 I a portal which is the new version of step 7 they commonly call it V 11 as well Siemens has come out with a drive library version 1.1 and version 1.1 supports telegram one which is a very simple version of T 352 they also support T 20 T 350 T 352 and T 111 and the supported drives are G 120mm for s 120 and I forgot to put one more here which will be the s 110 drives also supported and Ti portal is V in V 11 we converted over FB 300 from step seven classic 2t i-a portal we've tested that as well and we're in the process of converting over FB 60 over into TI a portal as well but the equivalent of FB 60 in s7 classic already exists in the drive library V 1.1 in step seven TI a portal v11 okay so the next thing I want to do is go and show you first of all how telegram 352 is implemented in step seven classic and what I'm going to do is I'm going to drag over my virtual machine and I'm going to open up somatic manager and Instamatic manager what I've done is I've developed a project I've called it 3:52 I've inserted in the somatic 300 station my somatic 300 happens to be a 3:17 F dash 2p and DP will be working with profibus today but the concepts especially the soccer block FB 60 that we're going to be seen here can be used for prophy net and profibus in fact if you switch from profibus to prophy net the only thing that you'd have to switch over is you'd have to switch the device over from PROFIBUS to prophy net in your hardware configuration so basically I have in my box folder I have o b1 which is my cyclic block that is actually calling my drive control block and if I had more drives to control I would probably make more FCS to control those for each individual Drive then what I have inside FC one is some logic and part of that logic is a call to my FB 60 and I'm using instance DB DB 1 if I had more than one drive I would call FB 60 again but I would use a different instance DB as we can see on our drive a block we have a drive address and what I need to do there before I really start any logic programming is I need to configure the drive in hard work and fig and I also need to set some things up and drive starter we won't concentrate too much on starter today and just want to concentrate more on the s7 PLC side but basically what I've done inside a hardware config is I went to since I'm using drives es I go to my Hardware catalogue and I expand my Cinemax library and I find the sin AMEX g1 20 and right now I'm using the Cu - 40 - 2 DP F and the F stands for the F means that it has some safety integrated built into it so if you have an application using safe torque off for safety limited speed for example and you may want to purchase a control unit with the eff safety integrated in it so basically what I've done is I've dragged and dropped my drive object over onto my PROFIBUS Network I've double clicked on it to assign it a address of PROFIBUS address and I've signed it to my profibus network already the next thing I have to do is I have to go and assign it in the configuration I have to go and assign it a telegram type so I double click on the drive object on my PROFIBUS Network I get a properties window attached to it or not attached but that pops up I go to the configuration tab and I select telegram 352 and here we can again see how many different telegrams are available and again the only difference between these telegrams is the amount of words going back and forth to the drive and then also the structure of that words going to and from the drive so in this case I've selected because I want to have a fault and warning message coming back over from the drive I've selected telegram 352 and it has six words in and six words out if I have Profis safe I can go ahead and select prophy but the Profi safe telegram that I want to assign and once I've done all that I hit OK and over here and my hardware config we can see that it's assigned an input address in an output address and if we're working with FB 60 we want to make sure that these starting addresses are the same if they're not when we configure the drive we can come in here and we can change the starting addresses if we want to okay by default the I believe the GSD tries to assign them to automatically to the same starting address for input and output but you may want to check that in your application before you go further the next thing I'd want to do is I'd want to open up my drive starter which is the configuration software and I happen to have drives es installed on my computer so I can actually start drives yes or starter I'm sorry drive starter from my hardware configuration so now I've got drives es open and I would configure my drive again we're not going to get into that today but one of the configurations that we need to do is we need to go to the communications section go to the profibus interface and we need to set up what telegram we're going to use also for communications back and forth to the drive for some reason that send and receive direction got messed up but basically we need to set up our message frame configuration and here we have it set up for 352 and then also in the transmitted direction we've set it up for 352 in the other direction you need to make sure that received direction and transmitted direct direction you have the same telegram assigned okay so once we get our drive setup and we've downloaded the configuration to the drive we're ready to go back to our chakra part of it and configure that so remember back in the hardware config we've assigned the drive starts at address 260 both on the input and output side so we can then come to our block and parameterize our block with the drive address 260 and what I've done here in this application is I've only parameterised the minimum that we need to get this drive going so the minimum commands to get this drive going out of the box so to speak is our on off command some people call that our drive enable I'd like to have a fault reset command and then our I've actually parameterised the setpoint invert for reversing the drive and then I've also parameterised a speed reference and this particular block has a scaling function built into it okay so you can feed a real-world value for example I have 100 point 0 set up for my scaling max so basically I'm going to feed a percentage in here into the speed reference instead of a raw number okay this particular application I've also set up a torque limit on the output side I don't have the parameter as parameter eyes anything but in order to see what these values are I need to parameterize them or give assign them to a register so for example I decide I want to see this feed actual scaled so I've I saw I've assigned that to a memory double word and I want to see the status of my drive as well especially if there's a fault present drive fault active and if there's an e-stop that's been initiated as well in addition to that I can come down here and I've since this telegram 352 spits out current drive torque or actual torque and warning I'm assigned memory double words are actually temp words to these values as well one key thing to remember is the drive current and drive torque I have to scale that because it's coming out of the drive as a raw value from 0 to 16,000 384 so what I've done is I've written a little bit of statement list this can be done in ladder logic as well but it was easier for me to do it in statement list and basically I've scaled that and I've spit the drive current into a register md3 12 and I've spit scaled the actual torque and I put that into mp3 16 ok and by the way if you guys need these sample applications we'd be happy to afford these to you just contact one of our specialists or one of your local sales guys and we'll get this information to you on the top part of the drive I would assign for example I have this assigned to a push button on my PLC and then I go to the command which feeds to the block itself so basically I have the drive one push button on and also the drive fault assigned to push buttons on my PLC digital inputs and then I want to see if the drive is running on a output or our lamp so I've assigned that to an output okay so really there's no difference than what you've done before if you've used digital inputs and then analog inputs and digital outputs and analog outputs there's really no difference except that you have a block to take care of some of the work for you well Scott what's inside of this block well what's inside this block and what we'll do is we'll open it up and show you its that basically it takes care of the communication interface for you so at the very beginning of the block we have and if you've worked with PROFIBUS or prophy net before we have ADP read dot which basically brings all those status bits in words from the drive and puts it into a data block for us and then all we have is just loud and logic inside of here mapping from the input parameters to a bit in the data block for our controls and then for our status we have the same thing we map from the data block to outputs our output interface on the block so that's all we're doing here inside the block and when we get to the very end we take our we actually scale our speed setpoint here and then we basically spit all that information out to using SSC 15 we spit all that information out to the drive using SSC 15 so SSC 14 is used to read all that information from the drive put it in a data block and then SFC 15 is used to take that information all the control bits in words from our data block or from our input interface on the block and put it into the drive okay so that's basically all these blocks are even the drive library blocks in D 11 FB 300 is the same way if we look inside of it we get the same SFC 14 at the top we get our mapping in between with ladder logic and at at the very end we ship all that information out to the drive as control words to control the drive and the word that is commonly used in in our world is they call this a wrapper okay so I'll get out of this block and go back now what I want to do is I actually have a VAT table set up to control this drive and we can monitor both the VAT table and we can monitor online what the block is doing so I'm going to go on line with my drive and then I'm going to come in with my back table and I'm gonna hit a push button and it's going to turn my drive on maybe in the background you can hear the drive fan going and then in my VAT table I actually have an actual speed feedback and if I want to go to a hundred percent on the drive I'll just type in 100 point zero normally I'd probably have this either coming the speed reference coming from a drive or I would actually have it set to a static value on the block itself I'm going to go ahead and write that value to the drive and we can see our speed feedback increasing to match what our setpoint is also what we have down here is our motor current which is about 0.6 amps and then our actual torque is 0.4 Newton meters I actually have a little bit of a break on this drive so us and I won't try to trip it out maybe I'll try to trip it out here but I'll put the brake on and as we can see that the current and the torque went up you may not have been able to see that online but the current and the torque when and actually it faulted out the drive so I have a button assigned to acknowledge the fault and I'll just give it give you the status here of the drive and when I hit that button to acknowledge the fault we can see that bit goes high and I reset that bit my faults reset and I can turn the drive on again we can see the bits we can see my actual speed up here and we can see the bits changed along the side all right FB 111 is not much different and I'll open that project up next I don't have it open already so I'll go to file open and I have the same sort of setup here where if I go in to open up my hardware configuration I have my drive on PROFIBUS this time I'm grabbing from a different drive since it's an S 110 drive so I go over here to my drive objects go here to the cynics s 110 drives and I drag and drop that onto my profibus Network if I were using prophy net I would actually come over here to my library and I wouldn't pick things from underneath the PROFIBUS VP I would pick the objects from underneath the Profi net IO and I would come underneath drives sign AMEX dynamics s 110 and drag and drop my drive over to the Profi net network over here again we see that I've assigned a starting address to my drive ones actually for the control unit once for the drive itself here we see we've assigned message frame 111 here if I double click on the setup itself I can look at the configuration and see that I'm set up for telegram 390 for information from the control unit and then telegram 111 I'll go to my logic now again I have an FC 101 set up for my first drive and again I have FB 300 called I point to the drive starting address for telegram 111 and I have some bits on the input side of the drive as well that I have to parameterize again we have a drive enable I have my fault reset since this is a motion control application I have a activate move a velocity setpoint I can determine if I have a absolute or relative move I have a speed setpoint and I have a target position then I have a acceleration or deceleration in the PLC and I've actually parameterised all these within bits if I had a second servo that I wanted to control I could still use FB 300 again I would use a different instance DB and then I would also use different registers on the input and output parameters okay again if I look inside of FB 300 again I have good ol SFC 14 and I have ladder logic mapping from the instance data block for the status to the outputs of the block itself and if I go down further I have more I have mapping from the inputs to the block to control bits into the drive and at the very end I go to SFC 15 and I can see that all my data is getting pushed out to the drive via SFC 15 okay so that's a quick demo if I actually open up V 11 and I'm going to move a cable here I have pretty much the same thing for telegram 352 if you're a V 11 user so first of all I need to stop my drive and I have an f7 1200 set up to control the drive and if you're already not familiar with the s7 1200 it's a little small brick PLC that Siemens has come out in the last three years ago so it has prophy net and PROFIBUS master capability so you can do very small projects with this little PLC and what I have is I have a project set up for V 11 to control the drive over telegram 352 same thing here I put in the drive address and I've used the minimum amount of parameters that I need to to get this drive up in money so I've again used the enable or drive on/off I've got a fault acknowledge and the only other thing that I have here is MW 102 assigned to my speed reference and of course in order to see the status of the drive I parameterize some outputs and assign those to some M registers in the s7 1200 so if I go online with that and I can see the status and all I've done is I have one drive and I move the cable over from my s7 300 PS C to my my drive or over to the s7 1200 PLC and I'm gonna go ahead and flip the drive on and actually I have a fault on the drive and if I look on the status of my block I see that the drive fault active is true here so what I need to do is trigger the fall technology bit to reset the fault the reason why I got the fault is because I unplugged the drive from the communication interface that it was originally attached to and reattached it to the s7 1200 so the drive faulted so now I hit the drive fault acknowledge and my fault reset basically my drive now is ready to go drive is ready so I go ahead and trip the other input to start the drive and I have the same thing I'm turning the drive and I can see my speed feedback I think it's I don't have that parameterize but if I did I would actually see that actually I do I have my drive see my speed feedback at MW 106 I'll just go to a watch table and show all tags and actually I have a watch table set up my did half watch table 1 and if I go online with it and I can take in md 306 and i should actually be able to see the actual speed coming back i don't think it was MV 306 let me go back to the drive it's MW 306 so that's probably why I'm not seeing anything so I go back there and I can go to my watch table and actually look at it I should be able to look at it in W 306 I think it was 106 106 and now we can see the speed feedback I'll just change it to a decimal sign and I'll just go ahead and turn the drive off and we can see the drive speed feedback turn off okay so now it's down to zero okay I did some of the same things to set up the hardware in v11 as in step 7 it's a little bit different in step 7 v 11 but basically I have a network and I have a hardware catalog over on the right-hand side very similar to the classic I went into field devices are actually other field devices PROFIBUS DP drives Siemens AG and sine Amex you know expand this just a little bit and I wouldn't found the drive that I was using and it happened to be this one right here and I drag and drop that over to my my editor and then I used just dragged and dropped and connected from my PROFIBUS master module on my s7 1200 over to my drive and that made the connection and now I have to parameterize my drive so I double click on it and I'll decrease the view so we can see everything here and the only other thing that I needed to do is I come over here and I have a list of telegrams that I'm have available for that drag drive and I've dragged and dropped that over to my table here and assigned it to an address and the only other thing I need to do is since V 11 doesn't have a similar product to drive zs in step seven classic I actually need to have stand-alone starter to go and parameterize my drive and I parameterize it the same as if I were using step seven classics so there's no difference there so really it's pretty easy to set up and you just find your drive object in the hardware catalog and then once you've got your drive object in the in the editor window you connect it up to the PLC and then you select what telegram you're going to be using and you save your project and download to the drive or download to the PLC so that's pretty it's a very simple process but it helps to understand the underlying technology behind prophy safe and PROFIBUS I'll go ahead and start this slide up again and some of the resources are that are available to use of course I'll be happy to provide you the v11 example and also the step 7 classic examples but siemens also on their website has available some application notes and we can certainly forward you these links as well there's no password or no special support agreement to get online with the Siemens website but basically what we see here is the CMAs support site I've went to applications and tools and along the left-hand side we have our different topics and I have I'm interested in drive technology and that pulls up all the application notes related to drives down at the bottom we have several different pages in fact 14 pages of different application notes and they're all organized according to date so the most recent release of the dates are at the very beginning on page 1 page 2 has some interesting application notes so if we go to the application notes I go to connecting ceramics G 120 Drive via prophy net or PROFIBUS using step 7 v 5 or classic then I have another application note for step 7 v 11 if I double click on that to open it up I can see I have a little bit of a blurb here explaining the topology and then also down below here I have some documentation in a PDF form that I can download and I also have some code either for profibus or prophy net that I can download as well alright so there's lots of tools available for you to get started and take a look usually and I'm going to open up the Profi net version of this piece F file usually what Siemens does is they kind of give you a step-by-step instruction course it's geared towards specific hardware but to give you an idea what you need to do to configure your drive and configure your plc they give you usually step-by-step instructions on what you have to do in the software I'm going to hopefully this angle upload and we can see it apparently not it's not uploading but basically if you go to the Siemens website and upload that you'll be able to you'll be able to see how they configured the drive in their application example and again they have a step 7 project which you is archived and you can retrieve that and open it up and in some cases you might be able to even actually use that ok so now what I'm going to do is I'm going to if anybody has any questions I'm going to stand through the attendee list if you want to raise your hand go ahead and do so and all on mute you and you can ask your question or if you don't want to ask your question in this forum you can actually email us to I'll show a slide here let's see a slide show I'll show the slide here with our comm contact information here you can actually email us or call us and we'll be happy to answer your questions if you want to see a detailed demo of either the motion control or the simple drive speed control we'll be happy to do that as well and we can visit your location and go over that and find detail with you if you want again this is uh I don't see any questions that concludes webinar for today like I said if you have any questions I'll leave this slide up for about 15 minutes and you can copy down our contact info and go ahead and email us or call us and we'll be happy to answer any questions that you have thank you for attending again my slide switched on me thank you for attending and have you looks like I do have one question here Floyd I'll go ahead and unmute you go ahead oh yeah when you work everyone means just seven PLC's and I have unfortunately somehow I'm Bradley has an impact I have some bus adapters for them so your standard block I'm gonna work because the telegrams will have the data in the wrong place and some cases the wrong data in the wrong place or even impact drives that I can just work to redo them yeah I am not aware of any blocks for Allen Bradley drives at least in I don't have any libraries for the Allen Bradley drives the only libraries that I have are for Siemens I'm sure they may be out there somewhere that somebody's done but I don't have any kind I could check with my other colleagues to see if they know of any Brad Hart and Jeff Weaver but I personally don't know of any and I don't have any to search online and see if somebody the concept is really subtle yeah the concept is really similar you would still use SFC 14 and 15 I'll see if I can go back to my virtual machine here no you can you can actually just map the it'll probably show up in your hardware config and this hardware configures actually a decent example it'll show up in kind of the analog range and so what you would need to do is use move blocks to map from the PIAA b to a memory word or a word or byte in the data block okay that's why the way I've done it in the past you know and I think I might have an example of that but then of course the mappings gonna be up to whatever the allen-bradley drive supports now I said that I don't have any blocks that do this from allen-bradley drives but I've seen it before and the mapping from a Siemens drive to an allen bradley are very similar you'd be actually be shocked so you may not write out say again wanted to say something yeah okay similar I just wanted to save some work yeah yep yep I understand that but the mapping from what I've seen at a customer is very very similar and you might be able to use you know the blocks or at least you know we can send them to you so you can get an idea of how how it's set up and then you might be able to use some of it not all of it but some of it so yeah just uh I'll post my email address here and you can send me an email s Henry at CD sales comm and I'll be more than happy to send it to you thank you alright let me scan here for any other attendees that have any questions and I not see any other attendees with their hands up so what I'll do is I'll go ahead and conclude this webinar and again I'll keep my contact information posted as well as the contact information for our automation in Drive specialist our other automation and drive specialists and feel free to contact them if you have any questions and like I said if you want us to come out and give a demonstration then we can do that thank you and have a good day you