beautypg.com

Using the scale with parameters (scp) instruction – Rockwell Automation 1746-XXXX SLC 500 4-Channel Analog I/O Modules User Manual User Manual

Page 80

background image

Publication 1746-UM005B-EN-P - June 2004

6-18 Programming Examples

Using the Scale with Parameters (SCP) Instruction

Rung 2:0

N7:0 contains percentage of valve open. If this value is

less than 90, move the minimum value to the analog output

(6242 decimal = 4 mA at the analog output).

| Check for Below |

| below range flag |

| range |

| +LES–––––––––––––––+ B3 |

|–+LESS THAN +––––––––––––––––––––––––––––––––+––––( )–––––––––––––––+–|

| |Source A N7:0| | 0 | |

| | 0| | | |

| |Source B 90| | | |

| | | | | |

| +––––––––––––––––––+ | | |

| | Minimum | |

| | analog | |

| | output | |

| | value | |

| | +MOV–––––––––––––––+ | |

| +–+MOVE +–+ |

| |Source 6242| |

| | | |

| |Dest O:2.0| |

| | | |

| +––––––––––––––––––+ |

Rung 2:1

N7:0 contains percentage of valve open. If this value is

greater than 100, move the maximum value to the analog output

(31208 decimal = 20 mA at the analog output).

| Check for Above |

| above range flag |

| range |

| +GRT–––––––––––––––+ B3 |

|–+GREATER THAN +––––––––––––––––––––––––––––––––+––––( )–––––––––––––––+–|

| |Source A N7:0| | 1 | |

| | 0| | | |

| |Source B 100| | | |

| | | | | |

| +––––––––––––––––––+ | | |

| | Minimum | |

| | analog | |

| | output | |

| | value | |

| | +MOV–––––––––––––––+ | |

| +–+MOVE +–+ |

| |Source 31208| |

| | | |

| |Dest O:2.0| |

| | | |

| +––––––––––––––––––+ |

Ladder logic continued on the next page .