Using the scale (scl) instruction -6, Using the scale (scl) instruction – Rockwell Automation 1746-XXXX SLC 500 4-Channel Analog I/O Modules User Manual User Manual

Page 68

Advertising
background image

Publication 1746-UM005B-EN-P - June 2004

6-6 Programming Examples

Using the Scale (SCL) Instruction

Rung 2:0

Check for below allowable range.

| Below |

| range flag |

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

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

| |Source A I:1.1| 0 |

| | 0| |

| |Source B 14344| |

| | | |

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

Rung 2:1

Check for above allowable range.

| Above |

| range flag |

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

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

| |Source A I:1.1| 1 |

| | 0| |

| |Source B 16383| |

| | | |

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

Rung 2:2

Turn on the below range alarm output when the analog

input is below the acceptible range.

| Below Below |

| range flag range alarm |

| B3 O:2 |

|––––] [––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––( )––|

| 0 0 |

Rung 2:3

Turn on the above range alarm output when the analog

input is above the acceptible range.

| Above Above |

| range flag range alarm |

| B3 O:2 |

|––––] [––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––( )––|

| 1 1 |

Rung 2:4

Scale analog input value and process the result only

when it is within acceptible range.

| Below |Above Scale |

| range flag |range flag analog input |

| B3 B3 +SCL–––––––––––––––+ |

|––––]/[––––––––]/[–––––––––––––––––––––––––––––––––––––––+SCALE +–|

| 0 1 |Source I:1.1| |

| (2:0) (2:1) | 0| |

| |Rate [/10000] 122| |

| | | |

| |Offset 100| |

| | | |

| |Dest N7:0| |

| | 0| |

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

| |

Rung 2:5

| |

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

|

|

Advertising