Rockwell Automation 1746-XXXX SLC 500 4-Channel Analog I/O Modules User Manual User Manual

Page 67

Advertising
background image

Publication 1746-UM005B-EN-P - June 2004

Programming Examples 6-5

Rung 2:4

Scale the analog input value and process the result

only when it is within the acceptible range

| Below |Above Multiply |

| range flag|range flag by the |

| scaled range |

| |

| B3 B3 +MUL–––––––––––––––+ |

|––––]/[––––––––]/[–––––––––––––––––––––––––––––––––––+–+MULTIPLY +–+–|

| 0 1 | |Source A I:1.1| | |

| | | | | |

| | |Source B 400| | |

| | | | | |

| | |Dest N7:0| | |

| | | 0| | |

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

| | | |

| | Divide | |

| | result by | |

| | input | |

| | range | |

| | +DDV–––––––––––––––+ | |

| +–+DOUBLE DIVIDE +–+ |

| | |Source 32767| | |

| | | | | |

| | |Dest N7:0| | |

| | | 0| | |

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

| | Add offset | |

| | (N7:0 cont | |

| | ains proce | |

| | ss tempera | |

| | ture) | |

| | +ADD–––––––––––––––+ | |

| +–+ADD +–+ |

| | |Source A N7:0| | |

| | | 0| | |

| | |Source B 100| | |

| | | | | |

| | |Dest N7:0| | |

| | | 0| | |

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

| |

| | Clear flt | |

| | bit from | |

| | overflow | |

| | S:5 | |

| +––––(U)–––––––––––––––+ |

| 0 |

Rung 2:5

| |

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

| |

Advertising