Detect an out-of-range input – Rockwell Automation 1746-FIO4V SLC 500 Fast Analog I/O/ User Manual User Manual

Page 41

Advertising
background image

Publication 1746-UM009B-EN-P - September 2007

Write Ladder Logic 41

Clear the Output for Changing Mode or Cycling Power

This example clears analog output channel 0 during the initialization
scan (first processor scan). The first pass bit, S2:1/15, in the Status File
is used to initialize the analog output when you apply power in the
RUN mode or upon setting the processor to the RUN or TEST mode.
This bit goes ON automatically only for the first-pass scan. To clear
another analog output channel, use another rung with a different
MOV destination address. The analog module is in slot 2.

Detect an Out-of-range
Input

Analog modules do not provide an input out-of-range signal to the
processor. However, if this feature is critical to a specific application,
you can program the processor to provide this function.

The following program applies to all SLC 500 processors. It uses
comparison instructions (LES and GRT) to check for analog input
values which exceed low and high limits respectively. Whenever this
happens, the program latches a bit that could serve to trigger an alarm
elsewhere in your ladder program. In this example, the input range is
1…5V dc (decimal range of 409…2047).

] [

MOVE
Source
Dest

S2:1/15

0
O:2.0

MOV

MAIN

Turn OFF Alarms

Turn ON Alarm,
Low Limit Exceeded

Turn ON Alarm,
High Limit Exceeded

END

LES

GRT

Remainder of Program

LESS THAN
Source A
Source B

I:1.0
409

GREATER THAN
Source A
Source B

I:1.0
2047

B3/0
(U)

B3/1
(U)

B3/0
(L)

B3/1
(L)

Advertising
This manual is related to the following products: