Floating point as PID set point with MicroLogix 1500 PLC f

A

Thread Starter

Arup Basu

Dear Friends,

As per the specifications of the AB make analog module 1769 IF4, the resolution is 14 bit. To get the adventage of the accuracy, I wanted to use the same to control temeperature where one can set the preset point in floating point (e.g say 23.5).

While writing the code, I find that the PID block setting of the Micrologix 1500 PLC accepts set point (e.g PD10:0.SPS) only in the integer form.
How can the problem be solved simply but without comprising accuracy?
 
In my opinions, you can multiply that value, for example 23.5, it is multiplied by 10, it will be 235, that will be more accurate and also it does not exceed the range of PID setting!
 
S

Steve Myres, PE

The analog input module is no doubt sending its data in integer format anyway, even if it represents a floating point quantity. On some systems, the analog input is scaled to engineering units multiplied by 10 or 100, so 0-10000 might represent 0-100 degrees F. Or, the data might be scaled such that 0-16384 = some predefined or user configurable range of engineering units. Just make sure your setpoint is scaled using the same equation as the process value, and try to get as much resolution as you reasonably can, while allowing some headroom for unexpected deviations.
 
You can solve this problem by scaling the PID parameters by 10 and entering the set point as 235 instead of 23.5. You can scale it back by 10 after if need be.

Hopes this helps.
 
R

Ron Beaufort

this is one common method of solving your problem... set the 1769-IF4 input channel as “scaled for PID”... this means that the module will provide a raw signal which ranges from 0 to 16383...

leave the PID instruction UNSCALED... this means that the PID instruction will be set up to accept the raw 0 to 16383 input from the module... it also means that the PID’s setpoint must be UNSCALED as a value which ranges from 0 to 16383...

now provide a math function to take the operator’s scaled setpoint entry (represented in engineering units) and convert it into an integer value with a range of 0 to 16383... for example: assume that your engineering units are expressed as a percentage... 23.5 percent from floating point location F8:11 would become 3850 at N7:22... an SCP (Scale with Parameters) is one way to do the conversion... make the new integer value the setpoint of your PID... try it out...

finally... since you’re leaving the PID unscaled, then the “scaled pv” reading that the PID normally provides will not give you the expected reading in engineering units... if you need such a reading, just provide another math function (such as another SCP) to make the conversion for your operator display...

disclaimer: it has been quite awhile since I’ve done this with a MicroLogix 1500 and I am writing it from memory... I apologize in advance if I have missed some detail... the basic ideas behind the approach should be sound...

best regards,
Ron
 
E

Evandro Carlos Vizicato

Dear Friend

The PID process variable need a value 0 to 16383.
Set the 1769-IF4 module to scaled for PID.
In the PID setup enter your eng unit multiply by 10 to have a floating point.
If your unit is 0 to 100, enter 0 to 1000.
In your HMI enter a set point multiply by 10.
Exemple : 25.2 = 252

Evandro Carlos Vizicato
[email protected]
 
D
Convert the float to an Integer. For single decimal accuracy convert 23.5 to 235 or for 2 place accuracy convert it to 2350. Just be sure that your maximum expected values dont exceed 14 bit accuracy. IE 2 decimal place accuracy will only yield a maximum temp range of 163.83 degrees.

Hope this helps,

David
 
> Dear Friends,
>
> As per the specifications of the AB make analog module 1769 IF4, the resolution is 14 bit. To get the adventage of the accuracy, I wanted to use the same to control temeperature where one can set the preset point in floating point (e.g say 23.5).
>
> While writing the code, I find that the PID block setting of the Micrologix 1500 PLC accepts set point (e.g PD10:0.SPS) only in the integer form.
> How can the problem be solved simply but without comprising accuracy?


Have you trierd using the SCP (scale with parameters) instruction?

 
V

Vic Penaranda

Simply multiply your setpoint and your raw analog input scaling to 10, so you may have at least 1 decimal place. To display your measured value or your PID on the HMI, again divide the values by 10.

 

if you wish to set the setpoint on your HMI software in floating point, and have it converted into an integer that is ranged the same as the analog input, try using the SCP instruction in the advanced math. it is a Scale with Parameters, so you could make the range whatever you want.


Tim

Complete Thread: http://www.control.com/1026190768

On February 26, Arup Basu wrote:
> Dear Friends,
>
> As per the specifications of the AB make analog module 1769 IF4, the resolution is 14 bit. To get the adventage of the accuracy, I wanted to use the same to control temeperature where one can set the preset point in floating point (e.g say 23.5).
>
> While writing the code, I find that the PID block setting of the Micrologix 1500 PLC accepts set point (e.g PD10:0.SPS) only in the integer form.
> How can the problem be solved simply but without comprising accuracy?
 
Thanks to all of you for replying the quarries. I ahve already tried the follwing and it works all right:

I have set the ananlog module to 'engineering unit',scaled the data for 4000-20000 (as my transmitter ouput is 4-20 mA)using SCP to 0-500 (using multiplying factor of 10, as my operating range is 0-50) and then I converted the SCP output to floating point using 'move' and 'divide'instructuion for display purpose. The SCP output with multiplication factor of 10 i.e. 0-500 is used as PV value to PID set up.
Similarly, for set point,I took the floating point value from users ( PV 600 screen), multiply it by 10, move it to an intiger and place it PID block set point ( e.g PD10:0.SPS).
I did the simulation and marked the system is working all right.

My only question is which will be more accurate when the the transmitter ouput to 1769-IF4 analog module is 4- 20 mA:
- to scale it for engineering as I did (4 ma=4000 and 20 ma=20000)
or
- to scale it for PID i.e 0-16383 ( 4ma=0 and 20 ma=16383)
as per manual of 1769-IF4, what I feel, it should be engineering unit and I must scale 4000-20000).

Please give your coments.

I have one more question, I am using two types of PID. One is to control a linear actuator and the other is 'time proportional' to control SSR using PLC digital output. I have to keep provision for 'auto/manual' control for both the PID type.

I did the manual operation for PID to operate the 4-20 mA actuators by setting the PD10:0.AM bit and Scalling the 0-100% to 0-16383 and transferring the same to 'control variable' of PID.

But I am facing problem to controle the output of PID block manually which is operating in time proportional mode.

Let me have any idea.
Thanks you all once again.

Arup Basu
 
Top