To learn more: https://www.automationdirect.com/directlogic-plcs?utm_source=dCca5kxVxEE&utm_medium=VideoTeamDescription
(VID-DL-0009)
DirectLOGIC DL06 PID Overview Demonstrating a working PID loop.
Online Support Page: https://community.automationdirect.com/s/?utm_source=dCca5kxVxEE&utm_medium=VideoTeamDescription
**Please check our website for our most up-to-date product pricing and availability.
this is a p overview demonstrating a working PID Loop using a D6 and direct soft we're using the F0 2 A2 da-2 voltage input and output analog module to send and receive signals from a custom PID application and this is in slot one of the D6 PLC next we'll set up the P Loop in directs off go to the PLC menu setup and then P ID and you will see the window pop up setup P ID it has the number of Loops you've configured and the first tab on any particular Loop is the docu documentation tab the configure tab is the next tab you specify first of all the algorithm either position or velocity 99% of our Loops are position Loops if you don't know which one to pick pick position next is a sample rate the default is the fastest rate at 50 milliseconds you can make the rate higher but not lower next is the Ford acting versus reverse acting Loop forward acting uh the best way to describe this is if the output goes from minimum to maximum does the PV value go from go higher or lower if it goes higher when the output goes higher then that's a forward acting Loop or if the output going higher causes the PV value to go lower that's a reverse acting Loop next is the transfer mode uh bumpless transfer one or bumpless transfer two are the selections when the PID Loop goes from manual to automatic both modes copy the output value to the bias value so they're equal when the loop goes from manual to Auto bumpless transfer one also makes the set point equal to the PV value at the moment of a manual to Auto transition so if you don't want the loop to change your set point value pick bumpless 2 but bump plus one provides the mo the smoothest transition because since the set point in PV are equal and the output in bias are equal theoretically no control action should occur since everything is balanced the next section is setting up for the input and output resolutions of the values the SP PV and output format if you pick common means that the input and output resolutions are the same if they are different uh you would pick independent format if you pick common format then you set the information for both input and output on the same location unipolar data or bipolar and 12 15 or 16 bit lastly the loop mode independent of CPU mode this is normally not used if you have a p Loop that must continue running even if the PLC goes out of run mode even for a fault then you would check this mode and you would have to set up Auto transfer for your output at least and probably your input so that the loop would continue running even though the PLC is not in the Run mode but be aware this is a potential safety hazard on the SPV tab the address Andor nickname is supplied for the SE Point variable and the process variable if you're doing Cascade Loop you would set up the remote set point for Cascade Loop output if you want to do a limiting of the set point value you can check that here and enter the upper and lower limit values be aware that can be problematic because nothing tells you that the PID Loop is limiting the value even though you see that it can't go above or below some specific value the process variable you have the option of autot transferring um you can transfer from an IO module directly or vew memory in most cases a simple single rung ladder logic rung will take care of moving the PV value into the PV location so it's really not needed and there are code examples in the manual to cover the filtering if you want to filter the PV value without using the filter value here there's also the option to square root the process variable uh this allows for a better error handling in some processes but if you don't know that you need it then just don't use it in the output tab you set up the minimum upper limit and lower limit based on the maximum range which was defined by the bit resolution of the output um we used we set that up in the configure tab notice here we have a lower limit of 1433 this is because our PID process that we're using to demonstrate with any value below 1433 on the output causes the fans to stop running so we don't want to shut them down even at minimum so we make sure that they never go below the minimum value then on the tuning tab we have some art some values that we've come up with the gain which is proportional reset which is integral which is in un seconds or minute units we have a freeze bias option which is our anti-windup and should be used unless you know you don't need it and then the rate is our derivative calculation and there are some limits you can add to the rate itself we also have some error uh calculations including a dead band or squaring the error again if you don't know that you need these then don't use them to start with there are also two additional tabs to the right of the tuning tab the alarms and the ramp soak table if you're not using alarms or Ram soak then don't you don't fill out those pages now I'll go over the lad logic code rung one covers our standard disclaimer rung two sets up the analog card f02 A2 da-2 we start with the first scan bit we go to load two input and two output BCD channels the analog input register start at v2000 the analog output register starts at v202 the next three rungs three four and five uh determine whether you use a first order filter with the PV value or not wrong three checks to make sure the PV filter value is not zero if it is it makes it 1.0 run number four if c1000 is off we do not want to use the first order filter in that case we load the first analog input Channel at v2000 we convert it to a binary value and then output it into v403 the P ID PV location if c1000 is on we want to use the first order filter this filter is shown in the analog module manual we load the analog value converted to Binary then to real we subtract the previously saved value we multiply the difference by our filter value we add that back to the previous value and then we output it uh for the next iteration in fe400 turn that real number back into binary and then output it to the PID PV location at 403 rung number six loads the PID output value and moves it to the analog output value with an sp1 always on contact it loads v405 converts the binary to a BCD value and outputs that to v202 rungs 7 8 and N allow the change of the P mode between automatic and manual using the c0 bit if Z c0 goes from off to on or if the first scan bit fires that requests automatic mode on the PID by setting V [Music] 4000.1 since the first scan bit can trigger an a request to go to automatic mode we also make sure on a first scan that we set c0 so that the bit State follows the P State at the start of the lad logic scan and wrong nine does the opposite if c0 goes from on to off that sets B 400.0 which requests manual mode rung number 10 sets up the PID table so that if you trigger an autotune straight from the autotune enable bit it is already set up for Clos Loop tuning and PID tuning the last four rungs 11 12 13 and 14 make a very basic high low PV value capture stored in the PLC wrong 11 is the reset using a C2 bit to load a very high value in the low register and a low value zero in the high register and then resetting C2 this also happens on a first scan bit rung number 12 captures the highest PV value since the last reset if the current PV value is higher than the stored highest value then we load the current PV V value and put it in the PV highest value Rong 13 does the same thing for the low PV value if the current PV value is below the lowest stored value we load the current PV value and output it to the current to the lowest PV value and rung 14 calculates the difference as long as the highest value is equal to or greater than the lowest value we load the highest value subtract the lowest value value and output the difference into the PV band now that we've covered the lad logic code we'll look at a data View Window which holds the important controls in this program uh you could use a Seymour to do the very same thing but the data view allows us to do pretty close to the same uh monitoring and control the first value is v2000 which is the analog input raw value uh we're actually getting this from a fan which provides a 0 to 10 volt output based on the speed and it's being controlled by two other fans that were driving with the next value which is v202 and this output drives the two fans they blow the other fan it spins and we get a closed loop P that way both values are quite noisy because that's the raw value with no filtering involved coming straight from into the analog card v402 is the filter Val value for our first order filter right now we're using a 0.5 which is half of the possible range 0 to 1.0 zero would not allow the PV value to change at all 1.0 would not do any filtering so effective values would be higher than zero and Below 1.0 c1000 is how we turn the filter on and off if the c1000 is on we want to use the first order filter if we turn it off then we just move the raw PV value from the analog card straight into the PID PV location v402 40003 and 405 are straight from the P Lube 40002 is the set point value you see it's not changing 403 is the PV value whether that's being moved directly from the analog card if we're not using the filter or from the first order filter output if we decide to use that filter and the last value is the output going to the analog output channel from the P Loop c0 is how we control the P loop from manual and auto if c0 goes from off to on we go from manual to auto mode in the P ID and if c0 goes from on to off we go from Auto to manual in the PID the last four values are the basic high low capture in the latter logic code v3000 is the lowest value since the reset was triggered for the high low capture v301 is the highest value since the reset was triggered and V3 300 3002 is the difference between the high and low and the latter logic is set up so that if we turn on C2 it resets the high and low values and then turns off C2 so it's ready to go immed immediately now we'll look at the PID Loop itself if you go to view P view while you're connected to the PLC we'll see the P ID view window with its on Tab beside that is the ladder view if you want to go back and look at the ladder logic but we're going to stay with the p view for now first thing we want to do is change the size of the graph you grab the bar below it and just drag it to the position you want if that's not enough you just move it further down or up up now we're looking at the graph of the PV and the um set point value on the top part of the graph and we're changing the seconds per division to be five so we get the quickest graph with the most detail possible we also look at the setup and for now we don't have the manual uh scaling set so it is auto scaling based on the current high and low values you see 20110 at the bottom of the scale 2080 above it and 2045 is about the center and the values below we can see and change all the values uh associated with the PID Loop uh to change a value you would highlight it put the new value in and hit the enter key to accept that value if we were doing autot tuning we would autotune using the bottom part of that section and then on the left hand side is a Face Place face plate representation for each P Loop it has meters for the PV and the output if you double click on it you have the option of going to the program mode so you can go directly to the P setup but we're going to cancel that for now let's set the PID view graph from Auto Range to manual scaling and and we'll set it to 0 minimum 4095 maximum for the full scale of the PV value now we're seeing the PV value in the middle of the scale at 2047 set point uh the bottom of the top graph is zero and the top of the top graph is 4095 now let's change the set point to 3048 and we should see as soon as we accept the PLC change the dark blue line of the set point increases in the PV line increases to get to the set point you see a little bit of overshoot and then it should fall right in line with the set point Val value on the line then we'll go back and set the set point back to 2048 see as we hit enter now the dark blue line goes back to the 2048 value and the PV starts following that you see a little more undershoot than you did overshoot and then it comes back and starts settling on the set point value this looks like a nice smooth line and a smooth graph because we're looking at the full scale of the possible value if I go back back to setup and set this back to Auto scaling it immediately changes the upper and lower limits to include just the values that are on the screen so we get a little rougher looking PV value but it's still the same PV we're just looking at it at a different scale on the graph and as soon as the graph has a lot smaller values to deal with you see the the PV value gets a lot noisier even so we're holding a fairly stable PV value with very little over and under of the set point relative to full scale value if we go back to 3048 we see the scale change immediately we see the overshoot again but it's more dramatic looking because we're seeing less of the scale go back and change the Set Point again to 2048 see the drop in PV the more dramatic undershoot and you see the skill changing on the graph and then it comes back to the set point and settles down again now we're getting back into a bigger Zoom because the range between the minimum and maximum on the screen is a lot less and keep in mind this is with the first order filter on if we turn the for first order filter off so we're not doing any filtering you immediately see the output value doubles in the amount of range and the PV value doubles pretty much doubles as well that's with no filtering just the raw analog Val value coming in if we turn that first order filter back on we immediately see this output settle down and the PV value is less noisy than it was before
Voted #1 mid-sized employer in Atlanta
Check out our
job openings