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

Page 88

Advertising
background image

Publication 1746-UM005B-EN-P - June 2004

6-26 Programming Examples

Using the Scale with Parameters (SCP) Instruction

Rung 2:0

Check for below range.

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

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

| |Source A I:1.0| | 0 | |

| | | | | |

| |Source B 3277| | | |

| | | | | |

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

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

| +–+MOVE +–+ |

| |Source 0| |

| | | |

| |Dest O:1.0| |

| | | |

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

Rung 2:1

Check for above range.

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

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

| |Source A I:1.0| | 1 | |

| | | | | |

| |Source B 16384| | | |

| | | | | |

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

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

| +–+MOVE +–+ |

| |Source 8192| |

| | | |

| |Dest O:1.0| |

| | | |

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

Rung 2:2

Scale the analog input for the analog output.

| B3 B3 +SCP––––––––––––––––––––+ |

|––––]/[––––––––] [––––––––––––––––––––––––––––––––––+SCALE W/PARAMETERS +–|

| 0 1 |Input I:1.0| |

| | | |

| |Input Min. 3277| |

| | | |

| |Input Max. 16384| |

| | | |

| |Scaled Min. 0| |

| | | |

| |Scaled Max. 8192| |

| | | |

| |Scaled Output O:1.0| |

| | | |

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

| |

Rung 2:3

| |

|–––––––––––––––––––––––––––––––––––––+END+––––––––––––––––––––––––––––––––––––|

| |

Advertising