PID Loop Update time and external trigger

MAYBE he has got it

Peter

Going to North Seattle Comm Coll -- it is the "North" portion of the Seattle Community College.

Instructors cannot know it all. I believe he does not work with AB SLC 5/05 PID instruction to be familar. Servos, amps etc etc he is a whiz.

I have thought all along that this setup is kind of goofy and the hard way to do it. But my brother who works on Boeing machine tools says this is a common setup. It does have some other apps though ie a potentially explosive gas or dust situation would be a good choice for hydraulics or pneumatics in my mind. Why put electrical there in the first place?? OK OK you gotta do lighting BUT in spray booths they mount the lites outide the glass tops which is a "safe" area.

Anyway the learning on this goofball setup will be harder and I think more valuable than a simple heater setup.

I HAVE READ the responses.
I HAVE DONE SOMETHING
I took all the info I read here and dug out the books and manuals and setup a table using EXCEL for the two input values and one output of the PID. Described them as they "come in", go to PID (as a scaled value using SCP instruct) and how they come out of PID and where they go.

All this stuff is in attd Excel file sheet PID.

ALSO in Excel file is a set of calcs to show me why you cannot use just P to control. I set up hypothetical water heater and made an assumption of heat imput and heat loss to ambient - there are some rough assumptions and it can be argued that my calcs are not in a true time frame but I had to avoid circlular logic error. It has shown me that P alone will not work. There is also a graph of the output and the control showing how the control oscillates - and man -- mine OSCILLATES. That is in sheet P no go.

Many thanks for help

Dan Bentler
 
Just checked to see if Excel file made it all the way. Voila it DID.

Now what I gotta do is find a win zip program that will convert an RSS file to win zip. Tried at work did not work. Tried at school got told it is read only - something like Adobe ??

Now what do I do?? Who has got the Right software to load a RSS into Win zip Public Library ?? Suggestions on where to go??

Dan
 
If you're just looking for a way to upload the .RSS file to the forum, simply change the extension to one of the valid types. For example, I have attached the sample program that comes with RSLogix 500. Note that it is NOT a .ZIP file. After you download it, just change the extension from .ZIP to .RSS, and it will open.

Maybe Phil can add the .RSS extension to the 'valid file types' list?... :confused:

🍻

-Eric
 
Eric

I thought of that (changing the extension) but thought it was so blatantly obvious and blatantly cheatting that it would not work.

I am not above cheating computers.

Thanks Dan
 
Practice with Spreadsheets

Try this spread sheet.

ftp://ftp.deltacompsys.com/public/PID/T0C1 PID A.zip

It is from a series of threads on PIDs last summer. It has four sets of columns.

Columns
A-C define the system gain and response.
E-F define the target or motion profile.
H-I are where one puts the PID gains.
K-L provide the auto tuning solution.

See Ron's thread on why P gain alone doesn't work. Note that this spreadsheet simulates a velocity or type 0 system.
 
It is EASIER than they said, but HARDER than you think...

Dan,
I have studied your spreadsheet. You are on the right track. I think this is a good set-up to be learning from. It is very typical of some things I see in the real world.

You need to do three sets of scaling equations. The good news is that all of them can be done using the same basic straight-line equations of the form "Y = mX + b" taught in high-school Algebra I class. I have added these to your spreadsheet on a new sheet called "Equations". Also on this sheet I have added the scaling equations for all three of your variables.

You must use the correct numbers to plug in to the scaling equations. I noticed that you have set up your spreadsheet as if you will have a 0-10 volt range for your setpoint and a 0-5 range for your tach feedback signal. This is nice if you can get it, but you have lead us to believe that you are using only ONE 1746-NI04I module. This will be normally true in the real world also, so you might as well learn it now. Not many places will let you use a new module for each input. If so, then you cannot set one channel to be 0-10 volts and another to be 0-5 volts (last time I checked anyway). Your best bet is to use 0-10 volts for both signals, then scale them internally to give the right numbers. Doing it this way, your maximum input value seen for I:5.1 will be 4915, and Process Variable N10:28 = 3.3333 X I:5.1

The Control Variable (CV) output of the PID block is normally 0 to 16383, which represents 0 to 100%. You have "100" shown as the N10:16 maximum value. I think it should be "16383", and I adjusted it accordingly on the new spreadsheet.
 
Last edited:
Thank You

Lancie1 said:
Dan,
I have studied your spreadsheet. You are on the right track. I think this is a good set-up to be learning from. It is very typical of some things I see in the real world.

You need to do three sets of scaling equations. The good news is that all of them can be done using the same basic straight-line equations of the form "Y = mX + b" taught in high-school Algebra I class. I have added these to your spreadsheet on a new sheet called "Equations". Also on this sheet I have added the scaling equations for all three of your variables.

You must use the correct numbers to plug in to the scaling equations. I noticed that you have set up your spreadsheet as if you will have a 0-10 volt range for your setpoint and a 0-5 range for your tach feedback signal. This is nice if you can get it, but you have lead us to believe that you are using only ONE 1746-NI04I module. This will be normally true in the real world also, so you might as well learn it now. Not many places will let you use a new module for each input. If so, then you cannot set one channel to be 0-10 volts and another to be 0-5 volts (last time I checked anyway). Your best bet is to use 0-10 volts for both signals, then scale them internally to give the right numbers. Doing it this way, your maximum input value seen for I:5.1 will be 4915, and Process Variable N10:28 = 3.3333 X I:5.1
REPLY I have only the one module. I think i was thinking of dip switches. Anyway I need to double check - I think I am wrong. Thanks for the catch.


The Control Variable (CV) output of the PID block is normally 0 to 16383, which represents 0 to 100%. You have "100" shown as the N10:16 maximum value. I think it should be "16383", and I adjusted it accordingly on the new spreadsheet.
REPLY I think the PID setup screen shows a CV% with a changing value ranging 1 to 100 as the output increases. This value in N10:16 was the one I multiplied by 500 to get the VFD to get the hydraulic pump motor to run fast enough to get the hydraulic motor to run -- kind of a meatball method I know but it got the dang motor to at least run and change speed proportion to the CV% value. I just checked the data table (printed out at school) for N10 N10:16 is reported as a value of 71.
This is on a SLC 5/05.

I will save your file and print it for use at school.

Thank you for the double check.
 
Thank you

Peter Nachtwey said:
Try this spread sheet.

ftp://ftp.deltacompsys.com/public/PID/T0C1%20PID%20A.zip

It is from a series of threads on PIDs last summer. It has four sets of columns.
REPLY Peter were these Ron Beuaforts what is I or P or D in PID or something different. IF different can you give me the titles so I can look em up please.

Columns
A-C define the system gain and response.
E-F define the target or motion profile.
H-I are where one puts the PID gains.
K-L provide the auto tuning solution.

See Ron's thread on why P gain alone doesn't work. Note that this spreadsheet simulates a velocity or type 0 system.

I have saved the two files to Excel and need some of the terms defined before I change the values to see what is going on.

Uhhhhhh what is a type O system?? Does this refer to a velocity / direction type control system ?? What would the system designation be for a heater setup (say residential tank type water heater to keep it simple) where the load would be a total of ambient loss plus the water flowing thru the tank.


Dan
 
Dan,
Maybe the SLC 5/05 is different. But on the 5/04, the PID Setup screen also shows "Output Max 100%" and "Output Min 0%", but still the actual numbers coming out are 0 to 16383. Is that "71" that you seen part of the 0-100% range or part of 0-16383? The only way to know for sure is to give it a 100% Output, then read the data table. I would say to check the manuals, but a lot of this kind of things are not in the Rockwell manuals. They also sponsor programming courses, so must leave some things unanswered in the manuals so the instructors will have something new to cover (my theory anyway).
 
I don't make this stuff up, someone beat me too it.

leitmotif said:
Uhhhhhh what is a type O system??
It is type 0 as in 0,1,2, not type O.
http://www.ctc-control.com/customer/elearning/servotut/svotyp.asp

leitmotif said:
Does this refer to a velocity / direction type control system ??
Yes, your system is a type 0 system.

leitmotif said:
What would the system designation be for a heater setup (say residential tank type water heater to keep it simple) where the load would be a total of ambient loss plus the water flowing thru the tank.
Dan
Now it is your turn, you tell us.
Does you instructor monitor this thread?
 
from Lancie1 in post #21

... as if you will have a 0-10 volt range for your setpoint and a 0-5 range for your tach feedback signal. This is nice if you can get it, but you have lead us to believe that you are using only ONE 1746-NI04I module. ... If so, then you cannot set one channel to be 0-10 volts and another to be 0-5 volts (last time I checked anyway). Your best bet is to use 0-10 volts for both signals, then scale them internally to give the right numbers.




just a slight clarification ... at first glance it might look like Lancie1 is saying that you can’t do this application with just one 1746-NIO4I module ... but just go ahead (like he says) and hook the two signals up as if they were both 0 to 10VDC inputs ... they should work just fine ...



actually the 1746-NIO4I will automatically accept DC voltage inputs anywhere in the range of -10VDC to +10VDC ... all on the same module with no “settings” for different voltage ranges ... note: there IS a DIP switch for each input channel ... this changes the input from Current mode to Voltage mode ...



also, this is minor, Dan, but I noticed that you have been typing 1746-NIO41 (number “1” on the end) ... actually it’s 1746-NIO4I (letter “I” on the end) ... the final “I” tells us that the outputs are Current type (milliamps) ... the corresponding 1746-NIO4V has Voltage outputs ... going further: either type module can support either Current inputs or Voltage inputs ... these are individually selected by the DIP switches mentioned above ...



and so:



+10VDC = 32767 input data

0 VDC = 0 input data

-10VDC = -32768 input data



and everything in between follows a linear relationship ...



so if you just hook up your tachgenerator to the input and let’s say that the input voltage ranges from 0 to 5 VDC, then expect to see data values ranging from 0 to 16384 ... if the input voltage ranges from 0 to 3VDC (Dan’s tachgenerator example), then data values ranging from 0 to 9830 should be expected ...



and then as Lancie1 says, scale the values internally to give whatever numbers you require ...
 
Ron,

Thanks for the feedback. If I EVER ALWAYS type 1 insteal of l for one and 0 for zero instead of O it WILL BE so nice -- I will have finally overcome being human and making dumb mistakes.

OK so all I gotta do is follow the original game plan and scale it (using SCP) for the tach gen voltage of 3 on the input channel configured 0 to 10 instead of 5.

ALSO I double checked your posts What is P, I and D in PID for the graphs -- they are there. I guess what got me confused is the [attachment] gizmo / thingy in the text.

Peter
Read the referance to servos. Do not understand all of it yet. However it appears to me that a residential type hot water tank with thermostats would not be any of these systems it would be open loop. If I add a controller and use a sensor ie RTD to sense temperature then it would be type 0.

Fortunately instructor at school is very good at servos, I think my comment regarding him is that he does not work enough with AB PID instruction enough to remember all there is off the top of his head.

The BOTTOM LINE is
I am the student
I am the one who needs to learn.
I am the one who needs to figure it out.
FORTUNATELY it is much less difficult with the help of you guys.

I don't know if he participates in this. I have sent him some of the threads via e mail. We will see what he thinks.
 
SLC 5/05 vs 5/04 etc

Lancie1 said:
Dan,
Maybe the SLC 5/05 is different. But on the 5/04, the PID Setup screen also shows "Output Max 100%" and "Output Min 0%", but still the actual numbers coming out are 0 to 16383. Is that "71" that you seen part of the 0-100% range or part of 0-16383? The only way to know for sure is to give it a 100% Output, then read the data table.
REPLY that is one of the several first things I am going to do Tue at school. Right now all I have is the printout of table N10 - all other values are reported in decimal and appear to be in ballpark so I will have to watch the screen and see what is going on.

I would say to check the manuals, but a lot of this kind of things are not in the Rockwell manuals.
REPLY Like a lot of manuals they do not cover all contingencies. Even thought the instruction specifically says it covers 5/05 sometimes the manual does not always match what I see on screen. The help pages add a little info but not a lot.

They also sponsor programming courses, so must leave some things unanswered in the manuals so the instructors will have something new to cover (my theory anyway).
REPLY
I really hope they are not that chicken XXXX about it but one surely wonders at times. I often have completely unfamiliar persons test procedures / reports I write. It is amazing what I forget / overlook / do not think of. But that is why I have them test them for me.

Will let you know how I make out.
Dan
 
Greetings Dan,



one more important “issue” that I noticed on your spreadsheet is highlighted below ...



danslcxls.JPG





it looks like you have the control block for your PID located at N10:0 ... so the 23 words of the control block occupy N10:0 through N10:22 ... nothing wrong with that at all ... but ...



your approach of taking the “CV%” reading as the OUTPUT of the PID is highly unorthodox ... normally we use the integer memory location which we’ve listed as the “Control Variable” on the PID instruction (on the ladder rung) as the output of the PID - not word 16 of the PID’s control block ... in Figure 2 of my post #11 I used N7:75 as my “CV” ... in normal operation, the PID will drive this location with values ranging from 0 to 16383 ... this “CV” location is the one that SHOULD be used for the input to your final SCP ... of course your program’s address may be different from my N7:75 example ... I’d suggest N10:29 if you’re not already using it for something else ...



normally the value from the “CV%” is used as a readout display for the operator, etc. ... it tells him (in simple 0 to 100% units) how hard the PID is presently driving the output ...



all of that having been said: I can’t think of anything to actually prevent you from using the “CV%” location (word #16 of the PID control block) and scaling it as you have ... it looks like it should work OK ... but be aware that this approach gives your PID only 100 steps of resolution for its output signal ... not 16383 steps as would normally result from using the “proper” location ... that might be fine for this particular application, but in many (most?) others just 100 steps would not be enough for smooth control ...



as I said, your present approach should work ... but I can assure you that it is NOT commonly done this way in the real world ... since you’re obviously trying to learn as much as possible from this exercise, then I suggest (in the friendliest terms) that you “get in step” with everyone else and use the “CV” and not the “CV%” for your PID’s output ...



there are a few other minor issues with things like your “engineering units”, etc. ... but it’s obvious that you’re still working through those types of things ... I for one am going to let them simmer for awhile ... there’ll be plenty of time to tackle them later if you need help ...



it looks like you’re making a systematic approach to mastering this subject ... if either you or your instructor wants to talk about it by phone, feel free to send me a Private Message with a phone number ... I’ve helped quite a few tech schools with this type of stuff in the past ...
 

Similar Topics

Hi all, splitting out from this thread because it's a somewhat different question to the original. I have to migrate some code from a Micrologix...
Replies
17
Views
4,161
Hi all, I've been tasked with migrating a standalone control box with a Micrologix 1100 into an existing 5380 Compact Logix controller. It has a...
Replies
9
Views
2,444
Today I upgraded an L55 processor with an L82, which ended up being the 2nd unsuccessful attempt but thats a different story. After starting the...
Replies
15
Views
4,550
Just tuned a heating application where my natural period was 250 seconds. Everything I've read says that the loop update time should be 5-10 times...
Replies
1
Views
1,640
May be my question is too childish, but can i get all the answers please? For PID of ML1400, if I right loop update as 0.02 & time mode as STI...
Replies
4
Views
4,783
Back
Top Bottom