13
PLC 5 and ControlLogix Subroutine Parameters

PLC 5 and ControlLogix Subroutine Parameters

Embed Size (px)

DESCRIPTION

PLC 5 and ControlLogix Subroutine Parameters. Input Parameters Simple Example. Three variable frequency drives heat sink temperatures input to PLC Temperatures input in degrees Celsius Convert to degrees Fahrenheit and display on operator interface. Option #1 Ladder Conversion. - PowerPoint PPT Presentation

Citation preview

Page 1: PLC 5 and ControlLogix Subroutine Parameters

PLC 5 and ControlLogix Subroutine Parameters

Page 2: PLC 5 and ControlLogix Subroutine Parameters

Input Parameters Simple Example

• Three variable frequency drives heat sink temperatures input to PLC

• Temperatures input in degrees Celsius

• Convert to degrees Fahrenheit and display on operator interface

Page 3: PLC 5 and ControlLogix Subroutine Parameters

Option #1 Ladder Conversion

• Each time temperature input could add a rung to do calculations.

• This would make ladder file longer.– More rungs– Slower scan

Page 4: PLC 5 and ControlLogix Subroutine Parameters

Option #2 Subroutine Conversion

• Put conversion instructions in a subroutine

• Access subroutine each time conversion necessary

• Less rungs in ladder

• JSR input parameters used to move temperature data to subroutine

Page 5: PLC 5 and ControlLogix Subroutine Parameters

JSR Instructions with Parameters

Page 6: PLC 5 and ControlLogix Subroutine Parameters

Heat Sink Temperature from Three Different Sources

• Drive node 21 temperature to F8:0

• Drive node 22 temperature to F8:1

• Drive node 23 temperature to F8:2

Page 7: PLC 5 and ControlLogix Subroutine Parameters

JSR Sends Information to SBR

JSR sends temperature information to SBR instruction input parameter address F8:10.

Node 21, F8:0 temperature

Node 23, F8:2 temperature

Node 22, F8:1 temperature

Page 8: PLC 5 and ControlLogix Subroutine Parameters

Subroutine Shares Data

- F8:10 is where temperature is stored.

- F8:10 data used in calculation

Page 9: PLC 5 and ControlLogix Subroutine Parameters

CPT Destination Stores Result

Page 10: PLC 5 and ControlLogix Subroutine Parameters

Result, F8:11 to RET Output Parameter

Page 11: PLC 5 and ControlLogix Subroutine Parameters

Data Returned to JSR

Data from RET instruction return parameter to JSR return parameter F8:12

Page 12: PLC 5 and ControlLogix Subroutine Parameters

Data Flow

A

B C

E

Ladder 2

Ladder 3

D

Page 13: PLC 5 and ControlLogix Subroutine Parameters

No Return Parameter Faults Processor