PID Loop TI505 (TISOFT)

karivelm

Member
Join Date
Nov 2006
Location
Quebec
Posts
66
I am looking to control position with of an indexer that will normally have 3 desired positions 0% 50% and 100% (SP).

PV: 4to20 position encoder (scaled 0-1000)
SP: Varie from 0 to 100% ,100% to 0, 0 to 50% or 50% to 100%
OUTPUT: Propotionnal valve (4to20)

Must I filter the setpoint, because the setpoint jumps from 0 to 100... It is not progressively going up 0-5-10-15....

Must I use the controller in cascade ? (the setpoints will be coming from the remote set point parameter)

Can anyone confirm the parameters I set:

PID LOOP 1 TITLE: POSMTR REMOTE SETPOINT: V526
CLAMP SP LIMITS: LOW = +0.00000
POS/VEL PID ALGORITHM: POS HIGH = +1000.0
LOOP VFLAG ADDRESS: C4250
SAMPLE RATE (SECS): +0.30000 LOOP GAIN: +1.00000
RESET (INTEGRAL TIME): +0.50000
PROCESS VARIABLE ADDRESS: V525 RATE (DERIVATIVE TIME): +0.00000
PV RANGE: LOW = +0.00000 FREEZE BIAS: NO
HIGH = +1000.00
DERIVATIVE GAIN LIMITING: NO

PV IS BIPOLAR: NO LIMITING COEFFICIENT: +10.0000
SQUARE ROOT OF PV: NO
20% OFFSET ON PV: NO SPECIAL CALCULATION ON: PV
SPECIAL FUNCTION: SFPGM1
LOOP OUTPUT ADDRESS: WY521
OUTPUT IS BIPOLAR: NO LOCK SETPOINT: NO
20% OFFSET ON OUTPUT: YES LOCK AUTO/MANUAL: NO
LOCK CASCADE: NO
RAMP/SOAK PROGRAMMED: NO
RAMP/SOAK FOR SP: NO ERROR OPERATION: NONE
REVERSE ACTING: NO
ALARM DEADBAND: +0.00000 MONITOR DEVIATION: NO
DEVIATION ALARM: YELLOW = +0.00000
MONITOR LOW-LOW/HI-HI: NO ORANGE = +0.00000
MONITOR LOW/HIGH: NO
PV ALARMS: LOW-LOW = +0.00000 MONITOR RATE OF CHANGE: NO
LOW = +0.00000 RATE OF CHANGE ALARM: +0.00000
HIGH = +1000.00
HIGH-HIGH = +1000.00 MONITOR BROKEN XMITTER: NO
 
Wow, several questions here. Let's see if I can get them one by one ...

Filter the SP? Uh, I don't think so. What's wrong with changing a setpoint from 0% to 50% etc? No need to filter.

Cascade mode? Yes. The TI nomenclature was that if the loop was to get its setpoint from any external source (another loop, a memory address, etc) as opposed to having it written straight to LSP1 then it should be in cascade. However, see later ...

Comments on parameters -

Are you scaling the SP and PV outside the loop somewhere? If you specify a V-address for the SP and PV (which you have done), the loop will expect these to be integer values (according to the way you've shown it) between 0 and 32000. It will then scale these to floating point values automatically between the limits you've given (0 - 1000) and work on the basis that there is no 20% offset on this scale. However you've previously said that the PV is a 4-20mA signal i.e. it does have 20% offset. If V525 and V526 have already been scaled correctly as floating point values elsewhere, then don't enter them here as if they were INTs. Write a couple of lines of SFPGM code like -
Code:
LPV1. := V525.;
     LSP1. := V526.;
That way you're transferring the pre-scaled floating point values (note the '.' suffix on the memory addresses) right in to the loop algorithm. Leave the parameters blank for SP and PV, and now run the loop in auto, not cascade.

SFPGM21 is scheduled on the PV update - what code does this already contain?

Other items may arise as we discuss this.

regards

Ken
 
Thanks for the help.

The Process variable is a 4to20 signal which I scale (SFPGM ANSCALE)

00020 SCALE BINARY INPUT..: WX513 SCALED RESULT.: V525
LOW LIMIT.....: 0.0 HIGH LIMIT....: 1000.0
20% OFFSET....: YES BIPOLAR.......: NO

Since the value is already scaled and I use V525 as PV must I still indicate in the LOOP that there is a 20% offset ?

My SFPGM used contains the scaling for the PV
 
So the SFPGM with the following code:
Code:
LPV1. := V525.; LSP1. := V526.;​
Will be active all the time. And I will have another SFPGM which does the scaling of the values as such

00020 SCALE BINARY INPUT..: WX513 SCALED RESULT.: V525
LOW LIMIT.....: 0.0 HIGH LIMIT....: 1000.0
20% OFFSET....: YES BIPOLAR.......: NO

Does this seem right ?
Since PV is now blank in the loop parameters must I still set the high end low limits and indicate that there is a 20% offset ?
 
Hi

Use the same SFPGM which does the scaling to do the assignment of the scaled values to the loop values - just write a couple of extra lines there. You can cram a lot of functionality in to a single SFPGM to do scaling, unscaling, math, memory assignment etc etc.

Are you familiar with the the TI notation for INTs and REALs? When referring to a memory address there is a difference between V525 (which is an INT representation of the contents of V525) and V525. which is a REAL representation of the contents of V525 & V526 taken as a single 32-bit register. The 'dot' at the end of the address is very significant.

I see that even though I know it, I fell in to that trap myself in the code example I suggested.o_O Writing to V525. (V525 & V526) and then V526. (V526 & V527) will obviously cause major problems because the contents of V526 will be affected by both operations. If these addresses are to hold floating-point values they must be separated by at least two registers e.g. V525. and V527.

Your scale operation looks OK, provided you make sure the scaled result is a 'dot' address, like V525. Assign it directly to the loop process variable as LPV1. Set the 20% offset in the loop table as 'NO', and leave the PV limits as 0.0 and 1000.0

Regards

Ken
 
One last question regarding the scaling. If I use the following for scaling:
SCALE BINARY INPUT..: WX513 SCALED RESULT.: V525
LOW LIMIT.....: 0.0 HIGH LIMIT....: 1000.0
20% OFFSET....: YES BIPOLAR.......: NO
Is it okay even if I don't use real values... I guess if I use integer the difference is that I will not have the decimal value ? Which I can live with.
 
Yes that would be fine.

You could also scale your output: 0-10,000.
This would give you one implied decimal. This is quite common, and not that
confusing as long as you well document the implied decimal.
 

Similar Topics

Hello, I am attempting to tune a PID loop on a process. The process involves a valve with electronic actuator that has quite a high deadband...
Replies
10
Views
2,187
We have a PID loop at the plant that measures our drum outlet temp. It adjusts a damper to control the temp within the set point. We have a...
Replies
8
Views
1,418
Hello All, Has anyone on here used Soft PLC brand PLCs? I've just now started doing PLC programming and I am totally stuck on trying to make a PID...
Replies
4
Views
1,553
Hello and thanks for reading my question/problem. I am working on an a application where I have a servo controlled gate that allows product (dry)...
Replies
14
Views
2,768
Hello All, I am trying to figure out the best way to control a system I am working on. I have 2 bags of peanuts being lifted up by hoist. I am...
Replies
23
Views
4,737
Back
Top Bottom