https://www.automationdirect.com/dl06 (VID-DL-0009)
Directlogic06 PID Overview Demonstrating a working PID loop using a DL06 & DirectSOFT5
Check out all of our videos at https://www.AutomationDirect.com/Videos
To subscribe: https://www.youtube.com/user/automationdirect?sub_confirmation=1
Facebook: https://www.facebook.com/AutomationDirect
Twitter: https://twitter.com/AutomationDirec
LinkedIn: https://www.linkedin.com/company/automationdirect
**Prices were valid at the time the video was released and are subject to change.
this is a PID overview demonstrating a working PID loop using ad lo6 indirect soft we're using the f0 to ad - da - - voltage input and output analog module to send and receive signals from a custom PID application and this is in slot one of the diello six plc next we'll set up the PID loop index off go to the plc menu setup and then PID and you will see the window pop-up set up PID it has a number of loops you've configured and the first tab on any particular loop is the document 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 the sample rate the default is the fastest rate at 50 milliseconds you can make the rate higher but not lower next is the forward acting vs. reverse acting loop forward acting 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 how it causes the pv value to go lower that's a reverse acting loop next is the transfer mode bump let's transfer one or bump let's transfer to where the selections when the PID loop goes from manual to automatic both modes copy the output value to the biased value so they are equal when the loop goes from manual to auto pumpless transfer one also makes the setpoint equal to the pv value at the moment of manual to auto transition so if you don't want the loop to change your set point value pick bum plus two but bum plus one provides the motor the smoothest transition because since the set point in pv are equal and the output and bias are equaled 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 SPP V and output format if you pick common means at the input and output resolutions are the same if they are different you would pick independent format if you pick common format then you said the information for both input and output on the same location unipolar data or bipolar and twelve fifteen or sixteen bit lastly the loop mode independent of CPU mode this is normally not used if you have a PID 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 SPP V tab the address and/or nickname is supplied for the setpoint 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 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 Auto transferring you can transfer them from an i/o module directly or view memory in most cases a simple single rung ladder logic run 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 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 we used we set that up in the configure tab notice here we have a lower limit of 14 33 this is because our PID process that we're using to demonstrate with any value below 14 33 on the output causes the fans 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 of valium then on the tuning tab we have some order some values that we've come up with the gain which is proportional reset which is integral which is in seconds or minute units we have a freeze bias option which is our anti wind-up 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 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 soap table if you're not using alarms or Ram soap then don't you don't fill out those pages now I'll go over the ladder logic code rung one covers our standard disclaimer rung two sets up the analog card f0 to a D - da - 2 we start with the first cam bit we go to load 2 input into output BCD channels the analog input register starts at V 2000 the analog output register starts at V 2002 the next three rungs three four and five determine whether you use a first-order filter with the PV value or not rung three checks to make sure the PV filter value is not 0 if it is it makes it one point zero rung number four if C 1000 is off we do not want to use the first-order filter in that case we load the first analog input channel at V 2000 we convert it to a binary value and then I'll put it into V four thousand and three the PID PV location if C 1000 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 than 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 for the next iteration in V 1400 turn that real number back into binary and then output it through the PID PV location at four thousand and three wrong number six loads the PID output value and moves it to the analog output value with an SP one always on contact it loads V 4005 converts the binary to a BCD value and outputs that to V 2002 rung 7 8 & 9 allow the change of the PID mo between automatic and manual using the c0 bit if zc0 goes from off to on or if the first scan bit fires that requests automatic mode on the PID by setting V 4000 dot 1 since the first scan bit can trigger 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 PID state at the start of the ladder logic skin and rung 9 does the opposite if c0 goes from on to off that sets B 4,000 dot 0 which request manual mode rung number 10 sets up the PID table so that if you trigger an auto-tuned straight from the auto tune enable bit it is already set up for closed loop tuning and PID tuning the last four rungs 11 12 13 and 14 make a very basic high-low pv value capture the 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 0 in the high register and then resetting c2 this also happens on a first scan bit wrong 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 value and put it in the pv highest value wrong 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 and output the difference into the PV band now that we've covered the ladder logic code we'll look at a data View window which holds the important controls in this program you could use a c-more to do the very same thing but the data view allows us to do pretty close to the same monitoring and control the first value is V 2000 which is the analog input raw value 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 we're driving with the next value which is V 2002 and this output drives the two fans they blow the other fan it spins and we get a closed loop PID that way both values are quite noisy because that's the raw value with no filtering involved coming straight from into the analog card V 1402 is the filter 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 c 1000 is how we turn the filter on and off if the c 1000 is on we want to use the first-order filter if we turn it off then we just removed the raw pv value from the analog card straight into the PID pv location v four thousand and two four thousand and three and four thousand five are straight from the PID loop four thousand two is the set point value you see it's not changing four thousand and three is the PV value whether that's being moves 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 PID loop c0 is how we control the PID loop from manual and auto if c0 goes from off to on we go from manual to auto mode in the PID 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 ladder logic code V 3000 is the lowest value since the reset was triggered for the high-low capture V 3000 1 is the highest value since the reset was triggered and V 3 3003 thousand and two is the difference between the high and low and the ladder 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 immediately now we'll look at the PID loop itself if you go to view PID view while you're connected to the PLC we'll see the PID View window with its own tab beside that is the latter view if you want to go back and look at the ladder logic but we're going to stay with the PID view for now first thing we want to do is change the size of the graph you could have 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 now we're looking at the graph of the PV and the setpoint value on the top part of the graph and we're changing the seconds per division to be 5 so we get the quickest graph with the most detail possible we also look at the set up and for now we don't have the manual scaling set so it is auto-scaling based on the current high and low values you see 2010 at the bottom of this scale 2080 above it and 2045 is about the center and the values below we can see and change all the values associated with the PID loop to change the value you would highlight it put the new value in and hit the enter key to accept that value if we were doing Auto tuning we would auto tune using the bottom part of that section and then on the left hand side is a face place face plate representation for each PID loop 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 PID setup but we're going to cancel that for now let's set the PID view graph from auto range to manual scaling and we'll set it to zero 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 setpoint the bottom of the top graph is 0 and the top of the top graph is 40 95 now let's change the setpoint to 30 48 and we should see as soon as we accept the PLC change the dark blue line of the setpoint increases in the PV line increases to get to the setpoint you see a little bit of overshoot and then it should fall right in line with the setpoint value on the line and we'll go back and set the set point back to 2048 as soon 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 setpoint 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 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 nut the PV value gets a lot noisier even so we're holding a fairly stable PV value with very little over-and-under at the set point relative to full-scale value if we go back to 30 48 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 setpoint again the 2048 see the drop in PV the more dramatic undershoot and you see the scale changing on the graph and then it comes back to the setpoint and settles down again now we're getting back into a bigger zoom because the range between the minimum of a maximum on the screen is a lot less and keep in mind this is what the first-order filter on if we turn the 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 doubled pretty much doubles as well that's with no filtering just the raw analog 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