Allen Bradley Panelview 800. Reading and Writing Analog Values to HMI

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi this is tim today we're going to continue building out our hmi program adding some analog values for us to read and write to please take a moment to like this video and subscribe to our channel we put out at least one automation video a week and any questions that come up feel free to put them in the comments especially with this hmi series if there's a specific topic you think we should cover be sure to ask it several of the videos out of this have come from comments we've gotten back already in this video we are using our plc trainer with the hmi option and in our previous video we made this real basic screen that has a start and stop button on it and when we press the start button the motor starts and we press the stop button the motor stops so going back to our program that kind of has all of our end goals on it the next thing that we're going to want to add is this analog gauge that is going to show the speed of our drive and also we're going to pull the bus voltage the motor voltage and the motor amps out of the drive so we're going to open up our tool box and scroll down and we're going to find the analog gauge and so we're going to drag it over and there's tons of formatting you can do on this and again i don't want to get too far into how you should make an hmi display but in this case this seems very abrupt to me for something that's really just indicating a speed i mean i think yeah start that kind of needs to be clear stop that ought to be clear but here we're just kind of indicating something it doesn't need to be quite so bold so if we click on it and then click on the properties on the right side we have lots of options for it and the first thing i'm going to do is i want to change this background color and i want to change it to the same background that we're using on the rest of it and if i go down here to my recent colors i can just click there and there already that that looks a little more appealing to me but then we still have this raised border and i'm just not a fan of that so i'm going to go back to properties and here we have a border style now i'm going to click it and i'm going to select none and there i think that just looks a little more pleasing so we're going to drag it down let's make it a little larger and now just like with our start and stop we need to assign a tag to it so we're gonna go over to our tags and we're gonna add a new one and let's call this actual speed and this is going to be a data type of real and the address in our plc is also going to be actual speed and that will be to plc1 now if we go back over to our screen and we double click on our gauge we're going to see this read tag here and so our read tag is going to be actual speed and we're going to leave this at minimum value of 0 to maximum value of 100 that will be 0 to 100 percent and then already i realized that even on my master program here that we're following well i guess it is kind of clear because we'll have this right beside of it but it's not it's not perfectly clear what this gauge is at least right now it's not so for now let's add some text to this so let's go back to our tool box and let's find text and let's just drag that text over and we're going to call this speed okay now again i think that's a little abrupt because really we just want a nice little label for this so i'm going to click on properties of this and i'm going to change the background color to our background and then again i am going to remove this border there so now we can move that right up and there see and i want this up pretty close now if you notice if i move it up though it's really blocking it really bad and the issue is this box is way too big for my text size if i mouse over that top square there i can click it and i can make the speed smaller whoops went way too far so bring it up a little bit just until there again now it shows now i can bring it right up into there and i can indicate what it is i think that looks pretty nice so now we want to add this bus voltage the motor voltage and the motor amps that way we've got a few other things to read here so we're going to go back over to ours first let's create some tags for these so we'll add and this one is going to be our bus voltage and it will also be a real and the address in our plc is also bus voltage and that'll be to our plc and we're going to add another one and this will be motor voltage and it's going to be a real and also it's tagging the plc will be motor voltage and finally we will configure one more called motor amps and it'll be a real and its tag is motor amps okay now we'll go back to our screen and open our toolbox and we're going to drag another text field down now in this case we just made some static text but if you notice in this editor we have the option to actually put in the current date the time a number or a string so what i'm going to put is bus space and then i'm going to click number and i'm going to put in our bus voltage and then we need to select the number of digits now the number of digits is how many numbers do you want and that includes before and after the decimal place so in this case our bus voltage is going to be somewhere in the range of 300 volts and i want one decimal on the end of that and so in that case i want four digits and then decimal places it's i want one and then you could have it filled with spaces zeros or in my case i want no fill so now it's going to say bus and it'll have a space and then it's going to have the value of the bus voltage and to finish it off i want to put some units there so i'm going to put space vdc so that'll say bus space the value of the voltage space vdc at the end all right so first you see it ended up a double line because i'm way too narrow so i want to drag that out because i want it on a single line and then i i don't like this abruptness i want it to not i want it to blend in you know and just kind of be a nice value that you can look at so i'm going to click my properties and i'm going to go up to my background color and select that and then i'm going to remove the line style also you know i'm changing the background color you actually could go up here to fill style and you could put it on transparent that would be another way to do it it would do the exact same thing okay so there's our bus voltage now one other thing i see also is this defaults to center but i want these all lined up on the left so we're going to go back to properties and let's find the alignment and we're going to change this alignment from center and you see we have actually nine options i want it middle left so that's where we're going to put this up so that looks pretty nice now i'm going to copy and paste this so we can either right click or we can hit ctrl c and then we can either right click again or we can hit control v and that's going to bring a second copy of that down you see you have really free reign of where you want to put this but it's really hard to get these two lined up so in some cases you can right click and we're going to show grid and now i can move this and it's kind of jumpy and what that's going to let me do is move these really close and line them up nicely so i like that right there so now we're going to open this one up the second one and we want to change its tag here because right now it says bus and then the voltage value of the bus and vdc well now well first this is actually the motor so motor and then we want to change this tag from bus voltage to motor voltage and again i think probably four digits with one decimal place will be pretty nice on that and but this is going to be the ac because our motor voltage is ac volts all right now we're going to copy and paste that one more time and we're going to drag that and we want it so it's lined up with the other two here and we'll double click it and i'm going to keep that as motor but now i want amps and then this doesn't pull that many amps so i think i'm good with two digits and i'm going to keep it as one decimal place oh and i get a flashing thing number of digits must be at least two greater than the decimal places i'm not sure why i'll have to look that up later but okay this is going to have to be three apparently so here we go and okay this is not vac this is going to be amps so let's go ahead and see what this does so let's download our program which we're going to do by right-clicking and then download and then let me show you a few things that i did add to our user-defined function block program to make this work so if i open up my micro 820 program then over here i moved the power flux bus voltage to the tag bus voltage then i moved the power flux output voltage to motor voltage and finally i moved the power flux output current to the motor amps okay so there we go we have bus voltage and yeah our bus voltage is already showing 334 volts and then we have amps and volts so let's hit the start button okay and yeah our gauge is going up saying that we're speeding up we're getting motor volts and we're getting some motor amps all right stop button there we go all right so that worked pretty good now let's talk about how we can control our motor speed and first we're going to need a tag for that so we're going to go to tag and we're going to add a tag called speed command and that's going to be a real and we're going to use speed command as our plc tag name then we're going to go to the screen and our tool box and we haven't really talked about the organization of this first we have entry and that means things that can write something to a tag and then we have drawing tools and then we have basic displays and then we have some more advanced features down here but so under display we do have numeric display which would display our commanded speed but that's not going to let you write to it so if you want to be able to write to something you need to use these entry ones up here and so up here we have numeric entry so we're going to bring that over and then we'll go to properties of that and if we look down here we have a right tag and our right tag is going to be the speed command i'm going to bring that in a little closer here that looks pretty good go to properties if we scroll up here one here's our background color and actually i'm going to make this 1d4288 now why am i doing that it's just because it's one of the tw controls colors and i'm going to make our border color the same color there we go now let's download this and see what it does okay so now we do have a button here but it doesn't really tell us anything and if we touch it it just all looks like zero and the issue is that the right tag in the read tag can actually be two different things and there are sometimes you may want to do that but in our case we want them to be the same so if we click back on our button here and we go back to properties then we had the right tag a speed command we also need this indicator tag here of speed command and what that's going to do is it's going to make it display and be able to write to the same tag so let's download that and now you see it says 100 here let's talk about how we're dealing with this commanded speed because again all of our tags in our user defined function program were local tags so if we go over here to our micro 820 program then what i have done here is i've used a scalar instruction and i have that speed command which is our global variable and 0 to 100 min and max on it is going to be 0 to 60 which is 0 to 60 hertz and we're outputting that to the power flex speed reference that we're using the function block also while we're right here we're also getting the speed feedback i don't think i talked about that earlier we had actual speed here and that is the power flex speed feedback and i've done the opposite so the scalar on it is 0 to 60 is our min and max and our output is 0 to 100 and we've done videos on the scalar before so check out the whole series if you need help on those but so now in addition to being able to write to it it says right now we're 100 so if we hit our start button and again apologize the fan does pick up bad on the mic yeah our gauge is running up certainly looks like it's heading towards 100 all right so let's say we want to drop that to 50. all right it looks like it's settling in right at 50 but okay if you notice we can only enter whole numbers here in other words if i want to put 50.2 notice it puts 502 there was no decimal so let's talk about how we can change that and make a decimal so let's click on our numeric entry and go to properties and then right here it says decimal point fixed position and what we want to do is we want to change that to keypad control and now let's download that and see how it works differently so now it says 50 but if i touch it now i can enter 50.2 enter and we're going to be able to put decimals in so that gets us where we can enter a value but we could also do some other things let's say that we wanted it where somebody could just hit a button to increase the speed and hit another button to decrease the speed for that we're going to use the same type of buttons we used here for the start stop so let's go to our tool box and we're going to drag down a momentary button and then actually i jumped ahead of myself first we need to create a couple tags for it so let's open up our tags and add and we're going to make a tag called increase speed and that'll be a real increase speed that's interesting i think i forgot to put in the plc1 but it was working we may have to jump back to that later but that should have been plc one i'm not sure maybe i just deleted that i want to look at the video afterwards but yeah all these should say plc1 intel so we'll add another one and this tag will be decrease speed and it's a real and the tag in the plc will be decrease speed now all these have been matching up in this video but you can remember from the previous video the tag name in the hmi doesn't have to actually match the tag name in the plc but in these i did make it the same just just to make it a little easier on us oh but i did make a mistake there increase speed that should be a boolean just the same as the start button and the stop button and our decrease speed should be boolean because those are on or off there are ones or zeros so now let's go to our screen and click on our button and okay one if we double click on our numeric entry it doesn't do anything but if we double click on this the same as our start stop it does give us options for the various states of this so first i want to change my background color and i'm just going to use that same color that i used on our speed command and i'm going to also change it it'll be the same thing when it's pressed and our text on this one is going to be increase and our text again it'll still be increased now you could have it where when you press the button it says something different i'm not going to do that in this case all right now see we have a problem here though our field isn't wide enough so let's just bring that out so that one's wide enough now and we'll bring out our speed command to match it so now let's copy oh we didn't we didn't actually assign it a tag so let's go to properties and then right here we have a write tag and our right tag is going to be increase speed and then let's copy and paste that and this one let's make decrease speed and it is going to be a tag of oops a little crazy decrease speed so we're going to download this then let me show you what we did in our micro 820 program to make this work so we go to our program here then right here i have these one shots for fro that are mapped to the increase speed and the decrease speed and so the increase speed takes our speed command and adds one to it now i can make it a tenth if i wanted but i just chose one and it adds it right to that speed command and same the decrease speed subtracts one from our speed command and puts it right in the speed command and then i do a check here at the end because obviously we want to end up at 0 to 100 percent so if our speed command becomes less than zero we're going to put zero into the speed command that way because if we're at zero and i hit the decrease button it's gonna make it minus one well we don't want that so it just makes a limit where it puts it back at zero and it's same with our increase if we're at 100 and we increase it by one it'd be 101 and i just move 100 back to it then and i just move 100 back to it so now let's see what this does sorry we're showing 50.2 and we're going to hit the start button all right and yeah we're showing 50 and all right if i hit the increase button we can hear the motor speeding up and we can see our gauge here going up and there we go we can hit the down and that's going to show it going back down okay and so that takes us through how to read and write analog values to an hmi and show a little gauge of them and you know how to manipulate them either through data entry or we can use simple buttons to increase and decrease speed so in our next video i'm thinking that we'll probably hit the graphing next because you know we've sit here and we can run it up and down well we can also show a history of what the speed or whatever analog value what it's been so that's going to be in the next videos we're going to set up this graph here so i hope this video has been helpful please hit that like button and subscribe to our channel till next time hi this is tim and this is amber of tw controls we run the automation store hey thanks for funding our channel here's a playlist with some similar videos and youtube thinks you'll like this video please like our video and subscribe to our channel and if our videos have helped you make some money and you're not using our products please consider supporting us on patreon until next time see ya
Info
Channel: Tim Wilborne
Views: 5,046
Rating: undefined out of 5
Keywords: panelview analog, panelview 800 lessons, hmi, Tim Wilborne, connected components workbench, panelview 800, rockwell automation, panelview 800 graphic terminals, panelview, panelview 800 hmi, Reading and Writing Analog Values to an Allen Bradley Panelview 800 HMI Touchscreen, Allen bradley
Id: DNfw6AX23Zs
Channel Id: undefined
Length: 23min 10sec (1390 seconds)
Published: Wed Feb 17 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.