Download Controllogix Safety Reference Manual

Download Controllogix Safety Reference Manual Average ratng: 4,6/5 8990 reviews

ControlLogix 5580 Controllers. ControlLogix 5560/5570 to ControlLogix 5580 Reference Manual. And product safety advisories/notices. Our ControlLogix® 5570 Controllers are available in. Download; ControlLogix Controllers Specifications. GuardLogix Controller Systems Safety Reference Manual. Information from FLEX I/O System With ControlLogix for SIL 2 Reference Manual. Verify Download and Operation. This safety reference manual is.

  1. Controllogix Training
  2. Pesticide Safety Reference Manual
  3. Controllogix 5000 Manual

. Reference Manual Logix5000 Controllers General Instructions Reference Manual Catalog Numbers 1756 ControlLogix, 1768 CompactLogix, 1769 CompactLogix, 1789 SoftLogi x, 1794 FlexLogix, PowerFlex 700S with DriveLogix.

Identifies information that is critical for successful application and understanding of the product. Allen-Bradley, Rockwell Software, Rockwell Automation, RSLogix5000, ControlLogix, CompactLogix, SoftLogix, FlexLogix, DriveLogix, PowerFlex 700S, FactoryTalk, FactoryTalk Alarms and Events, Logix5000, SLC, MicroLogix, PLC-2, PLC-3, PLC-5, PhaseManager, FactoryTalk View SE, RSLinx Enterprise, RSView, RSLogix Emulate 5000, SoftLogix 5800, and TechConnect are trademarks of Rockwell Automation, Inc. Summary of Changes Summary of Changes This manual contains new and updated information. Changes throughout this revision are marked by change bars, as shown to the right of this paragraph.

Topic Page Added MDAC and MDCC motion instructions to Locator Bit addressing Configure MSG instructions Get Audit Value, controller events and set controller events instructions. Notes: Rockwell Automation Publication 1756-RM003N-EN-P - October 2011. Table of Contents Instruction Locator Where to Find an Instruction.29 Preface Introduction. Table of Contents Buffer Alarms. 78 Programmatically Access Alarm Information. Table of Contents One Shot Falling (OSF). 107 Relay Ladder Operands.

Specify the Configuration Details. 172 Specify this Data for a Logix5000 Controller as a Target Device. 173 Specify CIP Data Table Read and Write Messages. Table of Contents Relay Ladder.194 Structured Text. Table of Contents Equal To (EQU).226 Relay Ladder. Table of Contents Function Block.244 Relay Ladder.

Table of Contents Chapter 6 Compute/Math Instructions Compute (CPT).262 (CPT, ADD, SUB, MUL, DIV, Relay Ladder. Table of Contents Function Block.278 Relay Ladder. Table of Contents Chapter 7 Move/Logical Instructions Move (MOV). 295 (MOV, MVM, BTD, MVMT, Relay Ladder. Table of Contents Structured Text.318 Function Block. Table of Contents Boolean Exclusive OR (BXOR).337 Structured Text.

Table of Contents Relay Ladder.374 Structured Text. Table of Contents Chapter 9 Array (File)/Shift Instructions Bit Shift Left (BSL).402 (BSL, BSR, FFL, FFU, LFL, LFU) Relay Ladder. Table of Contents Structured Text.454 Function Block.

Table of Contents Relay Ladder.481 Structured Text. Table of Contents Structured Text.522 Relay Ladder. Table of Contents FBDMATHADVANCED Structure. 536 Relay Ladder.537 Function Block. Table of Contents Relay Ladder Example.548 Structured Text.

Table of Contents Convert to BCD (TOD). 564 Relay Ladder.

Table of Contents Structured Text.583 Relay Ladder. Table of Contents String Delete (DELETE). 612 Relay Ladder. Table of Contents Structured Text.631 Relay Ladder. Table of Contents Common Instruction Parameters for Timing Modes.

662 Overview of Timing Modes.665 Program/Operator Control. Motion Logix5000 Controllers Motion Instructions Reference Manual, publication MOTION-RM002 PhaseManager PhaseManager User Manual, publication LOGIX-UM001 Process control Logix5000 Controllers Process Control and Drives Instructions Reference Manual, publication 1756-RM006 Instruction Location Languages Relay ladder ASCII Test For Buffer Line Structured text. Instruction Locator Instruction Location Languages Instruction Location Languages Relay ladder Relay ladder ASCII Read Structured text Compare Relay ladder CONCAT Relay ladder ASCII Read Line Structured text String Concatenate Structured text Relay ladder Relay ladder Arc Sine Structured text Copy File Structured text Function block Relay ladder. Instruction Locator Instruction Location Languages Instruction Location Languages Relay ladder INTG Process control Structured text Equal to Structured text Integrator Function block Function block Relay ladder ESEL Process control Structured text Immediate Output Structured text Enhanced Select Function block IREF Function block EVENT Relay ladder.

Instruction Locator Instruction Location Languages Instruction Location Languages MAFR Motion Relay ladder MCLM Coordinate Relay ladder Motion Axis Fault Reset Structured text Motion Coordinated Linear Structured text Move Motion Relay ladder Motion Axis Gear Structured text Relay ladder Master Control Reset MAHD Motion Relay ladder. Instruction Locator Instruction Location Languages Instruction Location Languages MGSR Motion Relay ladder Relay ladder Motion Group Shutdown Structured text No Operation Reset Relay ladder Relay ladder Bitwise NOT Structured text Middle String Structured text Function block MINC Process control Structured text NTCH Process control Structured text. Instruction Locator Instruction Location Languages Instruction Location Languages Relay ladder Process control Structured text Proportional Integral Structured text Scale Function block Derivative SCRV Process control Structured text Process control Structured text S-Curve Function block Proportional + Integral Function block Process control Function block PMUL Process control. Instruction Locator Instruction Location Languages Instruction Location Languages STOR Relay ladder Relay ladder String To REAL Structured text X to the Power of Y Structured text Function block Relay ladder Subtract Structured text Function block SWPB Relay ladder Swap Byte Structured text Relay ladder Tangent. Instruction Locator Notes: Rockwell Automation Publication 1756-RM003N-EN-P - October 2011. Logix5000 controllers.

For a complete list of common procedures manuals, see the Logix5000 Controllers Common Procedures Programming Manual, publication 1756-PM001. The term Logix5000 controller refers to any controller that is based on the Logix5000 operating system, such as: CompactLogix controllers. The following icons help identify language-specific information. Icon Programming Language Relay ladder Structured text Function block Common Information for The Logix5000 instruction set has some common attributes. All Instructions Information Appendix Common attributes Common Attributes defines:. Arithmetic status flags.

Preface If an operand or parameter supports more than one data type, the bold data types indicate optimal data types. An instruction executes faster and requires less memory if all the operands of the instruction use the same optimal data type, typically DINT or REAL.

Preface Function Block States When programming in function block, restrict the range of IMPORTANT +/-15 engineering units to +/-10 because internal floating point calculations are done by using single precision floating point. Engineering units outside of this range may result in a loss of accuracy if results approach the limitations of single precision +/-38 floating point (+/-10. Preface Additional Resources See these manuals and documents for more information about using motion modules in a Logix5000 control system. Publication Publication Number Logix5000 Controllers Common Procedures 1756-PM001 Programming Manual Motion Coordinate System User Manual MOTION-UM002 Logix5000 Controllers Motion Instructions.

Preface Notes: Rockwell Automation Publication 1756-RM003N-EN-P - October 2011. Chapter FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Topic Page Digital Alarm (ALMD) Analog Alarm (ALMA) Configure an Alarm Instruction Enter Alarm Message Text Monitor Alarm Status Buffer Alarms Programmatically Access Alarm Information Suppress or Disable Alarms Controller-based Alarm Execution These Logix-based alarm instructions are available in relay ladder, structured text, and function block diagram. Chapter 1 FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Digital Alarm (ALMD) The ALMD instruction detects alarms based on Boolean (true/false) conditions.

Program (Prog) and operator (Oper) control parameters provide an interface for alarm commands. Operands: Relay Ladder In relay ladder, the alarm condition input (In) is obtained from the rung condition. FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Chapter 1 Structured Text ALMD(ALMD, In, ProgAck, The operands are the same as those for the relay ladder ALMD instruction, with a ProgReset, ProgDisable, ProgEnable); few exceptions as indicated above. Function Block Operand Type Format. Chapter 1 FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Input Parameter Data Type Description ProgAck BOOL Set by the user program to acknowledge the alarm.

Requires a cleared-to-set transition while the alarm is unacknowledged. Default is cleared. Relay Ladder Copied from the instruction operand. FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Chapter 1 Input Parameter Data Type Description AlarmCountReset BOOL Set by the user program to reset the alarm count.

A cleared-to-set transition resets the alarm count to zero. Default is cleared.

UseProgTime BOOL Specifies whether to use the controller’s clock or the ProgTime value to timestamp alarm state change events. Chapter 1 FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Output Parameter Data Type Description DeliveryEN BOOL Delivery status of the alarm notification message.

Set when delivery is in progress. Cleared when delivery is not in progress. NoSubscriber BOOL Alarm had no subscribers when attempting to deliver the most recent message. Set when there are no subscribers. FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Chapter 1 Description: The ALMD instruction detects alarms based on Boolean (true/false) conditions.

The ALMD instruction provides additional functionality when used with RSLinx Enterprise and FactoryTalk View SE software. You can display alarms in the Alarm Summary, Alarm Banner, Alarm Status Explorer, and Alarm Log Viewer displays in FactoryTalk View SE software.

Chapter 1 FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) State Diagrams when Acknowledgment Not Required Latched = False In = Condition, MinDurationACC = MinDurationPRE InAlarm = False InAlarm = True Acked = True In!= Condition Latched = True In = Condition, MinDurationACC = MinDurationPRE InAlarm = False InAlarm = True. FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Chapter 1 Condition Function Block Action Structured Text Action Prescan All operator requests, timestamps, and delivery flags are All operator requests, timestamps, and delivery flags are cleared. InAlarm is cleared and Acked is set. InAlarm is cleared and Acked is set. Chapter 1 FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) ALMD Alarm Acknowledge Required and Not Latched ALMD Alarm Acknowledge Not Required and Latched Rockwell Automation Publication 1756-RM003N-EN-P - October 2011.

FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Chapter 1 ALMD Alarm Acknowledge Not Required and Not Latched Example: Two motor failure signals are combined such that if either one occurs, a motor fault alarm is activated. Programmatically acknowledge the alarm with a cleared- to-set transition of the Motor101Ack tag value. Chapter 1 FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Structured Text Motor101FaultConditions:= Motor101Overtemp OR Motor101FailToStart; ALMD(Motor101Fault,Motor101FaultConditions, Motor101Ack,0,0,0 ); Function Block Rockwell Automation Publication 1756-RM003N-EN-P - October 2011. FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Chapter 1 Analog Alarm (ALMA) The ALMA instruction detects alarms based on the level or rate of change of an analog value. Program (Prog) and operator (Oper) control parameters provide an interface for alarm commands. Operands: Relay Ladder Operand. Chapter 1 FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Structured Text ALMA(ALMA, In, ProgAckAll, The operands are the same as those for the relay ladder ALMD instruction, with a ProgDisable, ProgEnable); few exceptions as indicated above.

Function Block Operand Type Format Description. FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Chapter 1 Input Parameter Data Type Description HEnabled BOOL High alarm condition detection. Set to enable detection of the High alarm condition. Clear to disable detection of the High alarm condition. Default is set.

LEnabled BOOL Low alarm condition detection. Chapter 1 FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Input Parameter Data Type Description ROCPosProgAck BOOL Positive rate of change program acknowledge. Set by the user program to acknowledge a positive rate-of- change condition.

Requires a cleared-to-set transition while the alarm condition is unacknowledged. Default is cleared. FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Chapter 1 Input Parameter Data Type Description HHSeverity DINT Severity of the High High alarm condition. This does not affect processing of alarms by the controller, but can be used for sorting and filtering functions at the alarm subscriber. Valid = 1.1000 (1000 = most severe. Chapter 1 FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Input Parameter Data Type Description ROCPosSeverity DINT Severity of the increasing rate-of-change condition. This does not affect processing of alarms by the controller, but can be used for sorting and filtering functions at the alarm subscriber.

Valid = 1.1000 (1000 = most severe. FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Chapter 1 Output Parameter Data Type Description ROCPosAcked BOOL Positive rate-of-change condition acknowledged status. Set when a positive rate-of-change condition is acknowledged.

Always set when AckRequired is cleared. Cleared when a positive rate-of-change condition is not acknowledged. Chapter 1 FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Output Parameter Data Type Description ROCPosInAlarmCount DINT The number of times the positive rate-of-change condition has been activated. If the maximum value is reached, the counter leaves the value at the maximum count value. ROCNegInAlarmTime LINT Timestamp when the ALMA instruction detected that the In value exceeded the negative rate-of. FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Chapter 1 Output Parameter Data Type Description SeverityInv (Status.2) BOOL Alarm severity configuration is invalid.

If severity 1000, the instruction uses Severity = 1000. AlarmLimitsInv (Status.3) BOOL Alarm Limit configuration is invalid (for example, LLimit = HLimit, MinDurationACC = MinDurationPRE HInAlarm = False HInAlarm = True HAcked = True In = MinDurationPRE LInAlarm = False LInAlarm = True LAcked = True. Chapter 1 FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Execution: Condition Relay Ladder Action Prescan The rung-condition-out is set to false. All the xInAlarm parameters are cleared and all alarm conditions are acknowledged. All operator requests, timestamps, and delivery flags are cleared. Rung-condition-in is false The instruction does not execute. FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Chapter 1 ALMA Level Condition Acknowledge Required Rockwell Automation Publication 1756-RM003N-EN-P - October 2011.

Chapter 1 FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) ALMA Level Condition Acknowledge Not Required Rockwell Automation Publication 1756-RM003N-EN-P - October 2011. FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Chapter 1 ALMA Rate of Change Acknowledge Required Rockwell Automation Publication 1756-RM003N-EN-P - October 2011. Chapter 1 FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) ALMA Rate of Change Acknowledge Not Required Rockwell Automation Publication 1756-RM003N-EN-P - October 2011. FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Chapter 1 Example: A tank alarm is activated if the tank level surpasses a High or High High limit. Programmatically acknowledge all the alarm conditions with a cleared-to-set transition of the Tank32LevelAck tag value. The application logic must clear Tank32LevelAck.

Chapter 1 FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Configure an Alarm After you enter an ALMD or ALMA instruction and specify the alarm tag name, Instruction use the Alarm Configuration dialog to specify the details of the message. The Properties dialog for the alarm instruction includes a Configuration tab.

FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Chapter 1 Option Description Severity Select a severity range from 11000 to rank the importance of an alarm condition. A severity of 1 is for low priority alarms; a severity of 1000 is for an emergency condition. By default, in the FactoryTalk Alarms and Events system, severity ranges are mapped to priorities as follows:.

Chapter 1 FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Enter Alarm Message Text Enter appropriate message text to display when an alarm condition is active (InAlarm). For an ALMD instruction, you enter the message information on the Configuration tab. For an ALMA instruction, you enter the message information on the Message tab.

FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Chapter 1 Message String Variables Variable Embeds in the message string Default code added to message string Alarm name The name of the alarm, which consists of the controller /.S:0%AlarmName./ name, program name, and tag name. For example, Zone1ControllerProgram:Main.MyAlarmTagName. Chapter 1 FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) All of this variable information is included with the alarm data, viewable by the operator, and entered in the history log, regardless of whether you embed the information in the message text. Multiple Language Versions of Alarm Messages You can maintain alarm messages in multiple languages. FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Chapter 1 Monitor Alarm Status On the Status tab of the alarm dialog, monitor the alarm condition, acknowledge an alarm, disable an alarm, suppress an alarm, or reset an alarm.

Use the dialog selections to see how an alarm behaves, without needing an operational HMI. Chapter 1 FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Buffer Alarms In order to receive controller-based alarm messages, alarm clients (such as an RSLinx Enterprise server) must establish a subscription to the alarms in the Logix controller. The controller maintains a connection to each subscriber and monitors the status of that connection. FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Chapter 1 Programmatically Access Each alarm instruction has an alarm structure that stores alarm configuration and Alarm Information execution information.

Controllogix Training

Reference

The alarm structure includes both Program and Operator control elements and operator elements. The alarm instructions do not use mode settings to determine whether program access or operator access is active, so these elements are always active. Chapter 1 FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) When you create an alarm instruction, you must create and assign a tag of the correct alarm data type for that alarm. For example, create MyDigitalAlarm of data type ALARMDIGITAL.

In relay ladder, these instruction parameters must be entered on the instruction:. FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Chapter 1 Suppress or Disable Alarms Suppress alarms to remove alarms you know exist from the HMI but still keep the alarms alive. This lets you clear the alarm summary while you are resolving a known alarm without continuing to view alarm information. Chapter 1 FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Controller-based Alarm Controller-based alarms process inputs from two sources.

Execution Source Description Alarm tag members Alarm tag members are, for the most part, processed when the user application scans the alarm instruction. FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Chapter 1 Use care when determining where to place alarm instructions in the application. The accuracy of the timestamps are affected by how quickly the instruction is scanned after the alarm condition changes state. MinDuration time accumulation and Rate of Change calculations require repeated scanning, within time intervals determined by the user application. Chapter 1 FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Typically 2.2 KB per analog alarm with no associated tags Analog Alarm Example Approximate Size Analog alarm with no associated tags and this configuration: 2228 bytes HH Alarm message: Level Alarm. FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Chapter 1 Longer message strings, as well as message strings for multiple languages, consume additional memory from your controller.

Actual memory usage will depend on how the alarm is configured, message length, and any associated tags passed with the alarm. Scan Time These execution times show how ALMD instructions and ALMA instructions affect total scan time.

Chapter 1 FactoryTalk Alarms and Events Logix-based Instructions (ALMD, ALMA) Notes: Rockwell Automation Publication 1756-RM003N-EN-P - October 2011. Chapter Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Topic Page Bit Addressing Examine If Closed (XIC) Examine If Open (XIO) Output Energize (OTE) Output Latch (OTL) Output Unlatch (OTU) One Shot (ONS) One Shot Rising (OSR) One Shot Falling (OSF) One Shot Rising with Input (OSRI) One Shot Falling with Input (OSFI). Chapter 2 Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Bit Addressing Bits in a Logix controller exist in one of several forms:. BOOL tag. BOOL array. Bits within an integer (SINT, INT, or DINT) tag. Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Chapter 2 Example: Indirect Serial Bit Reference in a DINT array MyBits: DINT10 BitRef: DINT EndTag MOV(34,BitRef ) XIC(MyBits(BitRef AND NOT 31)/32.BitRef AND 31) Explanation (BitRef AND NOT 31)/32=Calculates the element in the DINT.BitRef AND 31=Calculates the bit within the element If the tag MyBits is defined as an INT or SINT, the mask value would be 15 or 7, respectively.

Chapter 2 Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Examine If Closed (XIC) The XIC instruction examines the data bit to see if it is set. Operands: Relay Ladder Operand Type Format Description Data bit BOOL Bit to be tested Structured Text. Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Chapter 2 Execution: Condition Relay Ladder Action Prescan The rung-condition-out is set to false. Rung-condition-in is false The rung-condition-out is set to false. Rung-condition-in is true Data Bit = 0 Rung-condition-out Examine data bit. Chapter 2 Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Example 1: If limitswitch1 is set, this enables the next instruction (the rung-condition-out is true).

Relay Ladder Structured Text IF limitswitch THEN; ENDIF; Example 2: If S:V is set (indicates that an overflow has occurred), this enables the next instruction (the rung-condition-out is true). Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Chapter 2 Examine If Open (XIO) The XIO instruction examines the data bit to see if it is cleared. Operands: Relay Ladder Operand Type Format Description Data bit BOOL Bit to be tested Structured Text. Chapter 2 Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Execution: Condition Relay Ladder Action Prescan The rung-condition-out is set to false. Rung-condition-in is false The rung-condition-out is set to false.

Rung-condition-in is true Data Bit = 0 Rung-condition-out Examine data bit. Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Chapter 2 Example 1: If limitswitch2 is cleared, this enables the next instruction (the rung-condition- out is true). Relay Ladder Structured Text IF NOT limitswitch2 THEN; ENDIF; Example 2: If S:V is cleared (indicates that no overflow has occurred), this enables the next instruction (the rung-condition-out is true). Chapter 2 Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Output Energize (OTE) The OTE instruction sets or clears the data bit. Operands: Relay Ladder Operand Type Format Description Data bit BOOL Bit to be set or cleared Structured Text Structured text does not have an OTE instruction, but you can achieve the same results by using a non-retentive assignment. Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Chapter 2 Example: When switch is set, the OTE instruction sets (turns on) light1.

When switch is cleared, the OTE instruction clears (turns off ) light1. Relay Ladder Structured Text light1 := switch. Chapter 2 Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Output Latch (OTL) The OTL instruction sets (latches) the data bit. Operands: Relay Ladder Operand Type Format Description Data bit BOOL Bit to be set Structured Text Structured text does not have an OTL instruction, but you can achieve the same results by using an IF.THEN construct and an assignment. Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Chapter 2 Example: When enabled, the OTL instruction sets light2. This bit remains set until it is cleared, typically by an OTU instruction. Relay Ladder Structured Text IF BOOLexpression THEN light2:= 1.

Chapter 2 Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Output Unlatch (OTU) The OTU instruction clears (unlatches) the data bit. Operands: Relay Ladder Operand Type Format Description Data bit BOOL Bit to be cleared Structured Text Structured text does not have an OTU instruction, but you can achieve the same results by using an IF.THEN construct and an assignment. Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Chapter 2 Example: When enabled, the OTU instruction clears light2. Relay Ladder Structured Text IF BOOLexpression THEN light2:= 0; ENDIF; Rockwell Automation Publication 1756-RM003N-EN-P - October 2011. Chapter 2 Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) One Shot (ONS) The ONS instruction enables or disables the remainder of the rung, depending on the status of the storage bit. Operands: Relay Ladder Operand Type Format Description.

Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Chapter 2 Execution: Condition Relay Ladder Action Prescan The storage bit is set to prevent an invalid trigger during the first scan. The rung-condition-out is set to false. Rung-condition-in is false The storage bit is cleared. Chapter 2 Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Example: You typically precede the ONS instruction with an input instruction because you scan the ONS instruction when it is enabled and when it is disabled for it to operate correctly. Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Chapter 2 One Shot Rising (OSR) The OSR instruction sets or clears the output bit, depending on the status of the storage bit. This instruction is available in structured text and function block as OSRI, page 109. Chapter 2 Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Execution: Condition Relay Ladder Action Prescan.

The storage bit is set to prevent an invalid trigger during the first scan. The output bit is cleared. The rung-condition-out is set to false. Rung-condition-in is false.

Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Chapter 2 One Shot Falling (OSF) The OSF instruction sets or clears the output bit depending on the status of the storage bit. This instruction is available in structured text and function block as OSFI, see page 112.

Chapter 2 Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Execution: Condition Relay Ladder Action Prescan. The storage bit is cleared to prevent an invalid trigger during the first scan. The output bit is cleared. The rung-condition-out is set to false.

Rung-condition-in is false. Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Chapter 2 One Shot Rising with Input The OSRI instruction sets the output bit for one execution cycle when the input (OSRI) bit toggles from cleared to set. This instruction is available in relay ladder as OSR, see page 105. Chapter 2 Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Description: When InputBit is set and InputBit is cleared, the OSRI instruction sets OutputBit. When InputBit is set or when InputBit is cleared, the OSRI instruction clears OutputBit.

InputBit InputBit OutputBit. Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Chapter 2 Example: When limitswitch1 goes from cleared to set, the OSRI instruction sets OutputBit for one scan. Structured Text OSRI01.InputBit:= limitswitch1; OSRI(OSRI01); State:= OSRI01.OutputBit; Function Block Rockwell Automation Publication 1756-RM003N-EN-P - October 2011. Chapter 2 Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) One Shot Falling with Input The OSFI instruction sets the OutputBit for one execution cycle when the (OSFI) InputBit toggles from set to cleared. This instruction is available in relay ladder as OSF, see page 107. Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Chapter 2 Description: When the InputBit is cleared and the InputBit is set, the OSFI instruction sets the OutputBit.

When InputBit is cleared or when InputBit is set, the OSFI instruction clears the OutputBit. Chapter 2 Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Example: When limitswitch1 goes from set to cleared, the OSFI instruction sets OutputBit for one scan. Structured Text OSFI01.InputBit:= limitswitch1; OSFI(OSFI01); Outputstate:= OSFI01.OutputBit; Function Block Rockwell Automation Publication 1756-RM003N-EN-P - October 2011.

Chapter Timer and Counter Instructions (TON, TOF, RTO, TONR, TOFR, RTOR, CTU, CTD, CTUD, RES) Topic Page Timer On Delay (TON) Timer Off Delay (TOF) Retentive Timer On (RTO) Timer On Delay with Reset (TONR) Timer Off Delay with Reset (TOFR) Retentive Timer On with Reset (RTOR) Count Up (CTU) Count Down (CTD). Chapter 3 Timer and Counter Instructions (TON, TOF, RTO, TONR, TOFR, RTOR, CTU, CTD, CTUD, RES) Timer On Delay (TON) The TON instruction is a non-retentive timer that accumulates time when the instruction is enabled (rung-condition-in is true).

This instruction is available in structured text and function block as TONR. Operands: Relay Ladder Operand. Timer and Counter Instructions (TON, TOF, RTO, TONR, TOFR, RTOR, CTU, CTD, CTUD, RES) Chapter 3 When the TON instruction is disabled, the.ACC value is cleared. Rung-condition-in Timer Enable Bit (.EN) Timer Timing Bit (.TT) Timer Done Bit (.DN) Dela Preset Timer did not.

Chapter 3 Timer and Counter Instructions (TON, TOF, RTO, TONR, TOFR, RTOR, CTU, CTD, CTUD, RES) Execution: Condition Relay Ladder Action Prescan The.EN,.TT, and.DN bits are cleared. The.ACC value is cleared. The rung-condition-out is set to false. Rung-condition-in is false The.EN,.TT, and.DN bits are cleared. Timer and Counter Instructions (TON, TOF, RTO, TONR, TOFR, RTOR, CTU, CTD, CTUD, RES) Chapter 3 Example: When limitswitch1 is set, light2 is on for 180 ms (timer1 is timing).

When timer1.acc reaches 180, light2 goes off and light3 goes on. Light3 remains on until the TOF instruction is disabled. Chapter 3 Timer and Counter Instructions (TON, TOF, RTO, TONR, TOFR, RTOR, CTU, CTD, CTUD, RES) Timer Off Delay (TOF) The TOF instruction is a non-retentive timer that accumulates time when the instruction is enabled (rung-condition-in is false). This instruction is available in structured text and function block as TOFR.

Timer and Counter Instructions (TON, TOF, RTO, TONR, TOFR, RTOR, CTU, CTD, CTUD, RES) Chapter 3 When the TOF instruction is disabled, the.ACC value is cleared. Rung-condition-in Timer Enable Bit (.EN) Timer Timing Bit (.TT) Timer Done Bit (.DN) OFF Delay Preset Timer Accumulated Value (.ACC). Chapter 3 Timer and Counter Instructions (TON, TOF, RTO, TONR, TOFR, RTOR, CTU, CTD, CTUD, RES) Execution: Condition Relay Ladder Action Prescan The.EN,.TT, and.DN bits are cleared. The.ACC value is set to equal the.PRE value. The rung-condition-out is set to false.

Timer and Counter Instructions (TON, TOF, RTO, TONR, TOFR, RTOR, CTU, CTD, CTUD, RES) Chapter 3 Example: When limitswitch2 is cleared, light2 is on for 180 ms (timer2 is timing). When timer2.acc reaches 180, light2 goes off and light3 goes on. Light3 remains on until the TOF instruction is enabled. Chapter 3 Timer and Counter Instructions (TON, TOF, RTO, TONR, TOFR, RTOR, CTU, CTD, CTUD, RES) Retentive Timer On (RTO) The RTO instruction is a retentive timer that accumulates time when the instruction is enabled.

This instruction is available in structured text and function block as RTOR. Timer and Counter Instructions (TON, TOF, RTO, TONR, TOFR, RTOR, CTU, CTD, CTUD, RES) Chapter 3 Description: The RTO instruction accumulates time until it is disabled. When the RTO instruction is disabled, it retains its.ACC value. You must clear the.ACC value, typically with a RES instruction referencing the same TIMER structure.

Chapter 3 Timer and Counter Instructions (TON, TOF, RTO, TONR, TOFR, RTOR, CTU, CTD, CTUD, RES) Arithmetic Status Flags: Not affected Fault Conditions: A major fault will occur if Fault type Fault code.PRE = value2); Function Block Rockwell Automation Publication 1756-RM003N-EN-P - October 2011. Chapter 5 Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ) Greater Than (GRT) The GRT instruction tests whether Source A is greater than Source B. Operands: Relay Ladder Operand Type Format Description Source A SINT Immediate Tag Value to test against Source B DINT REAL. Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ) Chapter 5 Function Block Operand Type Format Description GRT tag FBDCOMPARE Structure GRT structure FBDCOMPARE Structure Input Parameter Data Type Description EnableIn BOOL Enable input. If cleared, the instruction does not execute and outputs are not updated. Default is set.

Pesticide Safety Reference Manual

Chapter 5 Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ) Fault Conditions: None Execution: Relay Ladder Condition Action Prescan The rung-condition-out is set to false. Rung-condition-in is false The rung-condition-out is set to false.

Rung-condition-in is true Rung-condition-out is set Source A. Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ) Chapter 5 Example: If value1 is greater than value2, set light1. If value1 is less than or equal to value2, clear light1. Relay Ladder Structured Text light1:= (value1 value2); Function Block Rockwell Automation Publication 1756-RM003N-EN-P - October 2011. Chapter 5 Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ) Less Than or Equal To (LEQ) The LEQ instruction tests whether Source A is less than or equal to Source B. Operands: Relay Ladder Operand Type Format Description Source A SINT.

Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ) Chapter 5 Function Block Operand Type Format Description LEQ tag FBDCOMPARE Structure LEQ structure FBDCOMPARE Structure Input Parameter Data Type Description EnableIn BOOL Enable input. If cleared, the instruction does not execute and outputs are not updated.

Controllogix 5000 Manual

Default is set. Chapter 5 Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ) Fault Conditions: None Execution: Relay Ladder Condition Action Prescan The rung-condition-out is set to false. Rung-condition-in is false The rung-condition-out is set to false. Rung-condition-in is true Rung-condition-out is set Source A ≤. Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ) Chapter 5 Example: If value1 is less than or equal to value2, set light2. If value1 is greater than value2, clear light2.

Relay Ladder Structured Text light2:= (value1 100, clear light1. Relay Ladder Structured Text IF (value = 0 AND value = 100 AND value = 100)) THEN light1:= 1. Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ) Chapter 5 Example 2: Low Limit ≥ High Limit: When value ≥ 0 or value ≤ −100, set light1.

If value −100, clear light1. Relay Ladder Structured Text IF (0 = 0 AND value = -100 AND(value = -100)) THEN. Chapter 5 Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ) Mask Equal To (MEQ) The MEQ instruction passes the Source and Compare values through a Mask and compares the results. Operands: Relay Ladder Operand Type Format Description Source SINT Immediate Tag.

Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ) Chapter 5 FBDMASKEQUAL Structure Input Parameter Data Type Description EnableIn BOOL If cleared, the instruction does not execute and outputs are not updated. If set, the instruction executes as described under Execution. Default is set. Chapter 5 Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ) Arithmetic Status Flags: Not affected Fault Conditions: None Execution: Relay Ladder Condition Action Prescan The rung-condition-out is set to false. Rung-condition-in is false The rung-condition-out is set to false.

Rung-condition-in is true Masked Source = Rung-condition-out is set. Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ) Chapter 5 Example 1: If the masked value1 is equal to the masked value2, set light1. If the masked value1 is not equal to the masked value2, clear light1. This example shows that the masked values are equal.

Chapter 5 Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ) Example 2: If the masked value1 is equal to the masked value2, set light1. If the masked value1 is not equal to the masked value2, clear light1.

This example shows that the masked values are not equal. Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ) Chapter 5 Not Equal To (NEQ) The NEQ instruction tests whether Source A is not equal to Source B. Operands: Relay Ladder Operand Type Format Description Source A SINT Immediate Tag Value to test against Source B DINT. Chapter 5 Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ) Function Block Operand Type Format Description NEQ tag FBDCOMPARE Structure NEQ structure FBDCOMPARE Structure Input Parameter Data Type Description EnableIn BOOL Enable input. If cleared, the instruction does not execute and outputs are not updated. Default is set. Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ) Chapter 5 Execution: Relay Ladder Condition Action Prescan The rung-condition-out is set to false.

Rung-condition-in is false The rung-condition-out is set to false. Rung-condition-in is true Rung-condition-out is set Source A = Source B to true.

Chapter 5 Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ) Example: If value1 is not equal to value2, set light4. If value1 is equal to value2, clear light4. Relay Ladder Structured Text light4:= (value1 value2); Function Block Rockwell Automation Publication 1756-RM003N-EN-P - October 2011. Chapter Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Topic Page Compute (CPT) Add (ADD) Subtract (SUB) Multiply (MUL) Divide (DIV) Modulo (MOD) Square Root (SQR) Negate (NEG) Absolute Value (ABS) The compute/math instructions evaluate arithmetic operations by using an expression or a specific arithmetic instruction. Chapter 6 Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) If you want to Use this instruction Available in these languages Page Calculate the square root of a value Relay ladder SQRT Structured text Function block Take the opposite sign of a value Relay ladder Structured text. Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Chapter 6 Description: The CPT instruction performs the arithmetic operations you define in the expression.

When enabled, the CPT instruction evaluates the expression and places the result in the Destination. The execution of a CPT instruction is slightly slower and uses more memory than the execution of the other compute/math instructions.

Chapter 6 Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Valid Operators Operator Description Optimal Operator Description Optimal DINT, REAL modulo-divide DINT, REAL subtract/negate DINT, REAL bitwise complement DINT multiply DINT, REAL bitwise OR DINT divide DINT, REAL degrees to radians DINT, REAL. Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Chapter 6 Determine the Order of Operation The operations you write into the expression are performed by the instruction in a prescribed order, not necessarily the order you write them. You can override the order of operation by grouping terms within parentheses, forcing the instruction to perform an operation within the parentheses ahead of other operations.

Chapter 6 Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Add (ADD) The ADD instruction adds Source A to Source B and places the result in the Destination. Operands: Relay Ladder Operand Type Format Description Source A SINT Immediate Tag Value to add to Source B. Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Chapter 6 FBDMATH Structure Input Parameter Data Type Description EnableIn BOOL Enable input. If cleared, the instruction does not execute and outputs are not updated. Default is set. SourceA REAL Value to add to SourceB.

Chapter 6 Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Example: Add floatvalue1 to floatvalue2 and place the result in addresult. Relay Ladder Structured Text addresult:= floatvalue1 + floatvalue2; Function Block Rockwell Automation Publication 1756-RM003N-EN-P - October 2011. Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Chapter 6 Subtract (SUB) The SUB instruction subtracts Source B from Source A and places the result in the Destination. Operands: Relay Ladder Operand Type Format Description Source A SINT Immediate Tag Value from which to subtract Source B.

Chapter 6 Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) FBDMATH Structure Input Parameter Data Type Description EnableIn BOOL Enable input. If cleared, the instruction does not execute and outputs are not updated. Default is set. SourceA REAL Value from which to subtract SourceB. Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Chapter 6 Example: Subtract floatvalue2 from floatvalue1 and place the result in subtractresult. Relay Ladder Structured Text subtractresult:= floatvalue1 - floatvalue2; Function Block Rockwell Automation Publication 1756-RM003N-EN-P - October 2011.

Chapter 6 Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Multiply (MUL) The MUL instruction multiplies Source A with Source B and places the result in the Destination. Operands: Relay Ladder Operand Type Format Description Source A SINT Immediate Tag Value of the multiplicand. Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Chapter 6 FBDMATH Structure Input Parameter Data Type Description EnableIn BOOL Enable input. If cleared, the instruction does not execute and outputs are not updated. Default is set. Source A REAL Value of the multiplicand. Chapter 6 Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Example: Multiply floatvalue1 by floatvalue2 and place the result in multiplyresult.

Relay Ladder Structured Text multiplyresult:= floatvalue1 ∗ floatvalue2; Function Block Rockwell Automation Publication 1756-RM003N-EN-P - October 2011. Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Chapter 6 Divide (DIV) The DIV instruction divides Source A by Source B and places the result in the Destination. Operands: Relay Ladder Operand Type Format Description Source A SINT Immediate Tag Value of the dividend. Chapter 6 Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) FBDMATH Structure Input Parameter Data Type Description EnableIn BOOL Enable input. If cleared, the instruction does not execute and outputs are not updated. Default is set.

Source A REAL Value of the dividend. Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Chapter 6 To detect a possible divide-by-zero, examine the minor fault bit (S:MINOR). See Logix5000 Controllers Common Procedures Programming Manual, publication 1756-PM001. Arithmetic Status Flags: Arithmetic status flags are affected.

Chapter 6 Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Structured Text divideresult:= floatvalue1 / floatvalue2; Function Block Example 2: The DIV and MOV instructions work together to divide two integers, round the result, and place the result in an integer tag:. Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Chapter 6 Modulo (MOD) The MOD instruction divides Source A by Source B and places the remainder in the Destination. Operands: Relay Ladder Operand Type Format Description Source A SINT Immediate Tag Value of the dividend. Chapter 6 Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) FBDMATH Structure Input Parameter Data Type Description EnableIn BOOL Enable input.

If cleared, the instruction does not execute and outputs are not updated. Default is set. Source A REAL Value of the dividend.

Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Chapter 6 To detect a possible divide-by-zero, examine the minor fault bit (S:MINOR). See Logix5000 Controllers Common Procedures Programming Manual, publication 1756-PM001. Arithmetic Status Flags: Arithmetic status flags are affected. Chapter 6 Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Example: Divide dividend by divisor and place the remainder in remainder.

In this example, three goes into 10 three times, with a remainder of one. Relay Ladder Structured Text remainder:= dividend MOD divisor. Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Chapter 6 Square Root (SQR) The SQR instruction computes the square root of the Source and places the result in the Destination.

Operands: Relay Ladder Operand Type Format Description Source SINT. Chapter 6 Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Description: If the Destination is not a REAL, the instruction handles the fractional portion of the result as follows: If the source is Then the fractional Example portion of the result Not a REAL. Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Chapter 6 Example: Calculate the square root of value1 and place the result in sqrresult. Relay Ladder Structured Text sqrresult:= SQRT(value1); Function Block Rockwell Automation Publication 1756-RM003N-EN-P - October 2011. Chapter 6 Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Negate (NEG) The NEG instruction changes the sign of the Source and places the result in the Destination. Operands: Relay Ladder Operand Type Format Description Source SINT Immediate Tag Value to negate. Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Chapter 6 Description: If you negate a negative value, the result is positive.

If you negate a positive value, the result is negative. Arithmetic Status Flags: Arithmetic status flags are affected. Fault Conditions: None Execution. Chapter 6 Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Example: Change the sign of value1 and place the result in negateresult. Relay Ladder Structured Text negateresult:= -value1; Function Block Rockwell Automation Publication 1756-RM003N-EN-P - October 2011. Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Chapter 6 Absolute Value (ABS) The ABS instruction takes the absolute value of the Source and places the result in the Destination.

Operands: Relay Ladder Operand Type Format Description Source SINT. Chapter 6 Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Description: The ABS instruction takes the absolute value of the Source and places the result in the Destination.

Arithmetic Status Flags: Arithmetic status flags are affected. Fault Conditions: None Execution. Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Chapter 6 Example: Place the absolute value of value1 into value1absolute. In this example, the absolute value of negative four is positive four. Relay Ladder Structured Text value1absolute:= ABS(value1); Function Block Rockwell Automation Publication 1756-RM003N-EN-P - October 2011. Chapter 6 Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) Notes: Rockwell Automation Publication 1756-RM003N-EN-P - October 2011.