Michael Lloyd

MrPLC Member
  • Content count

  • Joined

  • Last visited

Community Reputation

64 Excellent


About Michael Lloyd

  • Rank
  • Birthday 06/01/58

Profile Information

  • Gender Male
  • Location Texas
  • Country United States
  • Interests Photography, Long Range Shooting, Reloading, Fishing, Hunting

Recent Profile Visitors

4405 profile views
  1. Advice on choosing a PLC for a project

    I'm not a fan of the CCW software. The hardware seems to be pretty solid. <insert really long rant about how dumb it is to design crap software for good hardware here> Direct Logix used to be 8 bit. I don't know if they ever got past that. I suspect they did. They used to be robust. I've seen them mounted in a box on a 1,100hp compressor skid, visibly vibrating, in a building that had to be over 100 degrees in east TX humidity and they were rock solid. Micrologix 1100 has an ethernet port. Personally I prefer ethernet over serial for connectivity. Have you considered a micro controller and multiplexing the outputs? Something like an Arduino but more robust. The software, generally speaking is free, The learning curve may or may not be steep (but I'll bet there's a ton of code out there that would get your train rolling :) TI has a pretty nice demo board for their micro and it's a beast. Really fast. Fast enough for someone to build an electronic lead screw for their lathe with it: 1st video of the series here.
  2. Learning about MicroLogix 1500

    The hardware is fine. The programming software is pathetic. I’d rather write a SLC, S5, or S7-200 program. Time is money
  3. Tag Data Update

    I wish I had the opportunity to work in your environment when I was younger Joe. I feel like I could have learned something that would help us in the business I'm in. I took his question to mean did the HMI hold the setpoint values if it's power cycled. I don't think it does that since it's writing to the PLC (and reading back for the display) but it's been a while since I actually wrote a Panelview program.
  4. Tag Data Update

    Export your database before you try it. That way you can import it and put it back PLUS all you have to do is insert a row under a tag with the same properties (Boolean, DINT, INT), do a copy paste and change the name. It's just the tag, As far as I know you can't import / export values. Saving the PLC program saves tag edits but if the HMI reboots and you aren't controlling the writes from it it'll overwrite with zeros. The thing I'm most sketchy on is the HMI. It may very well preserve the values.  
  5. Tag Data Update

    Unless something changed in a newer version (I have much higher versions but my most recent experience was with 21) you can't update a tag value with a CSV import. You can add and document tags that way You could make a button on the HMI that when pressed it turns on a bit. In the program (I would use structured text) do something like: If HMI Button true; Tag in PLC := HMI tag value; HMI Button False; End_IF; Otherwise the HMI might come up with zero values and hose up the world I map almost all of my IO and write the program with the UDT defined tags. I can make IO changes easily and the mapping is done in Excel....   
  6. Change P in running PID

    I understand your frustration. I looked back at some of your posts and you clearly have a high level of experience. Onward through the fog we go then... I usually work in situations where there are as few as 6 loops in the FB and as many as 50 or more. It depends on the processes. With that in mind, I typically run the periodic task at 250ms. It's fast enough to not add to dead time and slow enough to prevent a lot of loops from "loading" the processor. That said, the equation "knows" the update time and it doesn't hurt to run a loop faster if the processor isn't pushing the edge of maximum. It'll cut down on dead time to run it faster but that may also be why you need a filter? It's hard to say. You can definitely write to the P_gain, I_gain, and D_gain tag Your idea to vary the gain by where you are in the startup process is spot on. We call that Adaptive Gain. There's a lot of uses for it. For example, in the natural gas processing business we use compression to pull gas from the field and feed the plant (or other facility) at higher pressure. Pulling field pressure down also allows the well to flow at a higher rate. Some places pull into the vacuum range. The compressor(s) have suction control valves on them. If they've been down for maintenance or the control system shut it down the field pressure can rise high enough to cause the flow capability of the suction valve to be much higher. Ie higher delta P causes the loop gain to increased (loop as in controller / valve / and compressor). So, you calculate the Delta P across the valve and use that to dynamically adjust the gain down or up as desired. As the delta P comes down the Gain needs tol increase. Eventually the valve is wide open and no longer on control. The FGEN Function Block is very handy for this. Ideally you would create an X range of Delta P values and try to capture the Gain value for each of those values and put that in the Y range. The FGEN calculates the values between and sends that to the output (for Gain). It's a nice little function generator. Lets talk about P and I. You won't require D. If this gets too far in the weeds, apologies. I just want to cover the bases. P in the PID and PIDE loop is  Gain. A gain of 1 the same as 1/1 or 100% proportional band (the origin of P). A Gain of 2 is 1/2 or 50% proportional band (faster response). Some of us started when all you had was a pneumatic proportional only controller and PB was in %. A really nice pneumatic controller had reset (time in minutes). The Cadillac had derivative and you almost never saw it used. <-- I don't miss those days :)  You should see an improvement in the Manual to Auto jump you're experiencing if you turn on PV Tracking. SP tracks PV in manual when that is on. You've selected Independent vs Dependent. There's nothing wrong with that. I like my Integral units to be in minutes per repeat so I select Dependent. Independent is just 1/x or repeats per minute. Either works. It's just a slightly different equation. If I were going to tune your loop I'd move the Integral value out to 15m or 1/15 in your case. That gets it out of the way. Try to tune the loop with Gain only. Find the Gain value that stabilizes the PV, bump it (move the setpoint a small amount), and watch the response. It should settle out somewhere. It might not track setpoint. No worries, that's what I is for. I is used to correct the offset that occurs due to Gain. The equation see the SP to PV difference and "integrates" a little signal into the CV to bring the SP and PV together when the setpoint and PV don't match. I affects the overall loop gain so it's very important that it isn't too fast. You can find a low gain, like 1 or even .5 (that's very slow) to start with and keep doubling it until the loop is no longer stable. 1 to 2 to 4 to 8. Above 8 I'd go up in 2's. Once it gets unstable, go 1/2 way back (if it's 8 then go to 4). It it stabilizes, go 1/2 of the distance higher, so from 4 to 6, if that oscillates, drop to 5, and so on. Eventually you'll find a good compromise between good response and oscillation.  Once you have Gain set where you like the response you see when you bump the controller (no oscillation, oscillation drives the integral term of the equation nuts. So does noise) start decreasing reset time or increasing the number of repeats per minute (1/t). I usually go "1/2 way back". In the 15m example I'd set back to 7.5m. Bump the controller. No oscillation? another 1/2 in the same direction (3.25). Bump... oscillation.. increase 1/2 way back to 7.5m or (7.5+3.25) / 2 = 5.375. You don't have to be that precise by the way. Gain, Integral, and Derivative (don't need D) interact with one another so you may find that you've decreased the integral time to a point where you need to increase gain. I'd try to leave the gain (sensitivity is a good way to look at gain) where it is and increase time or decrease 1/t ++Autotune actually works pretty good but I think that's a PIDE function. Besides that it's more fun to tune it yourself. Personally I prefer the PIDE loop. I think it's more robust. But it could be that I never liked the PID loop in the SLC and the CLX version reminds me of it.
  7. Change P in running PID

    Ok... then you really don't understand how tuning parameters interact with each other do you. I doubt if Rockwell says that. If they did you were talking to someone that doesn't know how to tune a loop. I've been tuning loops for 40+ years so I have some idea. I'm not in a classroom, I work in running gas processing facilities. I just this morning left a plant of ours where we tuned two loops (the way you're supposed to) with the process online, the loop was running, and we used the HMI to write to the loop tags. Your trend looks like a trend from a closed loop built in a classroom environment. The scaling is 0-100, no units, very simplistic and not at all like real life. If that's what it is it's going to be pretty squirrelly if you kept the default loop setup. If you're still with me - See the stair steps in your CV? That's a pretty clear indication that the integral is set pretty fast. You didn't tell me if you're using a PIDE loop. If it is a PID loop how is it configured? Under the General Configuration Tab, middle right side, you'll see Equation Type. Independent or Dependent. Depending will make the I units min/repeat and the D units minutes.  Independent is the inverse, ie I unites are 1/min (or repeats per min) and D units are also minutes. If the loop has default values here then Equation Type will be Dependent and Integral will = 0. OR 1/0 <--- divide be zero is never good. Switch to Independent and set Integral to 15m (or some large number to get it out the way. ControlLogix has nice trending. Much better than whatever your screenshot is    
  8. Change P in running PID

    What are your I and D settings you can change P, I, and D in the tag.  That’s the best place to make the change.  What PLC?
  9. MAS that does not work anymore

    I can tell you where I’ve had that problem in a completely different instance. It was a Compact Logix PLC and the program was saved to a CF card plugged into a memory slot. The PLC was configured to pull the program from the card on power cycle of the program in the PLC was corrupt or different. You have to write a change back to the card. I eventually pulled out the card and got away from doing that. I’m the guy that programmed it initially. The idea was to correct for PLC faults if I remember right
  10. Micrologix 1400 recording off time of a DI

    You could use the bit (not bit), a timer, and some logic to store the time elapsed value from the timer
  11. Structured Text Value for Pi?

    Is there a built in value (tag) for Pi in structured text or do I just use a constant?
  12. Communicating between plc's with different IP's

    Agreed. You control the system vs IT controlling the router
  13. Communicating between plc's with different IP's

    That makes sense. I've never been a fan of them but if you're already invested, why not. Routers are outside of my skillset but the router, when programmed right, can bridge two different networks (route one to the other). If you have an IT department check with them
  14. Communicating between plc's with different IP's

    Adding a second NIC would work. It probably wouldn't be any more expensive that adding a router and getting that programmed to bridge the two networks. Just curious, why Produced / Consumed instead of using a Message block
  15. ControlLogix PIDE With Time proportional Control

    I'd get rid of the D first and run PI. When you typed "temperature input is not very stable while operating.  A blast of CO2 into the chamber of course drops the temperature quickly which the sensor" the lights in my office flickered "Don't USE DERIVATIVE" in morse code. Derivative is used in systems with a lot of lag time. Like minutes. Lots of minutes Turn Derivative off and start with a Gain of 1. Maybe three minutes in the I term. See attached "rough guide". Set the Equation type to Dependent so I units are min/repeat. Walmart is a very dangerous place to shop. Idk... I think I'd rather tune a controller   Initial Settings For PID Controllers.pdf