505 Auto PID Enable

jayare12

Member
Join Date
Dec 2010
Location
oregon
Posts
20
OK gurus out there currently I am working on an improvement to our existing 505 PLCs that will auto start all PID loops five seconds after the PLC is put in run mode the first time. Currently I am just using a special function call the using sfmath to move the value into the appropriate LVF address. My question is, is there any symbol or anything I can use in my sfmath to signal all lvf addresses or do I need to do each one individually? i.e lvf1:=8192,lvf2:=8192....
 
You could use indirect addressing and a pointer, but I would not use it, easier to trouble shoot later.
How many loops are you doing this for?

Another option, that I do not like, would be to write one special function that is called by each loop, one of the SP Temp variables has the loop number that called it, use this for indirect addressing, and then do some first pass checks and if first pass, set the loop, else do nothing.
 
52 loops for now, right now I just have one SFcall that I use to move the value into each lvf. And the call only runs off a timer and a one shot, plc goes into run 5 seconds later loops go into auto. My question was because I was thinking of future additions I would like to make it so anytime someone added another loop it would know how many loops to start, Kind of like a for loop in C++.
 
I can't remember if T9 should be set to 1 or zero at the start, try this.

IMATH T9:=1 (may need to be zero for first loop, cannot remember off hand)

LABEL LABEL: 1
IMATH LVF1(T9) :=0H4000
IMATH T9:= T9+1
IF T9 < 52
GOTO LABEL: 1
ENDIF
 
perfect that is exactely what I was looking for to use my for loop for this will work much better I will but it into my test plc and verify logic tonight. Could I just use a V-bit instead of T9, and could you explain T9 for me.
 
Last edited:
"A block of memory within the controller is temporarily reserved during run time whenever a Special Function program is run. One block is allocated for each SF program that is being run. This memory type is 16 words in length and is called Temporary Memory (T-Memory) since it is not saved when the program has completed running.
The controller writes data related to the Special Function program to the first 7 words. You can read this data and/or write over it if you choose. You can use all 16 words just as you would use Variable Memory, except no data is saved when the program has completed."
I found the definition so does it matter wich word I use or do I need to pick one after seven since the controller writes to the first seven for the special function?
 
I can't remember if T9 should be set to 1 or zero at the start, try this.

IMATH T9:=1 (may need to be zero for first loop, cannot remember off hand)

LABEL LABEL: 1
IMATH LVF1(T9) :=0H4000
IMATH T9:= T9+1
IF T9 < 52
GOTO LABEL: 1
ENDIF

And this brings up another question for me my boss uses 8192 to start up a PID loop which I thought was cascade mode I thought 16384 was auto mode. None of our loops are cascaded so is there a difference? I have asked my supervisor about this and was told that "it is working with 8192".
 
BTW,
I think you are setting the cascade bit, I think your boss is wrong. The reason it works is that you cannot transition from manual to cascade, it must be manual to auto, and then auto to cascade. So... the loop is in manual and then you set the cascade bit, it goes to auto, if you did not have the one pass logic, the loop would go to cascade on the next pass. I would test this on your test bed, and then fix your production unit.
 
ok good to know I was assuming it just put any loop that wasn't set up to cascade just into auto. I will verify and double check.
 

Similar Topics

Hi everyone, I have a 505 workshop program with PLC type of 555- 1106 and I was wondering how can I download the data documentation window as a...
Replies
3
Views
53
Hello all. I have a few SLCs in my plant and of late we've seen a weird issue: The system will be running normally and then randomly the outputs...
Replies
2
Views
119
Hi. I have 2 files where I would like to see the ladder logic differences (similar to the Rockwell compare function). I am using TISoft Siemens...
Replies
1
Views
1,279
Hello. I'm using bootp to set an ip address for a 1747L551 processor. The bootp program immediately sees the mac id and I am able to enter an...
Replies
5
Views
1,191
Hello, I inherited a control system one of my predecessors thought it was a good idea to put logic for cant optimization and Kinetix motion...
Replies
15
Views
3,612
Back
Top Bottom