Split Range Time Proportional (SRTP)

This information applies to the
CompactLogix
5370,
ControlLogix
5570,
Compact GuardLogix
5370,
GuardLogix
5570,
Compact GuardLogix
5380,
CompactLogix
5380,
CompactLogix
5480,
ControlLogix
5580, and
GuardLogix
5580 controllers.
The Split Range Time Proportional (SRTP) instruction takes the 0-100% output of a PID loop and drives heating and cooling digital output contacts with a periodic pulse. This instruction controls applications such as barrel temperature control on extrusion machines.
Available Languages
Ladder Diagram
This instruction is not available in ladder diagram logic.
Function Block
SRTP_FB_avail_v3
Structured Text
SRTP(SRTP_tag)
Operands
Function Block
Operand
Type
Format
Description
SRTP tag
SPLIT_RANGE
Structure
SRTP structure
Structured Text
Operand
Type
Format
Description
SRTP tag
SPLIT_RANGE
Structure
SRTP structure
See
Structured Text Syntax
for more information on the syntax of expressions within structured text.
SPLIT_RANGE Structure
Input Parameter
Data Type
Description
EnableIn
BOOL
Enable input. If false, the instruction does not execute and outputs are not updated.
Default is true.
In
REAL
The analog signal input asking for heating or cooling. This input typically comes from the CVEU of a PID loop.
Valid = any float
CycleTime
REAL
The period of the output pulses in seconds. A value of zero turns off both heat and cool outputs. If this value is invalid, the instruction assumes a value of zero and sets the appropriate bit in Status.
Valid = any positive float
Default = 0.0
MaxHeatIn
REAL
Maximum heat input. This value specifies the percentage of the In which will cause maximum heating. This is typically 100% for a heat/cool loop.
Valid = any float
Default = 100.0
MinHeatIn
REAL
Minimum heat input. Specify the percent of In that represents the start of the heating range and causes minimum heating. This is typically 50% for a heat/cool loop.
Valid = any float
Default = 50.0
MaxCoolIn
REAL
Maximum cool input. Specify the percent of In that causes maximum cooling. This is typically 0% for a heat/cool loop.
Valid = any float
Default = 0.0
MinCoolIn
REAL
Minimum cool input. Specify the percent of In that causes minimum cooling. This is typically 50% for a heat/cool loop.
Valid = any float
Default = 50.0
MaxHeatTime
REAL
Maximum heat time in seconds. Specify the maximum time in seconds that a heating pulse can be on. If the instruction calculates HeatTime to be greater than this value, HeatTime is limited to MaxHeatTime. If MaxHeatTime is invalid, the instruction assumes a value of CycleTime and sets the appropriate bit in Status.
Valid = 0.0 to CycleTime
Default = CycleTime
MinHeatTime
REAL
Minimum heat time in seconds. Specify the minimum time in seconds that a heating pulse can be on. If the instruction calculates HeatTime to be less than this value, HeatTime is set to zero. If MinHeatTime is invalid, the instruction assumes a value of zero and sets the appropriate bit in Status.
Valid = 0.0 to MaxHeatTime
Default = 0.0
MaxCoolTime
REAL
Maximum cool time in seconds. Specify the maximum time in seconds that a cooling pulse can be on. If the instruction calculates CoolTime to be larger than this value, CoolTime is limited to MaxCoolTime. If MaxCoolTime is invalid, the instruction assumes a value of CycleTime and sets the appropriate bit in Status.
Valid = 0.0 to CycleTime
Default = CycleTime
MinCoolTime
REAL
Minimum cool time in seconds. Specify the minimum time in seconds that a cooling pulse can be on. If the instruction calculates CoolTime to be less than this value, CoolTime is set to zero. If MinCoolTime is invalid, the instructions assumes a value of zero and sets the appropriate bit in Status.
Valid = 0.0 to MaxCoolTime
Default = 0.0
Output Parameter
Data Type
Description
EnableOut
BOOL
Indicates if instruction is enabled. Cleared to false if HeatTimePercent or CoolTimePercent overflows.
HeatOut
BOOL
Heating output pulse. The instruction pulses this output for the heating contact.
CoolOut
BOOL
Cooling output pulse. The instruction pulses this output for the cooling contact.
HeatTimePercent
REAL
Heating output pulse time in percent. This value is the calculated percent of the current cycle that the HeatingOutput will be on. This allows you to use the instruction with an analog output for heating if required.
CoolTimePercent
REAL
Cooling output pulse time in percent. This value is the calculated percent of the current cycle that the CoolingOutput will be on. This allows you to use the instruction with an analog output for cooling if required.
Status
DINT
Status of the function block.
InstructFault (Status.0)
BOOL
The instruction detected one of the following execution errors. This is not a minor or major controller error. Check the remaining status bits to determine what occurred.
CycleTimeInv (Status.1)
BOOL
Invalid CycleTime value. The instruction uses zero.
MaxHeatTimeInv (Status.2)
BOOL
Invalid MaxHeatTime value. The instruction uses the CycleTime value.
MinHeatTimeInv (Status.3)
BOOL
Invalid MinHeatTime value. The instruction uses zero.
MaxCoolTimeInv (Status.4)
BOOL
Invalid MaxCoolTime value. The instruction uses the CycleTime value.
MinCoolTimeInv (Status.5)
BOOL
Invalid MinCoolTime value. The instruction uses zero.
HeatSpanInv (Status.6)
BOOL
MaxHeatIn = MinHeatIn.
CoolSpanInv (Status.7)
BOOL
MaxCoolIn = MinCoolIn.
Description
The length of the SRTP pulse is proportional to the PID output. The instruction parameters accommodate heating and cooling applications.
Using the Internal Cycle Timer
The instruction maintains a free running cycle timer that cycles from zero to the programmed CycleTime. The internal timer is updated by DeltaT. DeltaT is the elapsed time since the instruction last executed. This timer determines if the outputs need to be turned on.
You can change CycleTime at any time. If CycleTime = 0, the internal timer is cleared and HeatOut and CoolOut are cleared to false.
Calculating Heat and Cool Times
Heat and cool times are calculated every time the instruction is executed.
HeatTime is the amount of time within CycleTime that the heat output is to be turned on.
Split Range Time Proportional (SRTP) (15)
If HeatTime < MinHeatTime, set HeatTime = 0.
If HeatTime> MaxHeatTime, limit HeatTime = MaxHeatTime.
HeatTimePercent is the percentage of CycleTime that the HeatOut pulse is true.
L5K_SRTP_equation 2
CoolTime is the amount of time within CycleTime that the cool output is to be turned on.
L5K_SRTP_equaton 3
If CoolTime < MinCoolTime, set CoolTime = 0.
If CoolTime > MaxCoolTime, limit CoolTime = MaxCoolTime.
CoolTimePercent is the percentage of CycleTime that the CoolOut pulse is true.
SRTP_equation 4
The instruction controls heat and cool outputs using these rules:
  • Set HeatOut to true if HeatTime Greater than or equal to the internal cycle time accumulator. Clear HeatOut to false when the internal cycle timer > HeatTime.
  • Set CoolOut to true if CoolTime Greater than or equal to the internal cycle time accumulator. Clear CoolOut to false if the internal cycle timer > CoolTime.
  • Clear HeatOut and CoolOut to false if CycleTime = 0.
Affects Math Status Flags
No
Major/Minor Faults
None specific to this instruction. See
Common Attributes
for operand-related faults.
Execution
Function Block
Condition/State
Action Taken
Prescan
EnableIn and EnableOut bits are cleared to false.
Tag.EnableIn is false
EnableIn and EnableOut bits are cleared to false.
Tag.EnableIn is true
EnableIn and EnableOut bits are set to true.
The instruction executes.
Instruction first run
N/A
Instruction first scan
HeatOut and CoolOut are cleared to false.
HeatTimePercent and CoolTimePercent are cleared to 0.0.
Postscan
EnableIn and EnableOut bits are cleared to false.
Structured Text
Condition/State
Action Taken
Prescan
See Prescan in the Function Block table.
Normal Execution
See Tag.EnableIn is true in the Function Block table.
Postscan
See Postscan in the Function Block table.
Example
In this example, a PIDE instruction executes in a slow, lower priority task because it is a slow, temperature loop. The output of the PIDE instruction is a controller-scoped tag because it becomes the input to an SRTP instruction. The SRTP instruction executes in a faster, higher priority task so that the pulse outputs are more accurate
Function Block
Place the PIDE instruction in a slow, lower priority task
SRTP_FB_ex1_v31
Place the SRTP instruction in a faster, higher priority task.
SRTP_FB_ex2_v31
Structured Text
Place the PIDE instruction in a slow, lower priority task.
BarrelTempLoop.PV := BarrelTemp;
PIDE(BarrelTempLoop);
LoopOutput := BarrelTempLoop.CVEU;
Place the SRTP instruction in a faster, higher priority task.
SRTP_02.In := LoopOutput;
SRTP(SRTP_02);
ResistiveHeater := SRTP_02.HeatOut;
CoolingSolenoid := SRTP_02.CoolOut;
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.