Allen-Bradley MicroLogix 1400 Instruction Manual

Allen-Bradley MicroLogix 1400 Instruction Manual

Programmable controllers
Hide thumbs Also See for MicroLogix 1400:
Table of Contents

Advertisement

efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive
MicroLogix 1400
Programmable
Controllers
Bulletins 1766
Instruction Set Reference
Manual

Advertisement

Table of Contents
loading

Summary of Contents for Allen-Bradley MicroLogix 1400

  • Page 1 - Allen Bradley,Rockwell,plc,servo,drive MicroLogix 1400 Programmable Controllers Bulletins 1766 Instruction Set Reference Manual...
  • Page 2 BURN HAZARD to alert people that surfaces may reach dangerous temperatures. Rockwell Automation, Allen-Bradley, TechConnect, SLC 5/02, SLC 5/03, PLC-5, MicroLogix, SLC 500, RSLogix, RSLogix Micro, RSLinx, and RSLogix 500 are trademarks of Rockwell Automation, Inc. Trademarks not belonging to Rockwell Automation are property of their respective companies.
  • Page 3 Programmable Firmware Revision Catalog Numbers Controller MicroLogix 1400 Series A, Revision A, FRN 3 1766-L32AWA, 1766-L32BWA, 1766-L32BXB, 1766-L32AWAA, 1766-L32BWAA and 1766-L32BXBA controllers To upgrade the firmware for a MicroLogix controller visit the MicroLogix web site at http://www.ab.com/micrologix.
  • Page 4 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Summary of Changes Notes: Publication 1766-RM001A-EN-P - October 2008...
  • Page 5: Table Of Contents

    Embedded I/O ........16 MicroLogix 1400 Expansion I/O ..... . . 17 MicroLogix 1400 Expansion I/O Memory Mapping.
  • Page 6 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Table of Contents Programming Instructions Instruction Set ........91 Overview Using the Instruction Descriptions .
  • Page 7 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Table of Contents EQU - Equal NEQ - Not Equal ....... . . 191 GRT - Greater Than LES - Less Than .
  • Page 8 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Table of Contents ENC - Encode 1-of-16 to 4 ........245 FRD - Convert from Binary Coded Decimal (BCD) .
  • Page 9 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Table of Contents Chapter 18 Input and Output Instructions IIM - Immediate Input with Mask ..... 303 IOM - Immediate Output with Mask .
  • Page 10 Communication Channel ......445 Configuring a MicroLogix 1400 CIP Generic Message via Ethernet MSG Instruction Error Codes ......466 Special Function with MSG instruction .
  • Page 11 LCD - LCD Instruction ......542 Appendix A MicroLogix 1400 Memory Programming Instructions Memory usage and Execution Time 545...
  • Page 12 Hex Mask ........665 Glossary Index MicroLogix 1400 List of Instructions and Function Files Publication 1766-RM001A-EN-P - October 2008...
  • Page 13: Preface

    If you do not, obtain the proper training before using this product. Purpose of this Manual This manual is a reference guide for MicroLogix 1400 controller. It describes the procedures you use to program and troubleshoot your controller. This manual: •...
  • Page 14 Read this Document Document Number Information on understanding and applying micro controllers. MicroMentor 1761-MMB Information on mounting and wiring the MicroLogix 1400 Programmable MicroLogix 1400 Programmable 1766-IN001 Controller, including a mounting template and door labels. Controllers Installation Instructions Detailed information on planning, mounting, wiring, and troubleshooting...
  • Page 15: Who Should Use This Manual

    I/O Configuration This section discusses the various aspects of Input and Output features of the MicroLogix 1400 controllers. Each controller comes with a certain amount of embedded I/O, which is physically located on the controller. The controller also allows for adding expansion I/O.
  • Page 16: Related Documentation

    - Allen Bradley,Rockwell,plc,servo,drive I/O Configuration Embedded I/O The MicroLogix 1400 provide discrete I/O and analog input that is built into the controller as listed in the following table. These I/O points are referred to as Embedded I/O. Catalog Description...
  • Page 17 Expansion I/O Expansion I/O Modules For the MicroLogix 1400, Bulletin 1762 expansion I/O is used to provide discrete and analog inputs and outputs and, in the future, specialty modules. You can attach up to seven expansion I/O modules in any combination.
  • Page 18: I/O Configuration

    - Allen Bradley,Rockwell,plc,servo,drive I/O Configuration MicroLogix 1400 Discrete I/O Configuration Expansion I/O Memory Mapping 1762-IA8 ,1762-IQ8, and 1762-IQ8OW6 Input Image For each input module, the input data file contains the current state of the field input points. Bit positions 0…7 correspond to input terminals 0…7.
  • Page 19: Micrologix 1400 Expansion I/O

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive I/O Configuration Bit Position r/w r/w r/w r/w r/w r/w r/w r/w r/w = read and write, 0 = always at a 0 or OFF state 1762-OB16 and 1762-OW16 Output Image For each output module, the output data file contains the controller-directed state of the discrete output points.
  • Page 20: Micrologix 1400 Expansion I/O Memory Mapping

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive I/O Configuration Analog I/O Configuration The following table shows the data ranges for 0…10V dc and 4…20 mA. Valid Input/Output Data Word Formats/Ranges Normal Operating Full Scale Raw/Proportional Data Scaled-for-PI Range Range 0…10V dc 10.5V dc 32,760 16,380 0.0V dc...
  • Page 21 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive I/O Configuration Scaled-for-PID Format Bit Position Channel 0 Data 0 to 16,383 Channel 1 Data 0 to 16,383 Reserved Reserved Reserved Reserved The bits are defined as follows: • Sx = General status bits for channels 0 and 1. This bit is set when an error (over- or under-range) exists for that channel, or there is a general module hardware error.
  • Page 22 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive I/O Configuration 1762-IF4 Input Data File For each module, slot x, words 0 and 1 contain the analog values of the inputs. The module can be configured to use either raw/proportional data or scaled-for-PID data. The input data file for either configuration is shown below.
  • Page 23 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive I/O Configuration 1762-OF4 Input Data File Bit Position 15 14 13 12 11 10 9 0 Reserved SO3 SO2 SO1 SO0 1 Reserved UO0 OO0 UO1 OO1 UO2 OO2 UO3 OO3 The bits are defined as follows: •...
  • Page 24 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive I/O Configuration Scaled-for-PID Format Bit Position Channel 0 Data 0 to 16,380 Channel 1 Data 0 to 16,380 Channel 2 Data 0 to 16,380 Channel 3 Data 0 to 16,380 Words 0…3 contain the analog output data for channels 0…3, respectively.
  • Page 25 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive I/O Configuration Specialty I/O Configuration 1762-IR4 RTD/Resistance Module Input Data File For each module, slot x, words 0…3 contain the analog values of the inputs. Words 4 and 5 provide sensor/channel status feedback. The input data file for each configuration is shown below. Table: 0.A d/Bit Analog Input Data Channel 0...
  • Page 26 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive I/O Configuration 1762-IT4 Thermocouple Module Input Data File For each module, slot x, words 0…3 contain the analog values of the inputs. The input data file is shown below. Table: 0.B d/Bit Analog Input Data Channel 0 Analog Input Data Channel 1 Analog Input Data Channel 2 Analog Input Data Channel 3...
  • Page 27 Slot number (decimal) Embedded I/O: slot 0 Expansion I/O: slots 1…7 for MicroLogix 1400 (See page 17 for an illustration.) Word delimiter. Required only if a word number is necessary as noted below. Word number Required to read/write words, or if the discrete bit number is above 15.
  • Page 28 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive I/O Configuration Addressing examples Word addressing O:1.0 Output slot 1 (expansion I/O) Word 0 I:7.3 Input slot 7 (expansion I/O) Word 3 I:3.1 Input slot 3 (expansion I/O) Word 1 (1) The optional Data File Number is not shown in these examples. (2) A word delimiter and number are not shown.
  • Page 29: I/O Addressing

    If you force an output controlled by an executing PTOX or PWMX function, an instruction error is generated. Input Filtering The MicroLogix 1400 controllers allow users to configure groups of DC inputs for high-speed or normal operation. Users can configure each input group’s response time. A configurable filter determines how long the input signal must be “on”...
  • Page 30 User Manual. Analog Inputs The MicroLogix 1400 -L32BWAA, -L32AWAA, and -L32BXBA support 4-channel, 12-bit resolution analog input with four 12-bit resolution analog input channels. These channels are single-ended (unipolar) circuits and accept 0…10V DC.
  • Page 31: I/O Forcing

    I/O Configuration Analog Input Filter and Update times The MicroLogix 1400 analog input filter is programmable. The slower the filter setting, the more immune the analog inputs are to electrical noise. The more immune the analog inputs are to electrical noise, the slower the inputs will be to update.
  • Page 32: Analog Inputs

    1200 4095 Analog Outputs The MicroLogix 1400 -L32BWAA, -L32AWAA, and -L32BXBA support 2-channel, 12-bit resolution analog output. These channels have 0…10V DC output range. Output words 4 and 5 contain the value of analog outputs (Word 4 : analog output channel 0, Word 5 : analog output channel 1).
  • Page 33 ----------- - 3000 4095 The MicroLogix 1400 controller provides the ability to individually configure inputs to be latching inputs (sometimes referred to as pulse catching inputs). A latching input is an input that captures a very fast pulse and holds it for a single controller scan. The pulse width that can be captured is dependent upon the input filtering selected for that input.
  • Page 34: Analog Outputs

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive I/O Configuration Rising Edge Behavior - Example 1 Scan Number (X) Scan Number (X+1) Scan Number (X+2) Input Ladder Output Input Ladder Output Input Ladder Output Scan Scan Scan Scan Scan Scan Scan Scan Scan External Input Latched Status...
  • Page 35: Latching Inputs

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive I/O Configuration • The detection is on the “falling edge” of the external input. • The input image is normally “on” (1), and changes to “off” (0) for one scan. Falling Edge Behavior - Example 1 Scan Number (X) Scan Number (X+1) Scan Number (X+2)
  • Page 36 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive I/O Configuration The input file value does not represent the external input when the input is IMPORTANT configured for latching behavior. When configured for falling edge behavior, the input file value is normally “on” (“off” for 1 scan when a falling edge pulse is detected).
  • Page 37: Configure Expansion

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive I/O Configuration Configure Expansion Expansion I/O must be configured for use with the controller. Configuring expansion I/O can be done either manually, or automatically. Using I/O Using RSLogix 500/ RSLogix 500/RSLogix Micro: RSLogix Micro 1. Open the Controller folder. 2.
  • Page 38 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive I/O Configuration Notes: Publication 1766-RM001A-EN-P - October 2008...
  • Page 39: Controller Memory And File Types

    Chapter Controller Memory and File Types This chapter describes controller memory and the types of files used by the MicroLogix 1400 controller. The chapter is organized as follows: • Controller Memory on page 40 • Data Files on page 45 •...
  • Page 40: Types Data Files

    Controller Memory and File Types Controller Memory File Structure MicroLogix 1400 controller user memory comprises Data Files, Function Files, and Program Files. The file types shown for data files 3…8 are the default file types for those file numbers and cannot be changed. Data files 9…255 can be added to your program to operate as bit, timer, counter, or other files shown below.
  • Page 41 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Controller Memory and File Types Controller User Memory File Types Data Files Function Files Program Files Specialty Files Bit File Selectable Timed 3…255 Program Files 3…255 Recipe File 0 Interrupt Timer File Event Input Interrupt Recipe File 1 Counter File Real Time Clock 2…255 Recipe Files 2…255...
  • Page 42 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Controller Memory and File Types User Memory User memory is the amount of controller storage available to store data such as ladder logic, data table files, and I/O configuration. User data files consist of the system status file, I/O image files, and all other user-creatable data files (bit, timer, counter, control, integer, string, long word, MSG, and PID).
  • Page 43 - Allen Bradley,Rockwell,plc,servo,drive Controller Memory and File Types MicroLogix 1400 User Memory The MicroLogix 1400 controller supports 20K of memory. Memory can be used for program files and data files. The maximum data memory usage is 10K words as shown.
  • Page 44 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Controller Memory and File Types Viewing Controller Memory Usage 1. Highlight and open Controller Properties. 2. The amount of Memory Used and Memory Left will appear in the Controller Properties window once the program has been verified. Publication 1766-RM001A-EN-P - October 2008...
  • Page 45 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Controller Memory and File Types Data Files Data files store numeric information, including I/O, status, and other data associated with the instructions used in ladder subroutines. The data file types are: File Name File File Words per File Description Identifier Element...
  • Page 46 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Controller Memory and File Types File Name File File Words per File Description Identifier Element Number Extended 9…255 The extended Routing Information File is associated with the MSG Routing instruction. See Communications Instructions on page 393 for information Information File on the MSG instruction.
  • Page 47 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Controller Memory and File Types Protecting Data Files Data File Download Protection During Download Once a user program is in the controller, there may be a need to update the ladder logic and download it to the controller without destroying user-configured variables in one or more data files in the controller.
  • Page 48 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Controller Memory and File Types Access the Download Data File Protect feature using RSLogix 500/RSLogix Micro programming software. For each data file you want protected, check the Memory Module/ Download item within the protection box in the Data File Properties screen as shown in this illustration.
  • Page 49: Protecting Data Files During Download

    Using Static File Protection with Data File Download Protection Static File Protection and Data File Download Protection can be used in combination with MicroLogix 1400 Controller Series A and higher. Setting Static File Protection Static File Protection can be applied to the following data file types: •...
  • Page 50 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Controller Memory and File Types Access the Static File Protect feature using RSLogix 500/RSLogix Micro programming software. For each data file you want protected, select the Static protection in the Data File Properties screen as shown in this illustration.
  • Page 51: Static File Protection

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Controller Memory and File Types If a password is lost or forgotten, there is no way to bypass the password to recover the program. The only option is to clear the controller’s memory. If the Memory Module User Program has the “Load Always” functionality enabled, and the controller User Program has a password specified, the controller compares the passwords before transferring the User Program from the Memory Module to the controller.
  • Page 52: Password Protection

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Controller Memory and File Types Allow Future Access The controller supports a feature which allows you to select if future access to the User Program should be allowed or disallowed after it has Setting (OEM Lock) been transferred to the controller.
  • Page 53: Clearing The Controller Memory

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Controller Memory and File Types Using RSLogix 500/RSLogix Micro V8.10 and higher, you can disable individual data files from being viewed via any web browser by selecting the data file’s properties page and checking the Web View Disable check box as shown below.
  • Page 54: Allow Future Access Setting (Oem Lock)

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Controller Memory and File Types LCD Edit Disable This allows selective protection of individual Data Files on the LCD. Using RSLogix 500/RSLogix Micro V8.10 and higher, select the data file’s properties page and check the LCD Edit Disable check box as shown below.
  • Page 55: Lcd Edit Disable

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Controller Memory and File Types Notes: Publication 1766-RM001A-EN-P - October 2008...
  • Page 56 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Controller Memory and File Types Publication 1766-RM001A-EN-P - October 2008...
  • Page 57 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Chapter Function Files This chapter describes controller function files. The chapter is organized as follows: • Overview on page 56 • Real-Time Clock Function File on page 57 • Memory Module Information Function File on page 60 •...
  • Page 58: Function Files

    Overview Function Files are one of the three primary file structures within the MicroLogix 1400 controller (Program Files and Data Files are the others). Function Files provide an efficient and logical interface to controller resources. Controller resources are resident (permanent) features such as the Real-Time Clock and High-Speed Counter.
  • Page 59: Real-Time Clock Function File

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files Real-Time Clock The real-time clock provides year, month, day of month, day of week, hour, minute, and second information to the Real-Time Clock (RTC) Function File Function File in the controller. The Real-Time Clock parameters and their valid ranges are shown in the table below.
  • Page 60 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files The real-time clock does not allow you to load or store invalid date or time data. Use the Disable Clock button in your programming device to disable the real-time clock before storing a module. This decreases the drain on the battery during storage.
  • Page 61: Rta - Real Time Clock Adjust Instruction

    When Rung Is: Real Time Clock Adjust Controller True False MicroLogix 1400 999.8510 µs 0.4090 µs The RTA instruction is used to synchronize the controllers Real-Time Clock (RTC) with an external source. The RTA instruction will adjust the RTC to the nearest minute. The RTA instruction adjusts the RTC based on the value of the RTC Seconds as described below.
  • Page 62: Memory Module Information Function File

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files Memory Module The controller has a Memory Module Information (MMI) File which is updated with data from the attached memory module. At power-up or on Information Function detection of a memory module being inserted, the catalog number, series, File revision, and type are identified and written to the MMI file in the user program.
  • Page 63 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files MP - Module Present The MP (Module Present) bit can be used in the user program to determine when a memory module is present on the controller. This bit is updated once per scan, provided the memory module is first recognized by the controller.
  • Page 64: Base Hardware Information Function File

    See Power-Up Mode Behavior on page 557 for more information. Base Hardware The base hardware information (BHI) file is a read-only file that contains a description of the MicroLogix 1400 Controller. Information Function File Base Hardware Information Function File (BHI)
  • Page 65: Communications Status File

    43…70 when using DF1 Full-Duplex, DF1 Half-Duplex, DH-485, or ASCII: End of List Category Identifier Code MicroLogix 1400 (always 0) • MicroLogix 1400 43…70 Reserved words 43…70 when using Modbus RTU Slave, Master or DF1 Half-Duplex Master: • MicroLogix 1400 43…69...
  • Page 66 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files General Status Block of Communications Status File General Channel Status Block Word Description Communications Channel General Status Information Category Identifier Code Length Format Code Communications Configuration Error Code ICP – Incoming Command Pending Bit This bit is set (1) when the controller determines that another device has requested information from this controller.
  • Page 67 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files Diagnostic Counter Block of Communications Status File With RSLogix 500/RSLogix Micro version 8.10.00 and later, formatted displays of the diagnostic counters for each configured channel are available under Channel Status. These displays include a Clear button that allows you to reset the diagnostic counters while monitoring them online with the programming software.
  • Page 68 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files DH-485 Diagnostic Counters Block Word Description Diagnostic Counters Category Identifier Code (always 2) Length (always 30) Format Code (always 0) Total Message Packets Received Total Message Packets Sent 0…7 Message Packet Retries 8…15 Retry Limit Exceeded (Non-Delivery) 0…7 NAK –...
  • Page 69 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files DF1 Full-Duplex Diagnostic Counters Block Word Description Diagnostic Counters Category Identifier Code (always 2) Length (always 30) Format Code (always 1) Reserved Reserved 4…15 Reserved Total Message Packets Sent Total Message Packets Received Undelivered Message Packets ENQuiry Packets Sent NAK Packets Received ENQuiry Packets Received...
  • Page 70 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files DF1 Half-Duplex Slave Diagnostic Counters Block Word Description Diagnostic Counters Category Identifier Code (always 2) Length (always 30) Format Code (always 2) Reserved Reserved 4…15 Reserved Total Message Packets Sent Total Message Packets Received Undelivered Message Packets Message Packets Retried NAK Packets Received...
  • Page 71 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files DF1 Half-Duplex Master Diagnostic Counters Block Word Description Diagnostic Counters Category Identifier Code (always 2) Length (always 30) Format Code (always 3) Reserved Reserved 4…15 Reserved Total Message Packets Sent Total Message Packets Received Undelivered Message Packets Message Packets Retried Reserved...
  • Page 72 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files DF1 Radio Modem Diagnostic Counters Block Word Description Diagnostic Counters Category Identifier Code (always 2) Length (always 30) Format Code (always 1) Reserved Reserved 4…15 Reserved Total Message Packets Sent Total Message Packets Received Undelivered Message Packets 13…15 - Reserved...
  • Page 73 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files Modbus RTU Slave Diagnostic Counters Block (Data Link Layer) Word Description Diagnostic Counters Category Identifier Code (always 2) Length (always 30) Format Code (always 4) Reserved Reserved 4…15 Reserved Total Message Packets Sent Total Message Packets Received for This Slave Total Message Packets Received Link Layer Error Count Link Layer Error Code...
  • Page 74 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files Modbus RTU Slave Diagnostic Counters Block (Presentation Layer) Word Description Function Code 1 Message Counter Function Code 2 Message Counter Function Code 3 Message Counter Function Code 4 Message Counter Function Code 5 Message Counter Function Code 6 Message Counter Function Code 8 Message Counter Function Code 15 Message Counter...
  • Page 75 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files Modbus RTU Master Diagnostic Counters Block (Data Link Layer) Word Description Link Layer Error Count Link Layer Error Code 15…22 - Reserved Modbus RTU Master Diagnostic Counters Block (Presentation Layer) Word Description Diagnostic Counters Category Identifier Code (always 6) Length (always 32) Format Code (always 0) ERR 1: Illegal Function...
  • Page 76 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files Publication 1766-RM001A-EN-P - October 2008...
  • Page 77 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files ASCII Diagnostic Counters Block Word Description DLL Diagnostic Counters Category Identifier code (always 2) Length (always 30) Format Code (always 5) Reserved Reserved 4…15 Reserved Software Handshaking Status 1…15 Reserved Echo Character Count Received Character Count 13…18 - Reserved Bad Character Count...
  • Page 78 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files DNP3 Slave Diagnostic Counters Block (Data Link Layer) Access Word Bit Description Non-Exe DLL Diagnostic Counters Category Identifier code Length: 30 (15 words to follow including format code) Counters Format Code: 11 - DNP3 Slave 15…4 RO Reserved Modem Control Line States - Always zero...
  • Page 79 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files DNP3 Slave Diagnostic Counters Block (Presentation Layer) Access Word Description Non-Exe PL Diagnostic Counters Category Identifier Code (6)) Length: 32 (16 words to follow including format code) Category Block Format Code - 2 Presentation Layer Error Code Presentation Layer Error Count Function Code that caused the last error Last Transmitted IIN in the response...
  • Page 80 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files Active Node Table Block of Communications Status File Active Node Table Block Word Description Active Node Table Category Identifier Code (always 3) Length: • always 4 for DH-485 • always 18 for DF1 Half-Duplex Master •...
  • Page 81 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files Publication 1766-RM001A-EN-P - October 2008...
  • Page 82: Ethernet Communications Status File

    Word Description Applies to Controller on Page 0…119 General Channel Status Block MicroLogix 1400 120…17 DLL Diagnostic Counters Block MicroLogix 1400 End of List Category Identifier Code (always MicroLogix 1400 The following tables show the details of each block in the Ethernet Communications Status File.
  • Page 83 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files General Channel Status Block Word Description ICP – Incoming Command Pending Bit This bit is set (1) when the controller determines that another device has requested information from this controller. Once the request has been satisfied, the bit is cleared (0). MRP –...
  • Page 84 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files General Channel Status Block Word Description Ethernet Port Link Status This bit is set (1) when the Ethernet link is active. Ethernet Port Connection Speed This bit is valid when the Auto Negotiation function is enabled. This bit indicates the speed of the link layer driver operating at Ethernet port: •...
  • Page 85 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files General Channel Status Block Word Description Advertise 100 MB Full Duplex Flag This bit indicates advertisement status if Auto negotiate enabled: • 0: 100 MB Full Duplex was not advertised during auto negotiation • 1: 100 MB Full Duplex was advertised during auto negotiation Advertise 100 MB Half Duplex Flag This bit indicates advertisement status if Auto negotiate enabled: •...
  • Page 86 Message Reply Timeout The amount of time (in ms) that the MicroLogix 1400 processor waits for a reply to a command that it has initiated via a MSG instruction. The MSG Reply Timeout has a range of 250 ms...65,500 ms.
  • Page 87 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files Ethernet Diagnostic Counters Block Word Description Low word RMON Tx Packets High word (RMON_T_PACKETS) Low word Frames Transmitted with Excessive Collisions High word (IEEE_T_EXCOL) Low word Frames Received with CRC Error High word (IEEE_R_CRC) Low word Frames Received with Alignment Error High word...
  • Page 88 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files Ethernet Diagnostic Counters Block (continued) Word Description Low word Total Commands Sent High word Low word Total Commands Received High word Ethernet Diagnostic Counters Block (continued) Word Description Low word Total Replies Sent High word Publication 1766-RM001A-EN-P - October 2008...
  • Page 89 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files Ethernet Diagnostic Counters Block (continued) Word Description Low word Total Replies Received High word Low word Total Replies Sent with Error High word Low word Total Replies Received with Error High word Low word Total Replies Timed Out High word Publication 1766-RM001A-EN-P - October 2008...
  • Page 90 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files Ethernet Diagnostic Counters Block (continued) Word Description Low word Total Message Connections High word Low word Incoming Message Connections High word Low word Outgoing Message Connections High word Low word Maximum Connections Allowed High word The last Port tab will show the current states of Ethernet communications port according to word 5 of Ethernet Communications Status File.
  • Page 91: Input/Output Status File

    Word Description Embedded Module Error Code – Always zero 1…4 Expansion Module Error Code – The word number corresponds to the module’s slot number. Refer to the I/O module’s documentation for specific information. (MicroLogix 1400) Publication 1766-RM001A-EN-P - October 2008...
  • Page 92: Publication 1766-Rm001A-En-P - October

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Function Files Notes: Publication 1766-RM001A-EN-P - October 2008...
  • Page 93: Instruction Set

    - Allen Bradley,Rockwell,plc,servo,drive Chapter Programming Instructions Overview Instruction Set The following table shows the MicroLogix 1400 programming instructions listed within their functional group. Functional Group Description Page High-Speed Counter HSL, RAC – The high-speed counter instructions (along with the HSC function file) allow you to monitor and control the high-speed counter.
  • Page 94: Using The Instruction Descriptions

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Programming Instructions Overview Using the Instruction Throughout this manual, each instruction (or group of similar instructions) has a table similar to the one shown below. This table provides Descriptions information for all sub-elements (or components) of an instruction or group of instructions.
  • Page 95 By supporting these three addressing methods, the MicroLogix 1400 allows incredible flexibility in how data can be monitored or manipulated. Each of the addressing modes are described below.
  • Page 96 The MicroLogix 1400 supports indirection (indirect addressing) for Files, Words and Bits. To define which components of an address are to be indirected, a closed bracket “[ ]” is used. The following examples illustrate how to use indirect addressing.
  • Page 97 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Programming Instructions Overview • Address: N[N50:100]:10 • Description: In this example, the source of the COP instruction is indirected by N50:100. The data in N50:100 defines the data file number to be used in the instruction. In this example, the copy instruction source A is defined by N[N50:100]:10.
  • Page 98 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Programming Instructions Overview Indirect Addressing of Bit B3:0 B3:0 0002 [B25:0] 0003 • Address: B3/[B25:0] • Description: In this example, the element to be used for the indirection is B25:0. The data in B25:0 defines the bit within file B3. If the value of location B25:0 = 1017, the XIC instruction is processed using B3/1017.
  • Page 99 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Programming Instructions Overview Example - Using Indirect Addressing to Duplicate Indexed Addressing In this section, an indexed addressing example is shown first. Then an equivalent indirect addressing example is shown. Indexed addressing is supported by SLC 500 and MicroLogix 1000 programmable controllers. The MicroLogix 1100, 1200, 1400, and 1500 do not support indexed addressing.
  • Page 100 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Programming Instructions Overview Indirect Addressing Example An equivalent example using indirect addressing is shown below. In place of using the index register, S:24, the user can designate any other valid word address as the indirect address. Multiple indirect addresses can be used within an instruction.
  • Page 101: High-Speed Counter Overview

    Using the High-Speed Counter and Programmable Limit Switch High-Speed Counter All MicroLogix 1400, except the 1766-L32AWA and 1766_L32AWAA, have six 100kHz high-speed counters. There are three main high-speed Overview counters (counter 0, 1, 2) and three sub high speed counters (counter 3, 4, 5).
  • Page 102: High-Speed Counter (Hsc) Function File

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch High-Speed Counter Within the RSLogix 500/RSLogix Micro Function File Folder, you see a HSC Function File. This file provides access to HSC configuration data, (HSC) Function File and also allows the control program access to all information pertaining to the High-Speed Counter.
  • Page 103 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch The HSC is extremely versatile; the user can select or configure the master HSC for any one of ten (10) modes and the sub HSC for any one of five (5) modes of operation.
  • Page 104: High-Speed Counter Function File Sub-Elements Summary

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch High-Speed Counter The HSC is comprised of 36 sub-elements. These sub-elements are either bit, word, or long word structures that are used to provide control over Function File the HSC function, or provide HSC status information for use within the Sub-Elements Summary control program.
  • Page 105: Hsc Function File Sub-Elements

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch HSC Function File All examples illustrate HSC0. Sub-Elements Program File Number (PFN) Description Address Data Format HSC Modes Type User Program Access PFN - Program HSC:0.PFN word (INT) 0…9 control read only File Number...
  • Page 106 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch Function Enabled (FE) Description Address Data Format Type User Program Access HSC Modes FE - Function HSC:0/FE bit 0…9 control read/write Enabled (1) For Mode descriptions, see HSC Mode (MOD) on page 116. The FE (Function Enabled) is a status/control bit that defines when the HSC interrupt is enabled, and that interrupts generated by the HSC are processed based on their priority.
  • Page 107 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch Counting Enabled (CE) Description Address Data Format HSC Modes Type User Program Access CE - Counting HSC:0/CE bit 0…9 control read/write Enabled (1) For Mode descriptions, see HSC Mode (MOD) on page 116. The CE (Counting Enabled) control bit is used to enable or disable the High-Speed Counter.
  • Page 108 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch User Interrupt Enable (UIE) Description Address Data Type User Program Format Access Modes UIE - User Interrupt Enable HSC:0/UIE bit 0…9 control read/write (1) For Mode descriptions, see HSC Mode (MOD) on page 116. The UIE (User Interrupt Enable) bit is used to enable or disable HSC subroutine processing.
  • Page 109 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch • Underflow condition - count down through the underflow value The HSC UIX bit can be used in the control program as conditional logic to detect if an HSC interrupt is executing. The HSC sub-system will clear (0) the UIX bit when the controller completes its processing of the HSC subroutine.
  • Page 110 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch Low Preset Mask (LPM) Description Address Data Format Type User Program Access HSC Modes LPM - Low HSC:0/LPM bit 2…9 control read/write Preset Mask (1) For Mode descriptions, see HSC Mode (MOD) on page 116. The LPM (Low Preset Mask) control bit is used to enable (allow) or disable (not allow) a low preset interrupt from occurring.
  • Page 111 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch Low Preset Reached (LPR) Description Address Data Format HSC Modes Type User Program Access LPR - Low HSC:0/LPR bit 2…9 status read only Preset Reached (1) For Mode descriptions, see HSC Mode (MOD) on page 116. The LPR (Low Preset Reached) status flag is set (1) by the HSC sub-system whenever the accumulated value (HSC:0.ACC) is less than or equal to the low preset variable (HSC:0.LOP).
  • Page 112 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch High Preset Mask (HPM) Description Address Data Format HSC Modes Type User Program Access HPM - High HSC:0/HPM bit 0…9 control read/write Preset Mask (1) For Mode descriptions, see HSC Mode (MOD) on page 116. The HPM (High Preset Mask) control bit is used to enable (allow) or disable (not allow) a high preset interrupt from occurring.
  • Page 113 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch High Preset Reached (HPR) Description Address Data Format HSC Modes Type User Program Access HPR - High HSC:0/HPR bit 2…9 status read only Preset Reached (1) For Mode descriptions, see HSC Mode (MOD) on page 116. The HPR (High Preset Reached) status flag is set (1) by the HSC sub-system whenever the accumulated value (HSC:0.ACC) is greater than or equal to the high preset variable (HSC:0.HIP).
  • Page 114 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch The UFM (Underflow Mask) control bit is used to enable (allow) or disable (not allow) a underflow interrupt from occurring. If this bit is clear (0), and a Underflow Reached condition is detected by the HSC, the HSC user interrupt is not executed.
  • Page 115 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch This bit is transitional and is set by the HSC sub-system. It is up to the control program to utilize, track if necessary, and clear (0) the overflow condition.
  • Page 116 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch Overflow Mask (OFM) Description Address Data Format HSC Modes Type User Program Access OFM - Overflow HSC:0/OFM bit 0…9 control read/write Mask (1) For Mode descriptions, see HSC Mode (MOD) on page 116. The OFM (Overflow Mask) control bit is used to enable (allow) or disable (not allow) an overflow interrupt from occurring.
  • Page 117 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch Count Direction (DIR) Description Address Data Format HSC Modes Type User Program Access DIR - Count HSC:0/DIR bit 0…9 status read only Direction (1) For Mode descriptions, see HSC Mode (MOD) on page 116. The DIR (Count Direction) status flag is controlled by the HSC sub-system.
  • Page 118 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch Count Up (CU) Description Address Data Format HSC Modes Type User Program Access CU - Count Up HSC:0/CU bit 0…9 status read only (1) For Mode descriptions, see HSC Mode (MOD) on page 116. The CU (Count Up) bit is used with all of the HSCs (modes 0…9).
  • Page 119 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch HSC Operating Modes Mode Type Number Up Counter - The accumulator is immediately cleared (0) when it reaches the high preset. A low preset cannot be defined in this mode. Up Counter with external reset and hold - The accumulator is immediately cleared (0) when it reaches the high preset.
  • Page 120 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch HSC Function Operating Modes & Input Assignments Modes of Operation Input 0 (HSC:0) Input 1 (HSC:0) Input 2 (HSC:0) Input 3 (HSC:0) Mode Value in User Program Input 4 (HSC:1) Input 5 (HSC:1) Input 6 (HSC:1) Input 7 (HSC:1)
  • Page 121 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch HSC Mode 0 - Up Counter HSC Mode 0 Examples Input Terminals I1:0.0/0 (HSC0) I1:0.0/1 (HSC0) I1:0.0/2 (HSC0) I1:0.0/3 (HSC0) CE Bit Comments Function Count Not Used Not Used Not Used ⇑...
  • Page 122 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch HSC Mode 2 - Counter with External Direction HSC Mode 2 Examples Input Terminals I1:0.0/0 (HSC0) I1:0.0/1 (HSC0) I1:0.0/2 (HSC0) I1:0.0/3 (HSC0) CE Bit Comments Function Count Direction Not Used Not Used ⇑...
  • Page 123 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch HSC Mode 4 - Two Input Counter (up and down) HSC Mode 4 Examples Input Terminals I1:0.0/0 (HSC0) I1:0.0/1 (HSC0) I1:0.0/2 (HSC0) I1:0.0/3 (HSC0) CE Bit Comments Function Count Up Count Down Not Used...
  • Page 124 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch Using the Quadrature Encoder The Quadrature Encoder is used for determining direction of rotation and position for rotating, such as a lathe. The Bidirectional Counter counts the rotation of the Quadrature Encoder. The figure below shows a quadrature encoder connected to inputs 0, 1, and 2.
  • Page 125 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch Inputs I1:0.0/0 through I1:0.0/11 are available for use as inputs to other functions regardless of the HSC being used. HSC Mode 7 - Quadrature Counter (phased inputs A and B) With External Reset and Hold HSC Mode 7 Examples Input...
  • Page 126 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch HSC Mode 8 Examples I1:0.0/1(HSC0) I1:0.0/1(HSC0) Value of CE Bit Accumulator and Counter Action TRUE Count Up Acc. Value TRUE Count Down Acc. Value OFF or ON OFF or ON Hold Acc.
  • Page 127 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch Accumulator (ACC) Description Address Data Format Type User Program Access ACC - Accumulator HSC:0.ACC long word (32-bit INT) control read/write The ACC (Accumulator) contains the number of counts detected by the HSC sub-system.
  • Page 128 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch • Load new HSC parameters using the HSL instruction. See HSL - High-Speed Counter Load on page 130. The data loaded into the low preset must greater than or equal to the data resident in the underflow (HSC:0.UNF) parameter, or an HSC error is generated.
  • Page 129 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch to the overflow value and the counter then begins counting from the overflow value (counts are not lost in this transition). The user can specify any value for the underflow position, provided it is less than the overflow value and falls between -2,147,483,648 and 2,147,483,647.
  • Page 130 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch Affect of HSC Output Mask on Base Unit Outputs Output Address 16-Bit Signed Integer Data Word 15 14 13 12 11 10 9 O0:0.0 The outputs shown in the black boxes are the outputs under the control of the HSC sub-system.
  • Page 131 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch High Preset Output (HPO) Description Address Data Format Type User Program Access HPO - High Preset Output HSC:0.HPO word (16-bit binary) control read/write The HPO (High Preset Output) defines the state (1 = ON or 0 = OFF) of the outputs on the controller when the high preset is reached.
  • Page 132: Hsl - High-Speed Counter Load

    Low Preset N7:1 Output High Source N7:2 True False Output Low Source N7:3 MicroLogix 1400 word 18.8260 µs 0.2910 µs long word 18.6510 µs 0.4690 µs The HSL (High-Speed Load) instruction allows the high and low presets, and high and low output source to be applied to a high-speed counter.
  • Page 133: Rac - Reset Accumulated Value

    Source Controller Execution Time When Rung Is: True False MicroLogix 1400 8.3310 µs 0.2030 µs The RAC instruction resets the high-speed counter and allows a specific value to be written to the HSC accumulator. The RAC instruction uses the following parameters: •...
  • Page 134: Programmable Limit Switch (Pls) File

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch Programmable Limit The Programmable Limit Switch function allows you to configure the High-Speed Counter to operate as a PLS (programmable limit switch) or Switch (PLS) File rotary cam switch. When PLS operation is enabled, the HSC (High-Speed Counter) uses a PLS data file for limit/cam positions.
  • Page 135 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch When the HSC counts to that new preset, the new output data is written through the HSC mask. This process continues until the last element within the PLS file is loaded. At that point the active element within the PLS file is reset to zero.
  • Page 136 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch Table 1: Format Explanation PLSf:e.s PLS Programmable Limit Switch file File number The valid file number range is from 9…255. Element delimiter Element number The valid element number range is from 0…255. Sub-Element delimiter Sub-Element number The valid sub-element number range is from 0…5...
  • Page 137 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch Publication 1766-RM001A-EN-P - October 2008...
  • Page 138 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch 3. Enter a file number (9…255) and select Programmable Limit Switch as the type. A Name and/or Description may be entered as well, but is not required. 4. Elements refers to the number of PLS steps. For this example enter a value of 4.
  • Page 139 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch PLS Data File Definitions: Data Description Data Format High Preset 32-bit signed integer Low Preset Output High Data 16-bit binary Output Low Data (bit 15--> 0000 0000 0000 0000 <--bit 0) Once the values above have been entered for HIP and OHD, the PLS is configured.
  • Page 140 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using the High-Speed Counter and Programmable Limit Switch Notes: Publication 1766-RM001A-EN-P - October 2008...
  • Page 141: Pto - Pulse Train Output

    The PTO function can only be used with the controller’s embedded I/O. It PTO Number IMPORTANT cannot be used with expansion I/O modules. The PTO instruction should only be used with MicroLogix 1400 BXB or BXBA IMPORTANT units. Relay outputs are not capable of performing very high-speed operations.
  • Page 142 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using High-Speed Outputs • Accelerate/decelerate intervals • Run interval The PTO instruction, along with the HSC and PWM functions, are different than most other controller instructions. Their operation is performed by custom circuitry that runs in parallel with the main system processor.
  • Page 143 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using High-Speed Outputs While the PTO instruction is being executed, status bits and information are updated as the main controller continues to operate. Because the PTO instruction is actually being executed by a parallel system, status bits and other information are updated each time the PTO instruction is scanned while it is running.
  • Page 144 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using High-Speed Outputs structure of the control program determines when the DN bit goes off. So, to detect when the PTO instruction completes its output, you can monitor the Done (DN), Idle (ID), or Normal Operation (NO) status bits. Stage Rung State Sub-Elements:...
  • Page 145: Pulse Train Outputs (Ptox) Function File

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using High-Speed Outputs The Done (DN) bit becomes true (1) when the PTO completes and remains set until the PTO rung logic is false. The false rung logic re-activates the PTO instruction. To detect when the PTO instruction completes its output, monitor the done (DN) bit.
  • Page 146: Pulse Train Output Function File Sub-Elements Summary

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using High-Speed Outputs If the controller mode is run, the data within sub-element fields may be changing. Pulse Train Output The variables within each PTOX sub-element, along with what type of behavior and access the control program has to those variables, are listed Function File individually below.
  • Page 147 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using High-Speed Outputs Pulse Train Output Function File (PTOX:0) Sub-Element Description Address Data Format Range Type User Program For More Access Information IS - Idle Status PTOX:0/IS 0 or 1 status read only ED - Error Detected Status PTOX:0/ED 0 or 1 status...
  • Page 148 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using High-Speed Outputs Forcing an output controlled by the PTO while it is running stops all output pulses and causes a PTO error. PTOX Done (DN) Sub-Element Address Data Format Range Type User Program Description Access DN - Done PTOX:0/DN bit 0 or 1...
  • Page 149 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using High-Speed Outputs PTOX Run Status (RS) Sub-Element Address Data Format Range Type User Program Description Access RS - Run Status PTOX:0/RS 0 or 1 status read only The PTOX RS (Run Status) bit is controlled by the PTO sub-system. It can be used by an input instruction on any rung within the control program.
  • Page 150 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using High-Speed Outputs • Set (1) - Configures the PTO instruction to produce an S-Curve profile. • Cleared (0) - Configures the PTO instruction to produce a Trapezoid profile. PTOX Idle Status (IS) Sub-Element Address Data Format Range Type User Program...
  • Page 151 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using High-Speed Outputs PTOX Normal Operation Status (NS) Sub-Element Description Address Data Format Range Type User Program Access NS - Normal Operation Status PTOX:0/ 0 or 1 status read only The PTOX NS (Normal Operation Status) bit is controlled by the PTO sub-system.
  • Page 152 In the MicroLogix 1400 controller, the data less than zero or greater than 100,000 generates a PTOX error. PTOX Operating Frequency Status (OFS)
  • Page 153 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using High-Speed Outputs PTOX Total Output Pulses To Be Generated (TOP) Sub-Element Address Data Range Type User Description Format Program Access TOP - Total Output PTOX:0.TO long word 0…2,147,483,647 control read/write Pulses To Be Generated (32-bit INT) The PTOX TOP (Total Output Pulses) defines the total number of pulses to be generated for the pulse profile (accel/run/decel inclusive).
  • Page 154 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using High-Speed Outputs The choice of selecting a common profile or separate profiles must be made at the time of programming. This cannot be changed once the program is downloaded into the controller. The selection of the ramp type must be made prior to going to run.
  • Page 155 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using High-Speed Outputs Accel Decel 12,000 Accel Decel 6,000 6,000 In this example, the maximum value that could be used for accelerate/ decelerate is 6000, because if both accelerate and decelerate are 6000, the total number of pulses = 12,000. The run component would be zero. This profile would consist of an acceleration phase from 0…6000.
  • Page 156 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using High-Speed Outputs The PTOX CS (Controlled Stop) bit is used to stop an executing PTO instruction, in the run portion of the profile, by immediately starting the decel phase. Once set, the decel phase completes without an error or fault condition.
  • Page 157 Jog phases. This value is typically determined by the type of device that is being driven, the mechanics of the application, or the device/components being moved. In the MicroLogix 1400 controller, the data less than zero or greater than 100,000 generates a PTOX error.
  • Page 158 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using High-Speed Outputs • Set (1) - Whenever a PTO instruction outputs a Jog Pulse • Cleared (0) - Whenever a PTO instruction exits the Jog Pulse state The output (jog) pulse is normally complete with the JP bit set. The JPS bit remains set until the JP bit is cleared (0 = off).
  • Page 159 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using High-Speed Outputs • Set (1) - Whenever a PTO instruction is generating continuous Jog Pulses • Cleared (0) - Whenever a PTO instruction is not generating continuous Jog Pulses. PTOX Error Code (ER) Sub-Element Address Data Format Range Type User Program...
  • Page 160: Pwm - Pulse Width Modulation

    The PWM function can only be used with the controller’s embedded I/O. It PWM Number IMPORTANT cannot be used with expansion I/O modules. The PWM instruction should only be used with MicroLogix 1400 BXB or IMPORTANT BXBA unit. Relay outputs are not capable of performing very high-speed operations.
  • Page 161: Pwm Function

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using High-Speed Outputs PWM Function The PWM function allows a field device to be controlled by a PWM wave form. The PWM profile has two primary components: • Frequency to be generated • Duty Cycle interval The PWM instruction, along with the HSC and PTO functions, are different than all other controller instructions.
  • Page 162: Pulse Width Modulated Function File Elements Summary

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using High-Speed Outputs Pulse Width Modulated The variables within each PWMX element, along with what type of behavior and access the control program has to those variables, are listed Function File Elements individually below. Summary Pulse Width Modulated Function File (PWMX:0) Element Description Address Data Format Range...
  • Page 163 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using High-Speed Outputs PWMX Output (OUT) Element Address Data Range Type User Program Access Description Format OUT - PWM Output PWMX:0.OU word (INT) 2…4 status read only The PWMX OUT (Output) variable defines the physical output that the PWM instruction controls.
  • Page 164 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using High-Speed Outputs • Set (1) - Whenever the PWM instruction is within the run phase of the output profile. • Cleared (0) - Whenever the PWM instruction is not within the run phase of the output profile. PWMX Accelerating Status (AS) Element Description Address...
  • Page 165 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using High-Speed Outputs PWMX Idle Status (IS) Element Description Address Data Format Range Type User Program Access IS - PWM Idle Status PWMX:0/IS bit 0 or 1 status read only The PWMX IS (Idle Status) is controlled by the PWM sub-system and represents no PWM activity.
  • Page 166 The PWMX OF (Output Frequency) variable defines the frequency of the PWM function. This frequency can be changed at any time. In the MicroLogix 1400 controller, the data less than zero or greater than 40,000 generates a PWM error. Publication 1766-RM001A-EN-P - October 2008...
  • Page 167 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using High-Speed Outputs PWMX Operating Frequency Status (OFS) Element Description Address Data Format Range Type User Program Access OFS - PWM Operating Frequency Status PWMX:0.OFS long word 0…40,000 status read only (32-bit INT) The PWMX OFS (Output Frequency Status) is generated by the PWM sub-system and can be used in the control program to monitor the actual frequency produced by the PWM sub-system.
  • Page 168 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using High-Speed Outputs PWMX Accel/Decel Delay (ADD) Element Description Address Data Format Range Type User Program Access ADD - Accel/Decel Delay PWMX:0.ADD word (INT) 0…32,767 control read/write PWMX ADD (Accel/Decel Delay) defines the amount of time in 10 millisecond interval to ramp from zero to 20kHz frequency.
  • Page 169: Xic - Examine If Closed Xio - Examine If Open

    XIO - Examine if Open Instruction Type: input B3:0 Execution Time for the XIC Instruction Controller When Instruction Is: B3:0 True False MicroLogix 1400 0.2646 µs 0.2512 µs Execution Time for the XIO Instruction Controller When Instruction Is: True False MicroLogix 1400 0.2513 µs...
  • Page 170 • • • • (1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit. (2) See Important note about indirect addressing. You cannot use indirect addressing with: S, MG, PD, RTC, HSC, PTOX, IMPORTANT PWMX, STI, EII, BHI, MMI, CS, IOS, LCD, and DLS files.
  • Page 171: Ote - Output Energize

    Controller When Rung Is: True False MicroLogix 1400 0.2685 µs 0.2629 µs Use an OTE instruction to turn a bit location on when rung conditions are evaluated as true and off when the rung is evaluated as false. An example of a device that turns on or off is an output wired to a pilot light (addressed as O0:0/4).
  • Page 172: Otl - Output Latch Otu - Output Unlatch

    • • • • (1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit. (2) See Important note about indirect addressing. You cannot use indirect addressing with: S, MG, PD, RTC, HSC, PTOX, IMPORTANT PWMX, STI, EII, BHI, MMI, LCD, CS, IOS, and DLS files.
  • Page 173: Ons - One Shot

    • • • • (1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit. (2) See Important note about indirect addressing. You cannot use indirect addressing with: S, MG, PD, RTC, HSC, PTOX, IMPORTANT PWMX, STI, EII, BHI, MMI, CS, IOS, LCD, and DLS files.
  • Page 174: Osr - One Shot Rising Osf - One Shot Falling

    - Allen Bradley,Rockwell,plc,servo,drive Relay-Type (Bit) Instructions The ONS instruction for the MicroLogix 1400 provides the same functionality as the OSR instruction for the MicroLogix 1000 and SLC 500 controllers. The ONS instruction is a retentive input instruction that triggers an event to occur one time.
  • Page 175 B3:0/0 Output Bit B3:0/1 The OSR instruction for the MicroLogix 1400 does not provide the same functionality as the OSR instruction for the MicroLogix 1000 and SLC 500 controllers. For the same functionality as the OSR instruction for the MicroLogix 1000 and SLC 500 controllers, use the ONS instruction.
  • Page 176 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Relay-Type (Bit) Instructions OSF Storage and Output Bits Operation Rung State Transition Storage Bit Output Bit true-to-false (one scan) bit is reset bit is set false-to-false bit is reset bit is reset false-to-true and true-to-true bit is set bit is reset Addressing Modes and File Types can be used as shown in the following table:...
  • Page 177: Timer Instructions Overview

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Chapter Timer and Counter Instructions Timers and counters are output instructions that let you control operations based on time or a number of events. The following Timer and Counter Instructions are described in this chapter: Instruction Used To: Page TON - Timer, On-Delay...
  • Page 178 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Timer and Counter Instructions Timer Base Settings Time Base Timing Range 0.001 seconds 0…32.767 seconds 0.01 seconds 0…327.67 seconds 1.00 seconds 0…32,767 seconds Each timer address is made of a 3-word element. Word 0 is the control and status word, word 1 stores the preset value, and word 2 stores the accumulated value.
  • Page 179 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Timer and Counter Instructions Timer Instructions Valid Addressing Modes and File Types For definitions of the terms used in this table see Using the Instruction Descriptions on page 92. Address Function Files Address Level Data Files Mode Parameter Preset...
  • Page 180 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Timer and Counter Instructions Timer Accuracy Timer accuracy refers to the length of time between the moment a timer instruction is enabled and the moment the timed interval is complete. Timer Accuracy Time Base Accuracy 0.001 seconds -0.001…0.00 0.01 seconds -0.01…0.00...
  • Page 181: Ton - Timer, On-Delay

    0< Controller When Rung Is: True False MicroLogix 1400 2.0338 µs (DN=0) 0.8608 µs (DN=0) 1.2608 µs (DN=1) Use the TON instruction to delay turning on an output. The TON instruction begins to count time base intervals when rung conditions become true.
  • Page 182: Tof - Timer, Off-Delay

    Accum 0< Controller When Rung Is: True False MicroLogix 1400 0.5203 µs 1.0962 µs (DN=0) 0.5322 µs (DN=1) Use the TOF instruction to delay turning off an output. The TOF instruction begins to count time base intervals when rung conditions become false.
  • Page 183: Rto - Retentive Timer, On-Delay

    0< Controller When Rung Is: True False MicroLogix 1400 1.1710 µs (DN=0) 0.5480 µs 0.6100 µs (DN=1) Use the RTO instruction to delay turning “on” an output. The RTO begins to count time base intervals when the rung conditions become true. As long as the rung conditions remain true, the timer increments its accumulator until the preset value is reached.
  • Page 184: How Counters Work

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Timer and Counter Instructions How Counters Work The figure below demonstrates how a counter works. The count value must remain in the range of -32,768…+32,767. If the count value goes above +32,767, the counter status overflow bit (OV) is set (1). If the count goes below -32,768, the counter status underflow bit (UN) is set (1).
  • Page 185 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Timer and Counter Instructions retained until cleared by a reset (RES) instruction that has the same address as the counter. The counter continues to count when the accumulator is greater than the CTU preset and when the accumulator is less than the CTD preset. Addressing Modes and File Types can be used as shown in the following table: CTD and CTU Instructions Valid Addressing Modes and File Types...
  • Page 186 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Timer and Counter Instructions CTD Instruction Counter Control and Status Bits, Counter Word 0 (Data File 5 is configured as a timer file for this example.) Is Set When: And Remains Set Until One of the Following Occurs: bit 11 - C5:0/UN UN - underflow...
  • Page 187: Ctu - Count Up Ctd - Count Down

    0< Accum 0< Controller CTU - When Rung Is: CTD - When Rung Is: True False True False Count Down MicroLogix 1400 0.4849 µs 0.3812 µs 0.4350 µs 0.3803 µs Counter C5:0 Preset 0< Accum 0< The CTU and CTD instructions are used to increment or decrement a counter at each false-to-true rung transition.
  • Page 188: Res - Reset

    Execution Time for the RES Instructions Controller When Rung Is: True False MicroLogix 1400 0.6320 µs 0.4305 µs The RES instruction resets timers, counters, and control elements. When the RES instruction is executed, it resets the data defined by the RES instruction.
  • Page 189 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Timer and Counter Instructions RES Instruction Valid Addressing Modes and File Types For definitions of the terms used in this table see Using the Instruction Descriptions on page 92. Address Data Files Function Files Address Level Mode Parameter Structure...
  • Page 190 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Timer and Counter Instructions Notes: Publication 1766-RM001A-EN-P - October 2008...
  • Page 191 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Chapter Compare Instructions Use these input instructions when you want to compare values of data. Instruction Used To: Page EQU - Equal Test whether two values are equal (=) NEQ - Not Equal Test whether one value is not equal to a second value (≠) LES - Less Than Test whether one value is less than a second...
  • Page 192: Using The Compare Instructions

    • • (1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit. (2) See Important note about indirect addressing. (3) Only use the High Speed Counter Accumulator (HSC.ACC) for Source A in GRT, LES, GEQ and LEQ instructions.
  • Page 193: Equ - Equal Neq - Not Equal

    Source A N7:0 Controller Instruction Data Size When Rung Is: 0< Source B N7:1 True False 0< MicroLogix 1400 EQU word 1.0814 µs 1.0854 µs long word 1.0674 µs 1.0828 µs word 1.5056 µs 0.1880 µs Not Equal long word 1.3892 µs...
  • Page 194: Geq - Greater Than Or Equal To Leq - Less Than Or Equal To

    LEQ - Less Than or Equal Execution Time for the GEQ and LEQ Instructions Controller Instruction Data Size When Rung Is: True False Grtr Than or Eql (A>=B) MicroLogix 1400 GEQ word 1.0710 µs 0.2228 µs Source A N7:0 0< long word 1.0601 µs 0.2242 µs...
  • Page 195: Meq - Mask Compare For Equal

    N7:0 Controller Data Size When Rung Is: 0< True False Mask N7:1 0000h< MicroLogix 1400 word 6.2730 µs 0.1934 µs Compare N7:2 0< long word 7.1602 µs 0.1780 µs The MEQ instruction is used to compare whether one value (source) is equal to a second value (compare) through a mask.
  • Page 196: Lim - Limit Test

    • • • • (1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit. (2) See Important note about indirect addressing. You cannot use indirect addressing with: S, MG, PD, RTC, HSC, PTOX, IMPORTANT PWMX, STI, EII, BHI, MMI, CS, IOS, and DLS files.
  • Page 197 • • • • (1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit. (2) See Important note about indirect addressing. You cannot use indirect addressing with: S, MG, PD, RTC, HSC, PTOX, IMPORTANT PWMX, STI, EII, BHI, MMI, CS, IOS, and DLS files.
  • Page 198 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Compare Instructions Notes: Publication 1766-RM001A-EN-P - October 2008...
  • Page 199: Math Instructions

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Chapter Math Instructions General Information Before using math instructions, become familiar with the following topics at the beginning of this chapter: • Using the Math Instructions • Updates to Math Status Bits • Using the Floating Point (F) Data File This chapter also explains how advanced math instructions and application specific instructions function in your logic program.
  • Page 200: Using The Math Instructions

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Math Instructions Advanced Math Instructions Instruction Used To: Page Take the sine of a number and store the result in the destination. 211 Take the cosine of a number and store the result in the destination. Take the tangent of a number and store the result in the destination.
  • Page 201 • • (1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit. (2) The Data Log Status file can only be used for the following math instructions: ADD, SUB, MUL, DIV, NEG, and SCP.
  • Page 202: Updates To Math Status Bits

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Math Instructions Updates to Math Status After a math instruction is executed, the arithmetic status bits in the status file are updated. The arithmetic status bits are in word 0 in the processor Bits status file (S2). Math Status Bits With this Bit: The Controller:...
  • Page 203: Using The Floating Point (F) Data File

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Math Instructions Using the Floating Point File Description (F) Data File Floating point files contain IEEE-754 floating point data elements. One floating point element is shown below. You can have up to 256 of these elements in each floating point file. Floating Point Data File Structure Floating Point Element 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00...
  • Page 204 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Math Instructions Definitions Overflow - occurs when the result of an operation produces an exponent that is greater than 254. Underflow - occurs when the result of an operation produces an exponent that is less than one. Floating Point Exception Values Zero - represented by an exponent and a mantissa of zero.
  • Page 205 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Math Instructions Addressing Floating Point Files The addressing format for floating point data files is shown below. Table 2: Format Explanation Ff:e Floating Point file File number The valid file number range is from 8 (default) to 255. Element delimiter Element number The valid element number range is from 0…255.
  • Page 206 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Math Instructions Considerations When Using Floating Point Data When at least one of the operands is a Floating Data Point value: • If either Source is NAN, then the result is NAN. • All overflows result in infinity with the correct sign. •...
  • Page 207: Add - Add Sub - Subtract

    Execution Time for the ADD and SUB Instructions Source A N7:0 Controller Instruction Data Size When Rung Is: 0< True False Source B N7:1 0< MicroLogix 1400 ADD word 1.8868 µs 0.3540 µs Dest N7:2 0< long word 1.7807 µs 0.3546 µs word 1.8426 µs 0.3767 µs long word 1.7651 µs...
  • Page 208: Neg - Negate

    Dest N7:1 Controller Data Size When Rung Is: 0< True False MicroLogix 1400 word 1.3570 µs 0.3548 µs long word 1.3660 µs 0.3413 µs Use the NEG instruction to change the sign of the Source and place the result in the Destination.
  • Page 209 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Math Instructions Source and Destination do not have to be the same data type. However, if the signed result does not fit in Destination, the following will occur. ABS Result Does Not Fit in Destination When Both Operands Are Integers When At Least One Operand is Floating Point Data •...
  • Page 210: Scl - Scale

    When Rung Is: 0< Offset N7:2 True False 0< MicroLogix 1400 10.9080 µs 0.3608 µs Dest N7:3 0< The SCL instruction causes the value at the Source address to be multiplied by the Rate (slope) value. The resulting value is added to the Offset and the rounded result is placed in the Destination.
  • Page 211: Scp - Scale With Parameters

    Execution Time for the SCP Instruction Scale w/Parameters Controller Data Size When Rung Is: Input N7:0 0< True False Input Min. N7:1 0< MicroLogix 1400 word 83.2977 µs 0.3878 µs Input Max. N7:2 long word 87.0493 µs 0.2910 µs 0< Scaled Min. N7:3 0<...
  • Page 212 • • • • (1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit. (2) See Important note about indirect addressing. You cannot use indirect addressing with: S, MG, PD, RTC, HSC, PTOX, IMPORTANT PWMX, STI, EII, BHI, MMI, CS, IOS, and DLS files.
  • Page 213: Sqr - Square Root

    Dest N7:1 Controller Data Size When Rung Is: 0< True False MicroLogix 1400 word 54.8140 µs 0.3561 µs long word 45.1450 µs 0.3732 µs The SQR instruction calculates the square root of the absolute value of the source and places the rounded result in the destination.
  • Page 214 • • (1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit. (2) The Data Log Status file can only be used for the following math instructions: ADD, SUB, MUL, DIV, NEG, and SCP.
  • Page 215 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Math Instructions Instruction Operation When the rung is true, this instruction shall compute the sine of the Source (in radians) and place the result in Destination. If the Destination is floating point, the result shall always be rounded using the round to even rule.
  • Page 216: Cos - Cosine

    • • (1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit. (2) The Data Log Status file can only be used for the following math instructions: ADD, SUB, MUL, DIV, NEG, and SCP.
  • Page 217 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Math Instructions Instruction Operation When the rung is true, this instruction shall compute cosine of the Source (in radians) and place the result in Destination. If the Destination is floating point, the result shall always be rounded using the round to even rule.
  • Page 218: Tan - Tangent

    • • (1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit. (2) The Data Log Status file can only be used for the following math instructions: ADD, SUB, MUL, DIV, NEG, and SCP.
  • Page 219 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Math Instructions Instruction Operation When the rung is true, this instruction shall compute tangent of the Source (in radians) and place the result in Destination. If the Destination is floating point, the result shall always be rounded using the round to even rule.
  • Page 220: Asn - Arc Sine

    • • (1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit. (2) The Data Log Status file can only be used for the following math instructions: ADD, SUB, MUL, DIV, NEG, and SCP.
  • Page 221 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Math Instructions You cannot use indirect addressing with: S, MG, PD, RTC, HSC, PTOX, IMPORTANT PWMX, STI, EII, BHI, MMI, CS, IOS, and DLS files. Instruction Operation When the rung is true, this instruction shall compute arc-sine of the Source and place the result in Destination.
  • Page 222: Acs - Arc Cosine

    • • (1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit. (2) The Data Log Status file can only be used for the following math instructions: ADD, SUB, MUL, DIV, NEG, and SCP.
  • Page 223: Atn - Arc Tangent

    Arc Tangent Source N7:0 Execution Time for the ATN Instruction 0< Dest N7:1 Controller Data Size When Rung Is: 0< True False MicroLogix 1400 word 146.7510 µs 0.3740 µs long word 146.4885 µs 0.4088 µs Publication 1766-RM001A-EN-P - October 2008...
  • Page 224 • • (1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit. (2) The Data Log Status file can only be used for the following math instructions: ADD, SUB, MUL, DIV, NEG, and SCP.
  • Page 225: Deg - Radians To Degrees

    Data Size When Rung Is: 0< True False Dest N7:1 0< MicroLogix 1400 word 27.7310 µs 0.4106 µs long word 31.2470 µs 0.4098 µs The DEG instruction converts the Source(in radians) to degrees and store the result in the Destination.
  • Page 226 • • (1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit. (2) The Data Log Status file can only be used for the following math instructions: ADD, SUB, MUL, DIV, NEG, and SCP.
  • Page 227: Rad - Degrees To Radians

    Execution Time for the RAD Instruction Degrees to Radians Source N7:0 Controller Data Size When Rung Is: 0< True False Dest N7:1 0< MicroLogix 1400 word 23.0610 µs 0.4070 µs long word 26.211 µs 0.3790 µs Publication 1766-RM001A-EN-P - October 2008...
  • Page 228 • • (1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit. (2) The Data Log Status file can only be used for the following math instructions: ADD, SUB, MUL, DIV, NEG, and SCP.
  • Page 229: Ln - Natural Log

    Natural Log Source N7:0 Execution Time for the LN Instruction 0< Dest N7:1 Controller Data Size When Rung Is: 0< True False MicroLogix 1400 word 127.3260 µs 0.4094 µs long word 130.3635 µs 0.4094 µs Publication 1766-RM001A-EN-P - October 2008...
  • Page 230 • • (1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit. (2) The Data Log Status file can only be used for the following math instructions: ADD, SUB, MUL, DIV, NEG, and SCP.
  • Page 231: Log - Base 10 Logarithm

    Log Base 10 Source N7:0 Execution Time for the LOG Instruction 0< Dest N7:1 Controller Data Size When Rung Is: 0< True False MicroLogix 1400 word 112.7110 µs 0.7686 µs long word 19.8070 µs 0.7694 µs Publication 1766-RM001A-EN-P - October 2008...
  • Page 232 • • (1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit. (2) The Data Log Status file can only be used for the following math instructions: ADD, SUB, MUL, DIV, NEG, and SCP.
  • Page 233: Xpy - X Power Y

    Execution Time for the XPY Instruction 0< Source B N7:1 Controller Data Size When Rung Is: 0< True False Dest N7:2 0< MicroLogix 1400 word 66.2050 µs 0.3920 µs long word 69.0550 µs 0.3548 µs Publication 1766-RM001A-EN-P - October 2008...
  • Page 234 • • (1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit. (2) The Data Log Status file can only be used for the following math instructions: ADD, SUB, MUL, DIV, NEG, and SCP.
  • Page 235 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Math Instructions XPY Instruction Operation Inputs Conditions Output Source A Source B Destination S:2/14 S:0/3-0 S:5/0 Destination Type Type Type S, Z, V, C W,DW, F W,DW, F Source A > 0 && 0,0,0,0 (A)**(B) (A)**(B) is +NRM W,DW, F W,DW, F Source A >...
  • Page 236: Cpt - Compute

    Execution Time for the CPT Instruction Controller Data Size When Rung Is: True False MicroLogix 1400 word 4.8535 µs 0.6610 µs The CPT instruction performs copy, arithmetic, logical, and conversion operations. You define the operation in the Expression and the result is written in the Destination.
  • Page 237 • • (1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit. (2) The Data Log Status file can only be used for the following math instructions: ADD, SUB, MUL, DIV, NEG, and SCP.
  • Page 238 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Math Instructions CPT Instruction Operation Sub Instructions Symbol Covert to BCD From BCD to Binary Natural Log Base 10 Log Tangent Sine Cosine Arc Tangent Arc Sine Arc Cosine Absolute Value Radians to Degrees Degrees to Radians X to the Power Y * *(XPY) MATH FLAGS EFFECTS...
  • Page 239: Application Specific Instructions

    Instruction Type: Output Clock Execution Time for the RHC Instruction Read High Speed Clock Dest N9:0 Controller Data Size When Rung Is: True False MicroLogix 1400 word 2.5910 µs 0.2150 µs long word 3.1210 µs 0.1802 µs Publication 1766-RM001A-EN-P - October 2008...
  • Page 240 • • (1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit. (2) The Data Log Status file can only be used for the following math instructions: ADD, SUB, MUL, DIV, NEG, and SCP.
  • Page 241: Rpc - Read Program Checksum

    • • (1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit. (2) The Data Log Status file can only be used for the following math instructions: ADD, SUB, MUL, DIV, NEG, and SCP.
  • Page 242: Tdf - Compute Time Difference

    Data Size When Rung Is: Stop N7:1 True False Dest N7:2 MicroLogix 1400 word 5.9770 µs 0.2219 µs long word 7.2150 µs 0.2035 µs The Compute Time Difference Instruction (TDF) is used to calculate the number of 10 µs ticks between any two time-stamps captured using the RHC instruction.
  • Page 243 • • (1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit. (2) The Data Log Status file can only be used for the following math instructions: ADD, SUB, MUL, DIV, NEG, and SCP.
  • Page 244 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Application Specific Instructions Any TDF instruction with a double word address computes the time difference between 2 timestamps captured within 42949.67295 seconds of each other (4294967295 10 µsec ticks). It calculates an invalid result if more than 42949.67295 seconds have elapsed between the start and stop timestamps.
  • Page 245: Conversion Instructions

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Chapter Conversion Instructions The conversion instructions multiplex and de-multiplex data and perform conversions between binary and decimal values. Instruction Used To: Page DCD - Decode 4 to 1-of-16 Decodes a 4-bit value (0…15), turning on the corresponding bit in the 16-bit destination.
  • Page 246: Dcd - Decode 4 To 1-Of-16

    Dest N7:1 True False 0000000000000000< MicroLogix 1400 4.6300 µs 0.2720 µs The DCD instruction uses the lower four bits of the source word to set one bit of the destination word. All other bits in the destination word are cleared. The DCD instruction converts the values as shown in the table...
  • Page 247: Enc - Encode 1-Of-16 To 4

    N7:0 0000000000000000< True False Dest N7:1 MicroLogix 1400 5.7230 µs 0.3660 µs 0000h< The ENC instruction searches the source from the lowest to the highest bit, looking for the first bit set. The corresponding bit position is written to the destination as an integer. The ENC instruction converts the values as...
  • Page 248: Frd - Convert From Binary Coded Decimal (Bcd)

    Controller When Rung Is: From BCD True False Source 0000h< MicroLogix 1400 5.4790 µs 0.5151 µs Dest N7:0 0< The FRD instruction is used to convert the Binary Coded Decimal (BCD) source value to an integer and place the result in the destination.
  • Page 249 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Conversion Instructions • 32768 if the source is the math register (allowing a 5-digit BCD value with the lower 4 digits stored in S:13 and the high order digit in S:14). If the source is the math register, it must be directly addressed as S:13. S:13 is the only status file element that can be used.
  • Page 250 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Conversion Instructions To convert numbers larger than 9999 BCD, the source must be the Math Register (S:13). You must reset the Minor Error Bit (S:5.0) to prevent an error. Example The BCD value 32,760 in the math register is converted and stored in N7:0.
  • Page 251 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Conversion Instructions Clearing S:14 before executing the FRD instruction is shown below: MOVE 0001 0010 0011 0100 Source N7:2 4660 Dest S:13 4660 CLEAR Dest S:14 S:13 and S:14 are FROM BCD Source S:13 displayed in BCD format. 00001234 Dest N7:0...
  • Page 252: Tod - Convert To Binary Coded Decimal (Bcd)

    Dest N7:1 True False 0000h< MicroLogix 1400 5.9198 µs 0.3916 µs The TOD instruction is used to convert the integer source value to BCD and place the result in the destination. Addressing Modes and File Types can be used as shown in the following...
  • Page 253 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Conversion Instructions If the destination is the math register, it must be directly addressed as S:13. S:13 is the only status file element that can be used. Updates to Math Status Bits Math Status Bits With this Bit: The Controller: S:0/0 Carry...
  • Page 254 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Conversion Instructions To BCD The destination value is Source N7:3 9760< displayed in BCD format. Dest N10:0 9760< N7:3 Decimal 0010 0110 0010 0000 N7:0 4-digit BCD 1001 0111 0110 0000 Publication 1766-RM001A-EN-P - October 2008...
  • Page 255: Gcd - Gray Code

    Dest N7:1 True False 190< MicroLogix 1400 5.4970 µs 0.5618 µs The GCD instruction converts Gray code data (Source) to an integer value (Destination). If the Gray code input is negative (high bit set), the Destination is set to 32767 and the overflow flag is set.
  • Page 256 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Conversion Instructions Notes: Publication 1766-RM001A-EN-P - October 2008...
  • Page 257: Using Logical Instructions

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Chapter Logical Instructions The logical instructions perform bit-wise logical operations on individual words. Instruction Used To: Page AND - Bit-Wise AND Perform an AND operation OR - Logical OR Perform an inclusive OR operation XOR - Exclusive OR Perform an Exclusive Or operation NOT - Logical NOT Perform a NOT operation...
  • Page 258: Updates To Math Status Bits

    • • (1) PTOX and PWMX files are valid for MicroLogix 1400 BXB or BXBA unit. (2) See Important note about indirect addressing. (3) Source B does not apply to the NOT instruction. The NOT instruction only has one source value.
  • Page 259: And - Bit-Wise And

    Data Size When Rung Is: 0000h< Dest N7:2 True False 0000h< MicroLogix 1400 word 1.7894 µs 0.3781 µs long word 1.8185 µs 0.3967 µs The AND instruction performs a bit-wise logical AND of two sources and places the result in the destination.
  • Page 260: Or - Logical Or

    Data Size When Rung Is: 0000h< Dest N7:2 True False 0000h< MicroLogix 1400 word 1.8278 µs 0.3962 µs long word 1.8374 µs 0.3956 µs The OR instruction performs a logical OR of two sources and places the result in the destination.
  • Page 261: Xor - Exclusive Or

    Data Size When Rung Is: 0000h< Dest N7:2 True False 0000h< MicroLogix 1400 word 4.9480 µs 0.3671 µs long word 4.8454 µs 0.3646 µs The XOR instruction performs a logical exclusive OR of two sources and places the result in the destination.
  • Page 262: Not - Logical Not

    Dest N7:1 Controller Data Size When Rung Is: 0< True False MicroLogix 1400 word 1.3682 µs 0.4074 µs long word 1.3620 µs 0.3900 µs The NOT instruction is used to invert the source bit-by-bit (one’s complement) and then place the result in the destination.
  • Page 263: Chapter 14 Mov - Move

    Dest N7:1 Controller Data Size When Rung Is: 0< True False MicroLogix 1400 word 1.4231 µs 0.3542 µs long word 1.4103 µs 0.3722 µs The MOV instruction is used to move data from the source to the destination. As long as the rung remains true, the instruction moves the data each scan.
  • Page 264 • • • (1) PTOX and PWMX files are valid for MicroLogix 1400 BXB or BXBA unit. (2) See Important note about indirect addressing. (3) Some elements can be written to. Consult the function file for details. You cannot use indirect addressing with: S, MG, PD, RTC, HSC, PTOX, IMPORTANT PWMX, STI, EII, BHI, MMI, CS, IOS, and DLS files.
  • Page 265 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Move Instructions If you want to move one word of data without affecting the math flags, use a copy (COP) instruction with a length of 1 word instead of the MOV instruction. Publication 1766-RM001A-EN-P - October 2008...
  • Page 266: Mvm - Masked Move

    Data Size When Rung Is: 0000h< Dest N7:2 True False 0< MicroLogix 1400 word 0.2210 µs 0.1750 µs long word 1.9050 µs 0.2180 µs The MVM instruction is used to move data from the source to the destination, allowing portions of the destination to be masked. The mask...
  • Page 267 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Move Instructions Mask Example (Word Addressing Level) Word Value in Value in Binary Hexadecimal 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Value in Destination FFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Before Move Source Value 5555...
  • Page 268 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Move Instructions Math Status Bits With this Bit: The Controller: S:0/3 Sign Bit sets if the MSB of the destination is set, otherwise resets Publication 1766-RM001A-EN-P - October 2008...
  • Page 269 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Chapter File Instructions The file instructions perform operations on file data. Instruction Used To: Page CPW - Copy Word Copy words of data from one location to another COP - Copy File Copy a range of data from one file location to another FLL - Fill File Load a file with a program constant or a...
  • Page 270: Chapter 15 Cpw - Copy Word

    Controller When Rung Is: Length True False MicroLogix 1400 2.5630 µs 0.2034 µs The CPW instruction copies words of data, in ascending order, from one location (Source) to another (Destination). Although similar to the File Copy (COP) instruction, the CPW instruction allows different source and destination parameters.
  • Page 271: Cop - Copy File

    Length Controller When Rung Is: True False MicroLogix 1400 3.6020 µs 0.1853 µs The COP instruction copies blocks of data from one location into another. COP Instruction Valid Addressing Modes and File Types For definitions of the terms used in this table see Using the Instruction Descriptions on page 92.
  • Page 272 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive File Instructions You cannot use indirect addressing with: S, MG, PD, RTC, HSC, PTOX, IMPORTANT PWMX, STI, EII, BHI, MMI, CS, IOS, and DLS files. The source and destination file types must be the same except bit (B) and integer (N);...
  • Page 273: Fll - Fill File

    Dest #N7:1 Length Controller Data Size When Rung Is: True False MicroLogix 1400 word 3.1531 µs 0.5290 µs long word 3.2470 µs 0.3918 µs The FLL instruction loads elements of a file with either a constant or an address data value for a given length. The following figure shows how file instruction data is manipulated.
  • Page 274: Bsl - Bit Shift Left

    When Rung Is: Length 1< True False MicroLogix 1400 6.1018 µs 5.8258 µs The BSL instruction loads data into a bit array on a false-to-true rung transition, one bit at a time. The data is shifted left through the array, then unloaded, one bit at a time.
  • Page 275 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive File Instructions Source Bit I:22/12 Data block is shifted one bit at a time from bit 16…73. 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 58 Bit Array #B3:1 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 RESERVED...
  • Page 276: Bsr - Bit Shift Right

    When Rung Is: Length 1< True False MicroLogix 1400 6.0790 µs 5.9942 µs If you wish to shift more than one bit per scan, you must create a loop in your application using the JMP, LBL, and CTU instructions. The BSR instruction loads data into a bit array on a false-to-true rung transition, one bit at a time.
  • Page 277 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive File Instructions Unload Bit (R6:0/10) 38 Bit Array #B3:2 INVALID Data block is shifted one bit at Source Bit a time from bit 69…32. I:23/06 This instruction uses the following operands: • File - The file operand is the address of the bit array that is to be manipulated.
  • Page 278 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive File Instructions BSR Instruction Valid Addressing Modes and File Types For definitions of the terms used in this table see Using the Instruction Descriptions on page 92. Address Data Files Function Files Address Level Mode Parameter File •...
  • Page 279: Ffl - First In, First Out (Fifo) Load

    Data Size When Rung Is: FIFO #N7:1 Control R6:0 True False Length 1< MicroLogix 1400 word 8.2970 µs 6.1730 µs Position 0< long word 9.0910 µs 7.4630 µs On a false-to-true rung transition, the FFL instruction loads words or long words into a user-created file called a FIFO stack.
  • Page 280 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive File Instructions • Control - This is a control file address. The status bits, stack length, and the position value are stored in this element. The control element consists of 3 words: Word 0 not used Word 1 Length - maximum number of words or long words in the stack.
  • Page 281: Ffu - First In, First Out (Fifo) Unload

    Data Size When Rung Is: Dest N7:1 Control R6:0 True False Length 1< MicroLogix 1400 word 8.7180 µs 6.6490 µs Position 0< long word 9.8890 µs 7.2150 µs On a false-to-true rung transition, the FFU instruction unloads words or long words from a user-created file called a FIFO stack. The data is unloaded using first-in, first-out order.
  • Page 282 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive File Instructions • Destination - The destination operand is a word or long word address that stores the value which exits from the FIFO stack. The FFU instruction unloads this value from the first location on the FIFO stack and places it in the destination address.
  • Page 283 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive File Instructions You cannot use indirect addressing with: S, MG, PD, RTC, HSC, PTOX, PWMX, STI, EII, BHI, MMI, CS, IOS, and DLS IMPORTANT files. Publication 1766-RM001A-EN-P - October 2008...
  • Page 284: Lfl - Last In, First Out (Lifo) Load

    Data Size When Rung Is: LIFO #N7:1 Control R6:0 True False Length 1< MicroLogix 1400 word 6.4950 µs 6.5650 µs Position 0< long word 7.3570 µs 7.0030 µs On a false-to-true rung transition, the LFL instruction loads words or long words into a user-created file called a LIFO stack.
  • Page 285 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive File Instructions • Control - This is a control file address. The status bits, stack length, and the position value are stored in this element. The control element consists of 3 words: 9 8 7 6 5 4 3 2 1 0 Word 0 not used Word 1...
  • Page 286: Lfu - Last In, First Out (Lifo) Unload

    Data Size When Rung Is: Dest N7:1 True False Control R6:0 Length 1< MicroLogix 1400 word 6.8227 µs 6.5089 µs Position 0< long word 7.6680 µs 7.2102 µs On a false-to-true rung transition, the LFU instruction unloads words or long words from a user-created file called a LIFO stack. The data is unloaded using last-in, first-out order (the data in the stack is not cleared after unloading).
  • Page 287 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive File Instructions • Control - This is a control file address. The status bits, stack length, and the position value are stored in this element. The control element consists of 3 words: 9 8 7 6 5 4 3 2 1 0 Word 0 not used Word 1...
  • Page 288: Swp - Swap

    Controller When Rung Is: True False MicroLogix 1400 1.0728 µs 0.1963 µs Use the SWP instruction to swap the low and high bytes of a specified number of words in a bit, integer, or string file. The SWP instruction has 2 operands: •...
  • Page 289 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Chapter Sequencer Instructions Sequencer instructions are used to control automatic assembly machines or processes that have a consistent and repeatable operation. They are typically time based or event driven. Instruction Used To: Page SQC - Sequencer Compare Compare 16-bit data with stored data SQO - Sequencer Output Transfer 16-bit data to word addresses...
  • Page 290: Chapter 16 Sqc- Sequencer Compare

    Compare Execution Time for the SQC Instruction Controller Data Size When Rung Is: Sequencer Compare File #B3:0 True False Mask N7:0 MicroLogix 1400 word 3.1762 µs 0.8505 µs Source I:0.0 Control R6:0 long word 3.2480 µs 0.9823 µs Length 1<...
  • Page 291 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Sequencer Instructions The following figure explains how the SQC instruction works. Sequencer Compare File #B10:11 Mask FFF0 Source I:3.0 Control R6:21 Length 4< Position 2< Input Word I:3.0 0010 0100 1001 1101 Mask Value FFF0 1111 1111 1111 0000...
  • Page 292 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Sequencer Instructions If mask is direct or indirect, the position selects the location in the specified file. • Source - This is the value that is compared to file. • Control - This is a control file address. The status bits, stack length, and the position value are stored in this element.
  • Page 293: Sqo- Sequencer Output

    Control R6:0 Length 1< True False Position 0< MicroLogix 1400 word 3.6105 µs 0.9480 µs Long word 3.1920 µs 1.1850 µs On a false-to-true rung transition, the SQO instruction transfers masked source reference words or long words to the destination for the control of sequential machine operations.
  • Page 294 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Sequencer Instructions The bits mask data when reset (0) and pass data when set (1). The instruction will not change the value in the destination word unless you set mask bits. The mask can be fixed or variable. It is fixed if you enter a hexadecimal code.
  • Page 295 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Sequencer Instructions This instruction uses the following operands: • File - This is the sequencer reference file. Its contents, on an element-by-element, basis are masked and stored in the destination. If file type is word, then mask and source must be words. If file type is long word, mask and source must be long words.
  • Page 296: Sql - Sequencer Load

    Data Size When Rung Is: Length 1< Position 0< True False MicroLogix 1400 word 2.7700 µs 1.1741 µs long word 2.8680 µs 1.2800 µs On a false-to-true rung transition, the SQL instruction loads words or long words into a sequencer file at each step of a sequencer operation. This instruction uses the following operands: •...
  • Page 297 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Sequencer Instructions • Source - The source operand is a constant or address of the value used to fill the currently available position sequencer file. The address level of the source must match the sequencer file. If file is a word type, then source must be a word type.
  • Page 298 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Sequencer Instructions (1) See Important note about indirect addressing. (2) File Direct and File Indirect addressing also applies. (3) Control file only. You cannot use indirect addressing with: S, MG, PD, RTC, HSC, PTOX, IMPORTANT PWMX, STI, EII, BHI, MMI, CS, IOS, LCD, and DLS files. Publication 1766-RM001A-EN-P - October 2008...
  • Page 299: Chapter 17 Jmp - Jump To Label

    Execution Time for the JMP Instruction Controller When Rung Is: True False MicroLogix 1400 0.3290 µs 0.2320 µs The JMP instruction causes the controller to change the order of ladder execution. Jumps cause program execution to go to the rung marked LBL label number.
  • Page 300: Lbl - Label

    Controller When Rung Is: True False MicroLogix 1400 0.2633 µs The LBL instruction is used in conjunction with a jump (JMP) instruction to change the order of ladder execution. Jumps cause program execution to go to the rung marked LBL label number.
  • Page 301: Ret - Return From Subroutine

    Return Controller When Rung Is: True False MicroLogix 1400 0.3710 µs 0.2510 µs The RET instruction marks the end of subroutine execution or the end of the subroutine file. It causes the controller to resume execution at the instruction following the JSR instruction, user interrupt, or user fault routine that caused this subroutine to execute.
  • Page 302: End - Program End

    Controller Instruction When Rung Is: True False MicroLogix 1400 1.2016 µs 1.2032 µs The END instruction must appear at the end of every ladder program. For the main program file (file 2), this instruction ends the program scan. For a subroutine, interrupt, or user fault file, the END instruction causes a return from subroutine.
  • Page 303: Publication 1766-Rm001A-En-P - October

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Program Control Instructions While the rung state of the first MCR instruction is true, execution proceeds as if the zone were not present. When the rung state of the first MCR instruction is false, the ladder logic within the MCR zone is executed as if the rung is false.
  • Page 304 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Program Control Instructions Notes: Publication 1766-RM001A-EN-P - October 2008...
  • Page 305: Input And Output Instructions Iim - Immediate Input With Mask

    This instruction is used for embedded I/O only. It is not designed to be used Mask N7:0 with expansion I/O. Length Execution Time for the IIM Instruction Controller When Rung Is: True False MicroLogix 1400 10.9098 µs 0.2064 µs Publication 1766-RM001A-EN-P - October 2008...
  • Page 306 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Input and Output Instructions The IIM instruction allows you to selectively update input data without waiting for the automatic input scan. This instruction uses the following operands: • Slot - This operand defines the location where data is obtained for updating the input file.
  • Page 307: Iom - Immediate Output With Mask

    Execution Time for the IOM Instruction Controller When Rung Is: True False MicroLogix 1400 10.4010 µs 0.3220 µs The IOM instruction allows you to selectively update output data without waiting for the automatic output scan. This instruction uses the following operands: •...
  • Page 308: Ref- I/O Refresh

    When Rung Is: True False MicroLogix 1400 See MicroLogix 1400 Scan Time 0.1490 µs Calculation on page 550 The REF instruction is used to interrupt the program scan to execute the I/O scan and service communication portions of the operating cycle for all communication channels.
  • Page 309: Using Interrupts

    An interrupt is an event that causes the controller to suspend the task it is currently performing, perform a different task, and then return to the suspended task at the point where it suspended. The Micrologix 1400 supports the following User Interrupts: •...
  • Page 310 6. resumes normal execution from the point where the controller program was interrupted When Can the Controller Operation be Interrupted? The Micrologix 1400 controllers only allow interrupts to be serviced during certain periods of a program scan. They are: • At the start of a ladder rung •...
  • Page 311 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using Interrupts The interrupt is only serviced by the controller at these opportunities. If the interrupt is disabled, the pending bit is set at the next occurrence of one of the three occasions listed above. If you enable interrupts during the program scan via an OTL, OTE, or UIE, ATTENTION this instruction (OTL, OTE, or UIE) must be the last instruction executed on the rung (last instruction on last branch).
  • Page 312 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using Interrupts The priorities from highest to lowest are: User Fault Routine highest priority Event Interrupt0 Event Interrupt1 High-Speed Counter Interrupt0 Event Interrupt2 Event Interrupt3 High-Speed Counter Interrupt1 Selectable Timed Interrupt Event Interrupt4 High-Speed Counter Interrupt2 Event Interrupt5 High-Speed Counter Interrupt3 Event Interrupt6...
  • Page 313 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using Interrupts Table 3: Recoverable Non-Recoverable Non-User Fault Recoverable Faults are caused Non-Recoverable Faults are Non-User Faults are caused by the user and may be caused by the user, and by various conditions that recovered from by executing cannot be recovered from.
  • Page 314: User Interrupt Instructions

    Execution Time for the INT Instruction Controller When Rung Is: True False MicroLogix 1400 0.5460 µs 0.5460 µs The INT instruction is used as a label to identify a user interrupt service routine (ISR). This instruction is placed as the first instruction on a rung and is always evaluated as true.
  • Page 315: Sts - Selectable Timed Start

    Time Controller When Rung Is: True False MicroLogix 1400 20.8470 µs 0.2125 µs The STS instruction can be used to start and stop the STI function or to change the time interval between STI user interrupts. The STI instruction has one operand: •...
  • Page 316: Uid - User Interrupt Disable

    Interrupt Types Controller When Rung Is: True False MicroLogix 1400 2.7470 µs 0.1859 µs The UID instruction is used to disable selected user interrupts. The table below shows the types of interrupts with their corresponding disable bits: Types of Interrupts Disabled by the UID Instruction...
  • Page 317: Uie - User Interrupt Enable

    Interrupt Types Controller When Rung Is: True False MicroLogix 1400 3.4226 µs 0.1968 µs The UIE instruction is used to enable selected user interrupts. The table below shows the types of interrupts with their corresponding enable bits: Types of Interrupts Disabled by the UIE Instruction...
  • Page 318: Uif - User Interrupt Flush

    Interrupt Types Controller When Rung Is: True False MicroLogix 1400 2.7930 µs 0.1847 µs The UIF instruction is used to flush (remove pending interrupts from the system) selected user interrupts. The table below shows the types of interrupts with their corresponding flush bits:...
  • Page 319 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using Interrupts Types of Interrupts Disabled by the UIF Instruction Interrupt Element Decimal Corresponding Value EII - Event Input Interrupt Event 4 16384 bit 14 HSC - High-Speed Counter HSC2 8192 bit 13 EII - Event Input Interrupt Event 5 4096 bit 12...
  • Page 320: Using The Selectable Timed Interrupt (Sti) Function File

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using Interrupts Using the Selectable Timed Interrupt (STI) Function File The Selectable Timed Interrupt (STI) provides a mechanism to solve time critical control requirements. The STI is a trigger mechanism that allows you to scan or solve control program logic that is time sensitive. Example of where you would use the STI are: •...
  • Page 321 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using Interrupts Selectable Time Interrupt (STI) Function File Sub-Elements Summary Selectable Timed Interrupt Function File (STI:0) Sub-Element Description Address Data Format Type User Program For More Access Information PFN - Program File Number STI:0.PFN word (INT) control read only ER - Error Code...
  • Page 322 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using Interrupts STI Error Code Error Recoverable Fault Description Code (Controller) Invalid Program File Program file number is less than 3, greater than 255, or does not Number exist. STI User Interrupt Executing (UIX) Sub-Element Description Address Data Format Type User Program...
  • Page 323 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using Interrupts STI User Interrupt Pending (UIP) Sub-Element Description Address Data Format Type User Program Access UIP - User Interrupt Pending STI:0/UIP binary (bit) status read only The UIP (User Interrupt Pending) is a status flag that represents an interrupt is pending.
  • Page 324: Using The Event Input Interrupt (Eii) Function File

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using Interrupts STI Error Detected (ED) Sub-Element Description Address Data Format Type User Program Access ED - Error Detected STI:0/ED binary (bit) status read only The ED (Error Detected) flag is a status bit that can be used by the control program to detect if an error is present in the STI sub-system.
  • Page 325 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using Interrupts Each EII can be configured to monitor any one of the first eight inputs (I1:0.0/0 to I1:0.0/7). Each EII can be configured to detect rising edge or falling edge input signals. When the configured input signal is detected at the input terminal, the controller immediately scans the configured subroutine.
  • Page 326 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using Interrupts EII Function File Sub-Elements EII Program File Number (PFN) Sub-Element Description Address Data Format Type User Program Access PFN - Program File Number EII:0.PFN word (INT) control read only PFN (Program File Number) defines which subroutine is called (executed) when the input terminal assigned to EII:0 detects a signal.
  • Page 327 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using Interrupts EII User Interrupt Executing (UIX) Sub-Element Description Address Data Format Type User Program Access UIX - User Interrupt Executing EII:0/UIX binary (bit) status read only The UIX (User Interrupt Executing) bit is set whenever the EII mechanism detects a valid input and the controller is scanning the PFN.
  • Page 328 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using Interrupts EII User Interrupt Pending (UIP) Sub-Element Description Address Data Format Type User Program Access UIP - User Interrupt Pending EII:0/UIP binary (bit) status read only UIP (User Interrupt Pending) is a status flag that represents an interrupt is pending.
  • Page 329 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using Interrupts EII Error Detected (ED) Sub-Element Description Address Data Format Type User Program Access ED - Error Detected EII:0/ED binary (bit) status read only The ED (Error Detected) flag is a status bit that can be used by the control program to detect if an error is present in the EII sub-system.
  • Page 330 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Using Interrupts Notes: Publication 1766-RM001A-EN-P - October 2008...
  • Page 331: Process Control Instruction

    - Allen Bradley,Rockwell,plc,servo,drive Chapter Process Control Instruction This chapter describes the MicroLogix 1400 Proportional Integral Derivative (PID) instruction. The PID instruction is an output instruction that controls physical properties such as temperature, pressure, liquid level, or flow rate using process loops.
  • Page 332: The Pid Equation

    Derivative 0.01…327.67 (minutes) (1) Applies to MicroLogix 1400 PID range when Reset and Gain Range (RG) bit is set to 1. For more information on reset and gain, see PLC 5 Gain Range (RG) on page 345. The derivative term (rate) provides smoothing by means of a low-pass filter.
  • Page 333: Pd Data File

    - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction PD Data File The PID instruction implemented by the MicroLogix 1400 controllers is virtually identical in function to the PID implementation used by the Allen-Bradley SLC 5/03 and higher processors. Minor differences primarily involve enhancements to terminology.
  • Page 334: Pid - Proportional Integral Derivative

    Control Variable N7:1 True False Setup Screen MicroLogix 1400 7.1750 µs 7.0910 µs It is recommended that you place the PID instruction on a rung without any conditional logic. If conditional logic exists, the Control Variable output remains at its last value, and the CVP CV% term and integral term are both cleared when the rung is false.
  • Page 335: Input Parameters

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction Input Parameters The table below shows the input parameter addresses, data formats, and types of user program access. See the indicated pages for descriptions of each parameter. Input Parameter Descriptions Address Data Format Range Type User For More...
  • Page 336 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction Setpoint (SPS) Input Parameter Address Data Format Range Type User Program Descriptions Access SPS - Setpoint PD10:0.SPS word (INT) control read/write 0…16383 (1) The range listed in the table is for when scaling is not enabled. With scaling, the range is from minimum scaled (MINS) to maximum scaled (MAXS).
  • Page 337 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction Setpoint MIN (MINS) Input Parameter Address Data Range Type User Descriptions Format Program Access MINS - Setpoint PD10:0.MINS word -32,768…+32,767 control read/write Minimum (INT) If the SPV is read in engineering units, then the MINS (Setpoint Minimum) parameter corresponds to the value of the setpoint in engineering units when the control input is at its minimum value.
  • Page 338 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction Output Limit (OL) Output Parameter Address Data Range Type User Program Descriptions Format Access OL - Output Limit PD10:0/OL binary 1 = enabled control read/write 0 = disabled An enabled (1) value enables output limiting to the values defined in PD10:0.CVH (Control Variable High) and PD10.0.CVL (Control Variable Low).
  • Page 339: Output Parameters

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction Control Variable Low Limit (CVL) Output Parameter Address Data Range Type User Program Descriptions Format Access CVL - Control PD10:0.CVL word 0…100% control read/write Variable Low Limit (INT) When the output limit bit (PD10:0/OL) is enabled (1), the CVL (Control Value Low) you enter is the minimum output (in percent) that the Control Variable attains.
  • Page 340 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction Control Variable Percent (CVP) Output Parameter Address Data Range Type User Program Descriptions Format Access CVP - Control Variable Percent PD10:0.CVP word (INT) 0…100 control status read CVP (Control Variable Percent) displays the control variable as a percentage.
  • Page 341: Tuning Parameters

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction Tuning Parameters The table below shows the tuning parameter addresses, data formats, and types of user program access. See the indicated pages for descriptions of each parameter. Table 1: Tuning Parameter Address Data Format Range Type User For More...
  • Page 342 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction Controller Gain (K Tuning Parameter Address Data Format Range Type User Program Descriptions Access KC - Controller Gain - K PD10:0.KC word (INT) 0…32,767 control read/write Gain K (word 3) is the proportional gain, ranging from 0…3276.7 (when RG = 0), or 0…327.67 (when RG = 1).
  • Page 343 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction Rate Term (T Tuning Parameter Address Data Format Range Type User Program Descriptions Access TD - Rate Term - T PD 10:0.TD word (INT) 0…32,767 control read/write Rate T (word 5) is the Derivative term. The adjustment range is 0 to 327.67 minutes.
  • Page 344 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction Time Mode (TM) Tuning Parameter Address Data Range Type User Program Descriptions Format Access TM - Time Mode PD10:0.TM binary 0 or 1 control read/write The time mode bit specifies when the PID is in timed mode (1) or STI mode (0).
  • Page 345 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction Zero Crossing Deadband (ZCD) Tuning Parameter Address Data Range Type User Program Descriptions Format Access ZCD - Zero Crossing PD10:0.ZCD word (INT) 0…32,767 control read/write Deadband The deadband extends above and below the setpoint by the value entered.
  • Page 346 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction Automatic / Manual (AM) Tuning Parameter Address Data Format Range Type User Program Descriptions Access AM - Automatic/Manual PD10:0/AM binary (bit) 0 or 1 control read/write The auto/manual bit can be set or cleared by instructions in your ladder program.
  • Page 347 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction PLC 5 Gain Range (RG) Tuning Parameter Address Data Format Range Type User Program Descriptions Access RG - PLC 5 Gain Range PD10:0/RG binary (bit) 0 or 1 control read/write When set (1), the reset (TI) and gain range enhancement bit (RG) causes the reset minute/repeat value and the gain multiplier (KC) to be divided by a factor of 10.
  • Page 348 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction Loop Update Too Fast (TF) Tuning Parameter Address Data Format Range Type User Program Descriptions Access TF - Loop Update Too PD10:0/TF binary (bit) 0 or 1 status read/write Fast The TF bit is set by the PID algorithm if the loop update time specified cannot be achieved by the controller due to scan time limitations.
  • Page 349 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction CV Lower Limit Alarm (LL) Tuning Parameter Address Data Format Range Type User Program Descriptions Access LL - CV Lower Limit Alarm PD10:0/LL binary (bit) 0 or 1 status read/write The control variable lower limit alarm bit is set (1) when the calculated CV output is less than the lower CV limit.
  • Page 350 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction Enable (EN) Tuning Parameter Address Data Format Range Type User Program Descriptions Access EN - Enable PD10:0/EN binary (bit) 0 or 1 status read only The PID enabled bit is set (1) whenever the PID instruction is enabled. It follows the rung state.
  • Page 351: Runtime Errors

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction Runtime Errors Error code 0036 appears in the status file when a PID instruction runtime error occurs. Code 0036 covers the following PID error conditions, each of which has been assigned a unique single byte code value that appears in the MSB of the second word of the control block.
  • Page 352: Analog I/O Scaling

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction Analog I/O Scaling To configure an analog input for use in a PID instruction, the analog data must be scaled to match the PID instruction parameters. In the MicroLogix 1400, the process variable (PV) in the PID instruction is designed to work with a data range of 0…16,383.
  • Page 353: Application Notes

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction The configuration for the analog output is virtually identical. Simply address the PID control variable (CV) to the analog output address and configure the analog output to “Scaled for PID” behavior. Application Notes The following paragraphs discuss: •...
  • Page 354 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction Input/Output Ranges The input module measuring the process variable (PV) must have a full scale binary range of 0…16383. If this value is less than 0 (bit 15 set), then a value of zero is used for PV and the “Process var out of range” bit is set (bit 12 of word 0 in the control block).
  • Page 355 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction Scaling to Engineering Units Scaling lets you enter the setpoint and zero-crossing deadband values in engineering units, and display the process variable and error values in the same engineering units. Remember, the process variable PV must still be within the range 0…16383.
  • Page 356 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction Zero-Crossing Deadband DB The adjustable deadband lets you select an error range above and below the setpoint where the output does not change as long as the error remains within this range. This lets you control how closely the process variable matches the setpoint without changing the output.
  • Page 357 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction Output Limiting with Anti-Reset Windup You may set an output limit (percent of output) on the control variable. When the instruction detects that the control variable has exceeded a limit, it sets an alarm bit (bit LL for lower limit, bit UL for upper limit), and prevents the control variable from exceeding either limit value.
  • Page 358: Application Examples

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction PID Rung State If the PID rung is false, the integral sum (IS) is cleared and CV remains in its last state. Feed Forward or Bias Applications involving transport lags may require that a bias be added to the CV output in anticipation of a disturbance.
  • Page 359 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction 2. Connect your process control equipment to your analog modules. Download your program to the processor. Leave the processor in the program mode. Ensure that all possibilities of machine motion have been considered with ATTENTION respect to personal safety and equipment damage.
  • Page 360 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction Record the gain value. Return to the MANUAL mode (stop the process if necessary). 10. Set the loop update time (and STI time interval if applicable) to a value of 5 to 10 times faster than the natural period. For example, if the cycle time is 20 seconds, and you choose to set the loop update time to 10 times faster than the natural rate, set the loop update time to 200, which would result in a 2-second rate.
  • Page 361 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction – type: 0 for CO% 2. Enter the REM RUN mode and verify that PV=0. 3. Type: 20 in CO% 4. Record the PV = _______ 5. Type: 40 in CO%. 6. Record the PV = _______ 7.
  • Page 362 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Process Control Instruction 4. Watch the PV. When the PV starts to change, stop your stopwatch. Record this value. It is the deadtime. 5. Multiply the deadtime by 4. This value approximates the natural period. For example, if deadtime = 3 seconds, then 4 x 3 = 12 seconds (≅...
  • Page 363: Ascii Instructions

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Chapter ASCII Instructions This chapter contains general information about the ASCII instructions and explains how they function in your control program. This chapter is arranged into the following sections: • Instruction Types and Operation on page 362 General Information •...
  • Page 364: Instruction Types And Operation

    These instructions use or alter the communication channel for receiving or transmitting data. All ASCII port control instructions support channel 2, as well as channel 0. The following table lists the ASCII port control instructions used by the MicroLogix 1400 controllers: Table 21.2 MicroLogix 1400...
  • Page 365: Protocol Overview

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive ASCII Instructions When any of the other port control instructions are encountered in a ladder logic program, it may or may not execute immediately depending on the contents of the ASCII queue. The ASCII queue is a FIFO (first-in, first-out) queue which can contain up to 16 instructions.
  • Page 366: String (St) Data File

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive ASCII Instructions See on page 624 for the ASCII parameters that you set via the Channel 0 configuration screens in your programming software. Configuration of the two append characters for the AWA instruction can be found in the General tab of Channel Configuration option in RSLogix 500/RSLogix Micro.
  • Page 367: Control Data File

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive ASCII Instructions String Data File Structure String Element Word upper byte lower byte String Length - number of characters (range is from 0…82) character 0 character 1 character 2 character 3 ↓ ↓ ↓ character 78 character 79 character 80 character 81...
  • Page 368 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive ASCII Instructions Control Data File File Description The control data element is used by ASCII instructions to store control information required to operate the instruction. The control data element for ASCII instructions includes status and control bits, an error code byte, and two character words as shown below: ASCII Instructions Control Data File Elements Control Element...
  • Page 369: Acl - Ascii Clear Buffers

    The ACL instruction clears the Receive and/or Transmit buffer(s). This instruction also removes instructions from ASCII queue. For MicroLogix 1400, the ACL instruction can also be used to clear the DF1 communication buffers when the channel is configured for any of the DF1 communication drivers.
  • Page 370: Aic - Ascii Integer To String

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive ASCII Instructions This instruction executes immediately upon the rung transitioning to a true state. Any ASCII transmissions in progress are terminated when the ACL instruction executes. The ASCII queue may contain up to 16 instructions that are waiting to run. Entering Parameters Enter the following parameters when programming this instruction: •...
  • Page 371: Awa - Ascii Write With Append

    Source N7:0 Controller Data Size When Instruction Is: Dest ST14:1 True False MicroLogix 1400 word 8.3032 µs 0.2591 µs long word 9.8913 µs 0.2155 µs The AIC instruction converts an integer or long word value (source) to an ASCII string (destination). The source can be a constant or an address.
  • Page 372 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive ASCII Instructions You configure append characters via the Channel Configuration screen. The default append characters are carriage return and line feed. Programming AWA Instructions When programming ASCII output instructions, always precede the ASCII instruction with conditional logic that detects when new data needs to be sent or, send data on a time interval.
  • Page 373 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive ASCII Instructions – Characters Sent (.POS) may be smaller than String Length (.LEN) if the length of the string sent is less than what was specified in the String Length (.LEN) field. – Characters Sent (.POS) can be greater than the String Length (.LEN) if the appended characters or inserted values from in-line indirection are used.
  • Page 374: Awt - Ascii Write

    Controller When Instruction Is: Characters Sent Error True False MicroLogix 1400 13.6110 µs 7.2706 µs Use the AWT instruction to write characters from a source string to an external device. Programming AWT Instructions When programming ASCII output instructions, always precede the ASCII instruction with conditional logic that either detects when new data needs to be sent or, send data on a time interval.
  • Page 375 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive ASCII Instructions Entering Parameters Enter the following parameters when programming this instruction: • Channel is the number of the RS-232 port, Channel 0. • Source is the string element you want to write. • Control is the control data file. See page 365. •...
  • Page 376: Abl - Test Buffer For Line

    1< True False Error 0< MicroLogix 1400 21.5621 µs 1.8710 µs The ABL instruction is used to determine the number of characters in the receive buffer of the specified communication channel, up to and including the end-of-line characters (termination). This instruction looks for the two termination characters that you configure via the channel configuration screen.
  • Page 377: Acb - Number Of Characters In Buffer

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive ASCII Instructions Entering Parameters Enter the following parameters when programming this instruction: • Channel is the number of the RS-232 port, Channel 0. • Control is the control data file. See page 365. • Characters are the number of characters in the buffer that the controller finds (0…1024).
  • Page 378: Aci - String To Integer

    2< True False Error 0< MicroLogix 1400 22.6154 µs 3.5250 µs Use the ACB instruction to determine the number of characters in the buffer. On a false-to-true transition, the controller determines the total number of characters and records it in the POS field of the control data file.
  • Page 379 Dest N7:0 0< Controller Data Size When Instruction Is: True False MicroLogix 1400 word 6.5719 µs 0.2142 µs long word 7.1146 µs 0.1978 µs Use the ACI instruction to convert a numeric ASCII string to an integer (word or long word) value.
  • Page 380: Acn - String Concatenate

    ACN - String Instruction Type: output Concatenate Execution Time for the ACN Instruction String Concatenate Source A ST10:11 Controller When Instruction Is: Source B ST10:12 Dest ST10:10 True False MicroLogix 1400 9.4852 µs 0.1982 µs Publication 1766-RM001A-EN-P - October 2008...
  • Page 381: Aex - String Extract

    Error (1F39H) is written to the Major Error Fault Code word (S:6). AEX - String Extract Instruction Type: output String Extract Source ST10:0 Execution Time for the AEX Instruction Index Number Controller When Instruction Is: Dest ST10:3 True False MicroLogix 1400 10.0290 µs 0.1850 µs Publication 1766-RM001A-EN-P - October 2008...
  • Page 382: Publication 1766-Rm001A-En-P - October

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive ASCII Instructions The AEX instruction creates a new string by taking a portion of an existing string and storing it in a new string. Entering Parameters Enter the following parameters when programming this instruction: • Source is the existing string. The Source value is not affected by this instruction.
  • Page 383: Ahl - Ascii Handshake Lines

    AND Mask 0002h OR Mask 0000h True False Control R6:2 MicroLogix 1400 26.5267 µs 2.9480 µs Channel Status 0000h< Error 0< The AHL instruction is used to set or reset the RS-232 Request to Send (RTS) handshake control line for a modem. The controller uses the two masks to determine whether to set or reset the RTS control line, or leave it unchanged.
  • Page 384 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive ASCII Instructions • Channel Status displays the current status (0000…001F) of the handshake lines for the specified channel. This status is read-only and resides in the .POS field in the control data file. The following shows how to determine the channel status value. In this example, the value is 001F.
  • Page 385: Ard - Ascii Read Characters

    Dest ST10:4 Control R6:3 True False String Length 10< MicroLogix 1400 9.3760 µs 7.7770 µs Characters Read 0< Error 0< Use the ARD instruction to read characters from the buffer and store them in a string. To repeat the operation, the rung must go from false-to-true.
  • Page 386: Arl - Ascii Read Line

    0< True False Error 0< MicroLogix 1400 33.9910 µs 8.5690 µs Use the ARL instruction to read characters from the buffer, up to and including the Termination characters, and store them in a string. The Termination characters are specified via the Channel Configuration screen.
  • Page 387 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive ASCII Instructions • String Length (LEN) is the number of characters you want to read from the buffer. The maximum is 82 characters. If you specify a length larger than 82, only the first 82 characters are read and moved to the destination.
  • Page 388: Asc - String Search

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive ASCII Instructions For information on the timing of this instruction, see the timing diagram on page 389. ASC - String Search Instruction Type: output String Search Source ST10:6 Execution Time for the ASC Instruction Index String Search ST10:7 Controller When Instruction Is:...
  • Page 389: Asr - Ascii String Compare

    ST10:8 True False Source B ST10:9 MicroLogix 1400 4.8596 µs 0.2016 µs Use the ASR instruction to compare two ASCII strings. The controller looks for a match in length and upper/lower case characters. If two strings are identical, the rung is true; if there are any differences, the rung is false.
  • Page 390 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive ASCII Instructions Addressing Modes and File Types can be used as shown below: ASR Instruction Valid Addressing Modes and File Types For definitions of the terms used in this table see Using the Instruction Descriptions on page 92. Address Function Files Address Level...
  • Page 391: Timing Diagram For Ard, Arl, Awa, And Awt Instructions

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive ASCII Instructions Timing Diagram for ARD, ARL, AWA, and AWT Instructions Rung Condition Enable Bit (EN) Queue Bit (EU) Running Bit (RN) Done Bit Error Bit (DN or ER) 3 4 5 1 - rung goes true NOTE: The RN bit is not addressable 2 - instruction successfully queued via the Control (R) file.
  • Page 392: Ascii Instruction Error Codes

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive ASCII Instructions Examples For the following examples: N7:0 = 25 N7:1 = -37 L9:0 = 508000 L9:1 = 5 Table: 0.D Valid in-line direction: Input: Flow rate is currently [N7:0] liters per minute and contains [L8:0] particles per liter contaminants.
  • Page 393 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive ASCII Instructions Table 21.4 Error Code Description Recommended Action decimal hexadecimal 0x07 The instruction cannot be executed because the Reconfigure the channel and retry operation. communications channel has been shut down via the channel configuration menu. 0x08 The instruction cannot be executed because another Resend the transmission.
  • Page 394: Ascii Character Set

    > The standard ASCII character set includes values up to 127 decimal (7F hex). The MicroLogix 1400 Controller also supports an extended character set (decimal 128…255). However, the extended character set may display different characters depending on the platform you are using.
  • Page 395: Communications Instructions Messaging Overview

    • Configuring a Remote Message on page 442 • Configuring a Multi-hop Remote Message on EtherNet/IP Communication Channel on page 445 • Configuring a MicroLogix 1400 CIP Generic Message via Ethernet on page 461 • MSG Instruction Error Codes on page 466 •...
  • Page 396 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions • Communication Queue These three components determine when a message is transmitted by the controller. For a message to transmit, it must be scanned on a true rung of logic. When scanned, the message and the data defined within the message (if it is a write message) are placed in a communication buffer.
  • Page 397 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions • DF1 Radio Modem • Modbus RTU Master • Ethernet For a description of valid communication protocols, see Knowledgebase Quick Starts on page 629. Publication 1766-RM001A-EN-P - October 2008...
  • Page 398: Svc - Service Communications

    Execution Time for the SVC Instruction Service Communications Channel Select Controller When Rung Is: True False MicroLogix 1400 39.8260 µs (CH0) 0.1933 µs (CH0) 5.9042 µs (CH1) 0.1857 µs (CH1) 36.5800 µs (CH0 & CH1) 0.1774 µs (CH0 & CH1) (1) This value for the SVC instruction is for when the communications servicing function is accessing a data file.
  • Page 399 - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Controller Channel Select Setting Channel(s) Serviced MicroLogix 1400 Channel 0 Channel 1 Channel 2 All Channels Communication Status Bits The following communication status bits allow you to customize or monitor communications servicing. See General Channel Status Block on page 64 for additional status information.
  • Page 400: Msg - Message

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions The example rung shows a conditional SVC, which is processed only when an outgoing message is in the communications queue. You may program the SVC instruction unconditionally across the rungs. This is the normal programming technique for the SVC instruction. MSG - Message Instruction Type: output Read/Write Message...
  • Page 401: The Message Element

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions The Message Element The MSG instruction built into the controller uses a MG data file to process the message instruction. The MG data file, shown at left, is accessed using the MG prefix. Each message instruction utilizes an element within a MG data file.
  • Page 402 Status Code was received, the low byte is 0xE0 and the high byte of this sub-element contains detailed Status Code returned by CIP reply for MicroLogix 1400 Note: When SMTP sub-system cannot send an email due to some reason, error code is shown via MSG instruction. When messaging...
  • Page 403 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Message File Target Location Information Target Device = 485 CIF Sub- Name Description Paramete Size User Element Program Access Reserved Word read only MG11:0.TFN Target File Number Word read/write MG11:0.ELE Offset in elements into CIF Word read/write Reserved Word read only...
  • Page 404 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Message File Target Location Information Target Device = CIP Generic Sub- Name Description Paramete Size User Element Program Access Target Class Word read only Target Instance Word read/write CIP Send Data Count Word read/write Internal Physical Address of Word read only CIP Send Data Table...
  • Page 405 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Message File Sub-Element 17 - Status Bits Address Description Paramete Size User Program Access Reserved read only MG11:0.0/ST Start: read only 1 = MSG transmitted and acknowledged by target device 0 = MSG has not been received by target MG11:0.0/ Done...
  • Page 406 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions “Control Bits” Parameters Channel 0 Setup Screen Channel 1 Setup Screen Ignore if Timed Out (TO) Address Data Format Range Type User Program Access MG11:0/TO Binary On or Off Control Read / Write The Timed Out Bit (TO) can be set in your application to remove an active message instruction from processor control.
  • Page 407 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions An easier method is to use the message timeout variable described on page 421, because it simplifies the user program. This built-in timeout control is in effect whenever the message timeout is non-zero. It defaults to 5 seconds for channel 0, so unless you change it, the internal timeout control is automatically enabled.
  • Page 408 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Error (ER) Address Data Format Range Type User Program Access MG11:0/ER Binary On or Off Status Read Only The Error Bit (ER) is set when message transmission has failed. An error code is written to the MSG File. The ER bit and the error code are cleared the next time the associated rung goes from false to true.
  • Page 409: Timing Diagram For The Msg Instruction

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Timing Diagram for the The following section describes the timing diagram for a message instruction. MSG Instruction (3) Target node (5) Target node processes packet (1) Rung goes true. receives packet. successfully and returns data (read) or acknowledges receipt (write).
  • Page 410 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions 2. At the next end of scan, REF, or SVC instruction, the controller determines if it should examine the communications queue for another instruction. The controller bases its decision on the state of the channel’s Communication Servicing Selection (CSS) and Message Servicing Selection (MSS) bits, the network communication requests from other nodes, and whether previous message instructions are already in progress.
  • Page 411 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions 4. Step 4 is not shown in the timing diagram. If you do not receive an ACK, step 3 does not occur. Instead, either no response or a negative acknowledge (NAK) is received. When this happens, the ST bit remains clear (0).
  • Page 412: Communication Servicing Selection And Message Servicing Selection

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Communication The following screen shows the channel configuration window for Communication Servicing Selection and Message Servicing Selection. Servicing Selection and Message Servicing Selection Communication Servicing Selection Use the check box to enhance communication capability. If the check box is unchecked, communication throughput (and scan time) will increase.
  • Page 413: Msg Instruction Ladder Logic

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions When the Communications Servicing Selection bit is unchecked, at the next execution of a Service Communications (SVC) instruction, I/O Refresh (REF) instruction, or when it performs Communications Servicing, whichever occurs first, commands/replies are processed as follows: •...
  • Page 414 Input I:1/0 could be any user-supplied bit to control when messages are sent. Whenever I:1/0 is set and message MG11:0 is not enabled, the message instruction on rung 0001 is enabled. Internet (if required) Ethernet Switch 44583 MicroLogix 1400 NET-ENI/ENIW MicroLogix 1000 SLC 5/05 Publication 1766-RM001A-EN-P - October 2008...
  • Page 415: Local Messages

    DC SOURCE DC SOURCE DC SOURCE CABLE CABLE CABLE EXTERNAL EXTERNAL EXTERNAL MicroLogix 1000 MicroLogix 1400 MicroLogix 1500 44584 Example 2 - Local DeviceNet Network with DeviceNet Interface (1761-NET-DNI) SLC 5/03 with 1747-SDN PanelView 550 PanelView DANGER DANGER Master DeviceNet Network...
  • Page 416: Configuring A Local Message

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Example 3 - Local DF1 Half-Duplex Network RS-232 (DF1 Half-Duplex Protocol) Modem MicroLogix MicroLogix MicroLogix SLC 5/04 (Slave) SLC 5/03 with 1747-KE 1000 (Slave) 1400 (Slave) 1500 (Slave) Interface Module (Slave) 44586 Configuring a Local Message Setup Screen Message The rung below shows a MSG instruction preceded by conditional logic.
  • Page 417 “This Controller” Parameters Channel The MicroLogix 1400 supports Channel 0 and Channel 1 messaging. Channel 0 is the RS-232/RS-485 port and Channel 1 is the Ethernet port. If Channel 0 is selected with that channel configured for Modbus RTU Master, then the next line will display “Modbus Command”.
  • Page 418 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Communication Command The controller supports six different types of communications commands. If the target device supports any of these command types, the controller should be capable of exchanging data with the device. Supported commands include: Communication Command Types Communication Description...
  • Page 419 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Modbus Command The controller supports eight Modbus commands. If the target device supports any of these Modbus command types, the controller should be capable of exchanging data with the device. Supported Modbus commands include: Modbus Command Types Modbus Command Used For...
  • Page 420 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Data Table Address This variable defines the starting address in the local controller. Valid file types for the Data Table Address are shown below: Message Read Message Write Bit (B) Output (O) Timer (T) Input (I) Counter (C) Bit (B)
  • Page 421 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions • For Read Messages: When a read message is used, the destination file is the data file in the local or originating processor. Input, output, string, and RTC file types are not valid for read messages.
  • Page 422 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Message Type File Type Element Size Maximum Number of Elements per Message Modbus B, N (command 5) 1-bit Commands B, N (command 6) 1-word B, N 1-bit 1920 Modbus bit elements (commands 1, 2, and 15) (120 words) (Commands 1 and 2 are read only, 15 is write only.)
  • Page 423 Modbus commands). The maximum timeout value is 255 seconds. Message Timeout for any MicroLogix 1400 channel 1 MSG can not be modified in the Ethernet Message Setup dialog box. It is assigned by the processor and is determined by adding the Channel 1 MSG Connection Timeout to the MSG Reply Timeout, then adding 15 seconds.
  • Page 424 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Data Table Address/Offset This variable defines the starting address in the target controller. The data table address is used for a 500CPU and PLC5 type messages. A valid address is any valid, configured data file within the target device whose file type is recognized by the controller.
  • Page 425: Local Messaging Examples

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions The most significant digit of the address is considered a prefix, and does not get entered into the MB Data Address field when configuring the message instruction. When the message is sent, the address is decremented by 1 and converted into a 4-character hex number to be transmitted via the network (with a range of 0-FFFFh);...
  • Page 426 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions • 485CIF message type • PLC5 message type • Modbus RTU Message type • EtherNet/IP Message type • Write Message type with ST data file A summary of the message instruction configuration parameters is shown in the following table.
  • Page 427 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Parameter Description This Controller Channel Identifies the communication channel. Channel 0, Channel 1 or Channel 2 Communication Specifies the type of message. Valid types are: Command • 500CPU Read (500CPU, 485CIF, and PLC5 message types) •...
  • Page 428 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Parameter Description Target Device Message Timeout Defines the amount of time the controller waits for the reply before the message errors. A timeout of 0 seconds means that the controller waits indefinitely for a reply. Valid range is from 0…255 seconds.
  • Page 429 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Valid File Type Combinations Valid transfers between file types are shown below for MicroLogix messaging: Local Data Types Communication Type Target Data Types <---> read/write O, I, S, B, N, L , B, N, L <--->...
  • Page 430 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions integer file starting at word N7:0. If 15 seconds elapse before the message completes, error bit MG11:0/ER is set, indicating that the message timed out. Valid File Type Combinations Valid transfers between file types are shown below for MicroLogix messaging: Local Data Types Communication Type Target Data Types...
  • Page 431 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Example 3 - Local Read from a PLC-5 Message Instruction Setup In this example, the controller reads 10 elements from the target device’s (Local Node 2) N7 file, starting at word N7:50. The 10 words are placed in the controller’s integer file starting at word N7:0.
  • Page 432 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Example 4 - Configuring a Modbus Message This section describes how to configure a local message using the Modbus communication commands. Since configuration options are dependent on which channel is selected, the programming software has been designed to only show the options available for the selected channel.
  • Page 433 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions “This Controller” Parameters If a Channel configured for Modbus Master is selected in the Channel field of the Message Setup Screen, the following Modbus Command options will become available: • 01 Read Coil Status (0xxxx) •...
  • Page 434 Example 5 - Configuring an Ethernet/IP Message This section describes how to configure a local message when you are use Ethernet communication channel 1 of the MicroLogix 1400. Message Setup Screen Rung 0 shows a standard RSLogix 500/RSLogix Micro message (MSG) instruction preceded by conditional logic.
  • Page 435 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions “This Controller” Parameters Channel You must select Channel 1 (Integral) to use Ethernet pathways for messaging. Communication Command The controller supports seven different types of communication commands. If the target device supports any of these command types, the controller should be capable of exchange data with the device.
  • Page 436 Each RI File Element consists of Sub-Elements 0 through 19 as shown in the following table. To reach another MicroLogix 1400, an SLC 5/05, a PLC-5E or a controller connected to Ethernet via a 1761-NET-ENI, simply enter in the destination IP address.
  • Page 437 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Routing Information File Element Sub- Description Element Subtype of Ethernet Message: • 16 (0x10) for normal Multi-Hop MSG • 17 (0x11) for Remote Multi-Hop MSG for a DH+ Network High word of 32-bit target IP address Low word of 32-bit target IP address 8…15 Internal Object Identifier (IOI) size in words (1…5)
  • Page 438 MG11:0/ER is set, indicating that the message timed out. If the target device is another MicroLogix 1400, a SLC 5/05, a PLC-5E or a controller connected to Ethernet via a 1761-NET-ENI, then simply enter in the device’s IP address in the “To Address”...
  • Page 439 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions If the target device is a ControlLogix, FlexLogix or CompactLogix controller with an Ethernet interface, then enter in the interface’s IP address in the first row of the “To Address” column, press the computer’s Insert key to add a hop.
  • Page 440 Communications Instructions Example 6 - Configuring Local Write message with ST file The MicroLogix 1400 can use a message instruction to transfer string file data to target device (SLC5/0x, 1756-L1) The following message setup screen is used to send local PLC5 write to the 1756-L1 via 1756-ENBT module.
  • Page 441: Remote Messages

    In this example, node 12 on DH-485 is a MicroLogix 1400. The MicroLogix 1400 can respond to remote message requests from nodes 40 or 51 on the DH+ network and it can initiate a message to any node on the DH+ network.
  • Page 442 CHS GND CHS GND DC SOURCE DC SOURCE DC SOURCE CABLE CABLE CABLE EXTERNAL EXTERNAL EXTERNAL MicroLogix 1000 MicroLogix 1200 MicroLogix 1400 SLC 5/04 DH+ Network Node 19 Node 51 Node 40 SLC 5/04 PLC-5 44587 Publication 1766-RM001A-EN-P - October 2008...
  • Page 443 CHS GND CHS GND CHS GND DC SOURCE CABLE DC SOURCE CABLE DC SOURCE CABLE DC SOURCE CABLE EXTERNAL EXTERNAL EXTERNAL EXTERNAL MicroLogix 1400 MicroLogix 1200 MicroLogix 1500 SLC 5/05 Ethernet Network SLC 5/05 PLC-5E 44588 Publication 1766-RM001A-EN-P - October 2008...
  • Page 444: Configuring A Remote Message

    SLC 5/04 (node 51 on the DH+ network) starting at address N:50:0. The SLC 5/04 at Node 23 of the DH+ network is configured for passthru operation. The MicroLogix 1400 capabilities are the same as the MicroLogix 1200 or MicroLogix 1500 in this example. Publication 1766-RM001A-EN-P - October 2008...
  • Page 445 DC SOURCE CABLE DC SOURCE CABLE EXTERNAL EXTERNAL EXTERNAL MicroLogix 1000 MicroLogix 1200 MicroLogix 1400 SLC 5/04 DH+ Network Node 23 octal (19 decimal) Link ID = 100 Node 63 octal (51 decimal) Node 40 octal (32 decimal) SLC 5/04 PLC-5 44587 “This Controller”...
  • Page 446 This variable defines the bridge address on the local network. In the example, DH-485 node 12 (MicroLogix 1400 on Link ID 1) is writing data to node 51 (SLC 5/04 on Link ID 100). The SLC 5/04 at node 17 is the bridge device.
  • Page 447: Configuring A Multi-Hop Remote Message On Ethernet/Ip Communication Channel

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Network Link ID Set the Network Link ID in the General tab on the Channel Configuration screen. The Link ID value is a user-defined number between 1 and 65,535. All devices that can initiate remote messages and are connected to the local network must have the same number for this variable.
  • Page 448 - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Network Message Example 1: MicroLogix 1400 Ethernet to SLC5/04 DH+ via ENET & DHRIO The following illustrates the MicroLogix 1400 (CH1 Ethernet) sending a remote message to a SLC5/04 processor (DH+ Node 51). The remote message will s an ENET module, a ControlLogix chassis (Gateway) and a DHRIO module.
  • Page 449 - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions MicroLogix 1400 CH1 Configuration DHRIO Routing table creation To create a DHRIO Routing table open up RSLinx and under Communication select RSWho. Publication 1766-RM001A-EN-P - October 2008...
  • Page 450 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Select a driver that will allow you to see and connect up to the DHRIO module. Right Click your mouse on top of the DHRIO module and a drop down box will open. Select Module Configuration by clicking with the left mouse button. Publication 1766-RM001A-EN-P - October 2008...
  • Page 451 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Select DHRIO Routing Table tab. If no routing table has been created the following should appear. Right click on the Backplane and left click on Edit Module. Make sure that the Back plane Link ID is set to 20. Right click on the 1756-DHRIO module and left click on Edit Module.
  • Page 452 - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions The following is the logic necessary for the MicroLogix 1400 processor. A MSG route must be configured in the MultiHop tab of the MSG Setup Screen. Click on the MultiHop tab. Publication 1766-RM001A-EN-P - October 2008...
  • Page 453 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Enter in the IP address of the 1756 ENET module, select ControlLogix backplane, press the Insert key and enter in the backplane slot numbers of the DHRIO module (0-16) under the 'To Address' fields. Click on the ControlLogix Backplane to highlight it and press the Insert key on your computer’s keyboard to add another hop.
  • Page 454 - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Network Message Example 2: MicroLogix 1400 Ethernet to SLC 5/03 DH485 via ENET, DHRIO and 1785-KA5 bridge device The following illustrates the MicroLogix 1400 (CH1 Ethernet) sending a remote message to a SLC5/03 processor (DH+ Node 51). The remote message will passthru an ENET module, a ControlLogix chassis (Gateway), a DHRIO module and a 1785-KA5 bridge device.
  • Page 455 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions DHRIO Routing table creation Go to the routing table configuration tab. Right-click on the DHRIO channel being used and select Add Module. Select the DH+ Bridge. Enter the DH+ node number of the KA5 (37 in this example), and the Link ID of the DH485 (13 in this example).
  • Page 456 - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions ML1400 Channel1 Configuration The following is the message setup screen for the MicroLogix 1400 controller. A MSG route must be configured in the MultiHop tab of the MSG Setup Screen. Click on the MultiHop tab.
  • Page 457 Source Link ID and address, as well as Destination Link ID and address. The MicroLogix 1400 can send remote ethernet messages using EtherNet/ IP messages. The local version of EtherNet/IP messages use the 0x4B Execute PCCC service code, whereas the remote version needs to use the 0x4C Execute DH+ service code.
  • Page 458 DH-485 message. Selecting remote in the selectable local/remote field shows two new fields: Remote Station Address and Remote Bridge Link ID Also, following set up is needed in RSLinx side for MicroLogix 1400 unsolicited MSG communication with OPC client. • Remote Bridge Link ID 15 (dec) •...
  • Page 459 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions 2. Configure Remote Routing Configuration After selecting Remote Addressing and clicking on the Configure button, select the 1785-KA5 Bridge/5130-KA for the Bridge Device. Select DH+ for the Remote Network Type and Local ID is set to 15(dec), Local KA5 is set to 63(dec).
  • Page 460 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions 2. Add a new group: 3. Add a new item: Publication 1766-RM001A-EN-P - October 2008...
  • Page 461 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions 4. Note that the “Sub Quality” will be “Bad” until an unsolicited message is received: 4. Configure the ML1400 MSG instruction ML1400 Channel 1 Network Link ID must be matched with the DDE/OPC Topic Remote ID configured in step #2 (0, in this example).
  • Page 462 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Publication 1766-RM001A-EN-P - October 2008...
  • Page 463: Configuring A Micrologix 1400 Cip Generic Message Via Ethernet

    The MicroLogix 1400 supports CIP Generic messages over ethernet port. This section describes how to configure a CIP Generic message when you MicroLogix 1400 CIP are use Ethernet communication channel 1 of the MicroLogix 1400. The Generic Message via Network Configuration is shown below.
  • Page 464 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions “This Controller” Parameters You must select CIP Generic in Communication Command field. Also the size of bytes(receive or send) is the length of service data to be sent or received in the message. “Target Device” Parameters Extended Routing Information File The CIP generic communication command requires an extended routing information file type, RIX, to store the longer path information for CIP...
  • Page 465 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Extended Routing Information File Element Sub- Description Element Subtype of Ethernet Message: 19 (0x13) for CIP Generic MSG High word of 32-bit target IP address Low word of 32-bit target IP address ASA Service to 8 7 to Internal Object Identifier (IOI) size in words (1 to 5)
  • Page 466 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Service Type Pull-Down List Auto-Fill fields Service Service Code Class Instance Attribute Custom Read Assembly 0x0E 0x04 Write Assembly 0x10 0x04 Read Output Point 0x0E 0x10 Write Output Point 0x10 0x09 Read Input point 0x0E 0x08 Read Parameter...
  • Page 467 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions When the message is replied successfully, a user can check configuration parameters in Receive Data tab. CIP Generic Error Codes/Internal Fail Codes When CIP Generic sub-system cannot send a message due to some reason or reply contains error code, error code is shown via MSG instruction.
  • Page 468: Msg Instruction Error Codes

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions MSG Instruction Error When the processor detects an error during the transfer of message data, the processor sets the ER bit and enters an error code that you can Codes monitor from your programming software. Error Code Description of Error Condition Target node is busy.
  • Page 469 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Error Code Description of Error Condition PCCC Description: Remote station problem due to download. PCCC Description: Cannot execute command due to active IPBs. No IP address configured for the network, or Bad command - unsolicited message error, or Bad address - unsolicited message error, or No privilege - unsolicited message error, or Multihop messaging cannot route request...
  • Page 470: Special Function With Msg Instruction

    • Codes E0 to EF represent EXT STS codes 0 to F. • Codes F0 to FC represent EXT STS codes 10 to 1C. Special Function with MicroLogix 1400 supports the configuration of IP Address, Subnet Mask, Gateway Address, Default Domain Name, Primary Name Server, and MSG instruction Secondary Name Server in the Ethernet Channel Configuration File via Ethernet MSG instruction.
  • Page 471 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions General MSG Setup Screen to change IP Address MultiHop Setup Screen to change IP Address Setup String Data File Publication 1766-RM001A-EN-P - October 2008...
  • Page 472 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions • Channel : Channel must be “1 (Integral)”. • Communication command : Communication command must be “485 CIF Write”. • Data Table Address : Data Table Address must be a String file. To change Ethernet Channel Configuration, you must enter the characters for the configuration parameter.
  • Page 473 Ethernet communication channel 1 of the MicroLogix 1400. Setup SMTP Configuration File While the processor is selected to MicroLogix 1400, “SMTP Client Enable” check box is shown in the Ethernet Channel Configuration tab. If this check box is checked, SMTP configuration page will be appeared.
  • Page 474 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions SMTP Client Enable Bit Setup Screen SMTP Configuration Setup Screen The following is an explanation of parameters to be configured: Publication 1766-RM001A-EN-P - October 2008...
  • Page 475 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions • Email Server : email Server IP Address or DNS name. As for the input of DNS name, you should make sure if the Default Domain Name has been configured in the Ethernet Channel Configuration. If it was configured in the Ethernet Channel Configuration, DNS Sub-system will query total DNS name to DNS server.
  • Page 476: Configure Msg Setup Screen To Send Smtp Message

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Configure MSG Setup The picture below provides an example of how the MSG Instruction would be configured to be used to send SMTP message. Screen to send SMTP message General MSG Setup Screen for SMTP messaging The picture below shows MultiHop setup screen and configured e-mail subject and Body using ST file.
  • Page 477 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Setup String Data File • Channel : Channel must be “1 (Integral)”. • Communication command : Communication command must be “485 CIF Write”. • Data Table Address : Data Table Address must be a String file and the String file must contain Email Subject and Email Body.
  • Page 478 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions • Local / Remote : “Local / Remote” has no impact on the operation. • MultiHop : Cannot edit. • Routing Information File : Routing Information File must be Routing Information File. • Break Connection (BK) : If this bit is cleared for SMTP messaging, the connection with the SMTP Server is not closed after the SMTP message is sent out to the SMTP Server.
  • Page 479 - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions SMTP Authentication Encoding If the SMTP Authentication Flag is enabled, MicroLogix 1400 sends encoded Username and Password. There are several Authentication methods; login, plain, cram-md5, and etc. But, MicroLogix 1400 supports only the login method. Base64 encoding is used to login to SMTP server.
  • Page 480 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Communications Instructions Notes: Publication 1766-RM001A-EN-P - October 2008...
  • Page 481: Chapter 23 Overview

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Chapter Socket Interface Using CIP Generic Messaging Overview The socket interface allows you use a MicroLogix controller to communicate, via the Ethernet Subsystem, with Ethernet devices that do not support the EtherNet/IP application protocol, such as bar code scanners, RFID readers, or other standard Ethernet devices.
  • Page 482 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging You can partition the 8 available socket instances between UDP and TCP sockets by: • Using all 8 instances for client TCP connections. • Using all 8 instances to listen for incoming TCP connections and then accept 8 connections from other device.
  • Page 483 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging Additionally, each Write does not require an application response or acknowledgement. The application protocol determines the exact sequence of application transactions. Typical Sequence of Transactions for a TCP Client MSG in Ladder Ethernet Subsystem Remote Ethernet Device Program...
  • Page 484 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging The exact sequence of sending and receiving data depends on the application protocol. Typical Sequence of Transactions for a TCP Server MSG in Ladder Ethernet Subsystem Remote Ethernet Device Program 10.10.10.10 10.10.10.11 CreateSocket...
  • Page 485 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging each Write does not require an application response or acknowledgement. The application protocol determines the exact sequence of application transactions. Typical Sequence of Transactions for UDP Without OpenConnection MSG in Ladder Ethernet Subsystem Remote Ethernet Device Program...
  • Page 486 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging Typical Sequence of Transactions for UDP With OpenConnection MSG in Ladder Ethernet Subsystem Remote Ethernet Device Program 10.10.10.10 10.10.10.11 Write Data = abc Data = abc Receive Data From Port = 49200 Write Response The response is returned to the controller as soon as the data is sent...
  • Page 487: Communicate With The Socket Object Via A Msg Instruction

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging Communicate With the In MicroLogix controller programs, you can use a CIP Generic MSG instruction to request socket services. Socket Object Via a MSG Instruction Configure the MSG with these values. Message Parameters CIP Generic Msg Parameter Description...
  • Page 488 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging Message Parameters CIP Generic Msg Parameter Description Service Code Each socket service has a unique service code: • CreateSocket : 4B (hexadecimal) • OpenConnection : 4C (hexadecimal) • AcceptConnection : 50 (hexadecimal) •...
  • Page 489 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging Message Parameters CIP Generic Msg Parameter Description Error Code(Hex) See Possible Error Codes for Socket Services on page 508. Error Description See Possible Error Codes for Socket Services on page 508. To Address in MultiHop tab Always specify “127.0.0.1”.
  • Page 490 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging For Write service to UDP sockets, the size application data cannot exceed the maximums listed for Read and Write services. Service Timeouts You must specify a Timeout parameter (in milliseconds) for any service that might not complete immediately (OpenConnection, AcceptConnection, Read, and Write).
  • Page 491: Programming Considerations

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging If you put the controller in Program mode before existing socket instances time out, the controller will disconnect all the connections and delete all the socket instances. Make sure the Inactivity Timeout is longer than the longest interval IMPORTANT between socket operations.
  • Page 492 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging Change Controller Mode Between Executing and Non-Executing Executing mode includes Run, Remote Run, Test Continuous Scan, and Test Single Scan modes. Any others are Non-Executing modes. If the MicroLogix controller transitions from Executing to Non-executing mode while socket requests are active, all connections are closed and all instances are deleted.
  • Page 493: Socket Object Services

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging When issuing multiple Read services, be careful to adjust the destination data table that receives the data so that data is not overwritten. This fragment of Structured Text logic shows an example of handling a partial Read service.
  • Page 494 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging Socket Service Read Write DeleteSocket DeleteAllSockets The MicroLogix controller assumes that the outgoing data is in CIP byte order except the application data(data in Buf). The application data is sent out as it is.
  • Page 495 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging CreateSocket The CreateSocket service creates an instance of the Socket object. The service returns an instance number that you use in the subsequent socket operations. Call the CreateSocket service with instance 0 (Socket object class). Parameter Value Service Type...
  • Page 496 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging CIP Generic Msg Parameter Description Attribute Data Table Address (Send) Specify N file Size in Bytes (Send) 12 bytes Data Table Address (Receive) Specify N file Size in Bytes (Receive) 4 bytes Extended Routing Info File(RIX) Specify RIX file...
  • Page 497 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging OpenConnection The OpenConnection service does one of the following: • For TCP, opens a TCP connection with the specified destination address. • For UDP, associates a destination IP address and port number with the specified socket.
  • Page 498 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging Configure the MSG with these values: CIP Generic Msg Parameter Description Channel 1 (Integral) Communication Command CIP Generic Service Custom Service Code 4C (hexadecimal) Class 342 (hexadecimal) Instance 0 Use a relay ladder instruction to move the returned instance number from a CreateSocket service into the MGx:y.TFN element of a MSG instruction.
  • Page 499 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging • Reserved : Specify 0. • DestAddr Data : Specify an array of characters (maximum of 64) to define the destination of the connection. Specify either of these: • Hostname?port=xxx •...
  • Page 500 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging MSG Configuration Parameters To call this service, click "Setup Screen" in the MSG instruction and enter the values displayed below. Configure the MSG with these values: CIP Generic Msg Parameter Description Channel 1 (Integral)
  • Page 501 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging CIP Generic Msg Parameter Description Extended Routing Info File(RIX) Specify RIX file To Address in MultiHop tab 127.0.0.1 Considerations : Create a separate socket instance (CreateSocket) for each port number that will accept connections.
  • Page 502 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging Read The Read service reads data on a socket. You can specify a number of bytes to receive. The Read service returns the number of bytes received. For TCP, the Read service returns when any data is received, up to the requested number of bytes.
  • Page 503 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging Configure the MSG with these values: CIP Generic Msg Parameter Description Channel 1 (Integral) Communication Command CIP Generic Service Custom Service Code 4D (hexadecimal) Class 342 (hexadecimal) Instance 0 Use a relay ladder instruction to move the returned instance number from a CreateSocket service into the MGx:y.TFN element of a MSG instruction.
  • Page 504 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging N file for receiving contains: 12 bytes + n bytes Nx:0 Nx:1 Nx:2, Nx:3 Nx:4 Nx:5 Nx:6… FromAddr FromAddr FromAddr BufLen Reserved Family Port IP Address (2 bytes) (2 bytes) (n bytes) (2 bytes) (2 bytes)
  • Page 505 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging MSG Configuration Parameters To call this service, click "Setup Screen" in the MSG instruction and enter the values displayed below. Configure the MSG with these values: CIP Generic Msg Parameter Description Channel 1 (Integral)
  • Page 506 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging CIP Generic Msg Parameter Description Extended Routing Info File(RIX) Specify RIX file To Address in MultiHop tab 127.0.0.1 Considerations : For TCP connections, ToAddr is ignored. Connectionless UDP messages may use the address stored in the open connection service.
  • Page 507 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging If "SEND N7:2 = [N7:2]" is written in the Buf field of the N file, "[N7:2]" is replaced to a string of the value of N7:2. For example, if N7:2 contains a data 39, the string "SEND N7:2 = 39"...
  • Page 508 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging MSG Configuration Parameters To call this service, click "Setup Screen" in the MSG instruction and enter the values displayed below. Configure the MSG with these values: CIP Generic Msg Parameter Description Channel 1 (Integral)
  • Page 509 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging N file for sending contains : 0 bytes - NONE N file for receiving contains : 0 bytes - NONE DeleteAllSockets The DeleteAllSockets service deletes all currently created socket instances. For TCP, the DeleteAllSockets service also closes all connections prior to deleting the instances.
  • Page 510: Possible Error Codes For Socket Services

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging Configure the MSG with these values: CIP Generic Msg Parameter Description Channel 1 (Integral) Communication Command CIP Generic Service Custom Service Code 51 (hexadecimal) Class 342 (hexadecimal) Instance Attribute Data Table Address (Send) Not used.
  • Page 511 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging The values of the extended error code are as the following. Value Error Code Description (Hex) NO_SOCKET No socket available with the same instance. NO_BUFFER_AVAILABLE No Ethernet buffer available. MAX_CONNECTION Reached to maximum connections.
  • Page 512 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Socket Interface Using CIP Generic Messaging Value Error Code Description (Hex) SOCKET_ERROR_DELETE Socket error during Delete operation. Reserved OPEN_CONN_TIMEOUT Open connection operation timer was expired. ACCEPT_CONN_TIMEOUT Accept connection operation timer was expired. READ_TIMEOUT Read operation timer was expired. WRITE_TIMEOUT Write operation timer was expired.
  • Page 513: Chapter 24 Rcp - Recipe

    Instruction Type: output Execution Time for the RCP Instruction Controller Operation When Rung Is: True False MicroLogix 1400 Load 14.5910 µs 0.5205 µs Store 14.8690 µs 0.4515 µs The RCP file allows you to save custom lists of data associated with a recipe.
  • Page 514 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Recipe and Data Logging The RCP instruction uses the following parameters: • Recipe File Number - this is the file number that identifies the custom list of addresses associated with a recipe. • Recipe Number - specifies the number of the recipe to use. If the recipe number is invalid, a user fault (code 0042) is generated.
  • Page 515 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Recipe and Data Logging Recipe File and Programming Example Configuring the RCP file 1. Using RSLogix 500/RSLogix Micro, locate and select RCP Configuration Files. Right-click and select New. 2. Create a RCP File. • File - This is the number identifying the RCP file. It is the Recipe File Number used in the RCP instruction in your ladder program and identifies the recipe database.
  • Page 516 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Recipe and Data Logging • Description - This is the file description (optional). • Location where recipe data is stored (applies to all recipe files) - This allows you to designate a memory location for your RCP files. •...
  • Page 517 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Recipe and Data Logging The Recipes are now configured. 8. Create the following ladder logic. Publication 1766-RM001A-EN-P - October 2008...
  • Page 518 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Recipe and Data Logging Application Explanation of Operation When B3:0/0 is energized and B3:0/1 and B3:0/2 are de-energized, Recipe File 0:Recipe number 0 is executed loading the following values to create Yellow paint. • N7:0 = 500 •...
  • Page 519 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Recipe and Data Logging Calculation of Consumed Memory The consumed memory in this example can be calculated by the following equation. Data Field Memory Consumption N7:0 2-byte N7:1 2-byte N7:2 2-byte T4:0.PRE 2-byte Integrity Check 2-byte Total 10-byte Consumed memory size for Recipe File 0...
  • Page 520: Data Logging

    • Retrieving (Reading) Records on page 528 Queues and Records The MicroLogix 1400 processor has 128K bytes (128 x 1024) of additional memory for data logging purposes. Within this memory, you can define up to 256 (0…255) data logging queues. Each queue is configurable by size (maximum number of records stored), and by length (each record is 1…109 characters).
  • Page 521 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Recipe and Data Logging Example Queue 0 This queue is used to show how to calculate the string length of each record and maximum number of records. Queue 0 (Date = , Time = , Delimiter = ,) Date Time N7:11...
  • Page 522 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Recipe and Data Logging Number of Records Using Queue 0 as an example, each record consumes: Record Field Memory Consumption Date 2 bytes Time 2 bytes N7:11 2 bytes L14:0 4 bytes T4:5.ACC 2 bytes I1:3.0 2 bytes B3:2 2 bytes...
  • Page 523 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Recipe and Data Logging Data Memory Consumed Formatted String Size delimiter 0 bytes 1 character word 2 bytes 6 characters long word 4 bytes 11 characters date 2 bytes 10 characters time 2 bytes 8 characters string 84 bytes 89 characters...
  • Page 524 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Recipe and Data Logging Example Maximum record of String data String Length of Record The size of a record is limited so that the length of the maximum formatted string does not exceed 109 characters. The following table can be used to determine the formatted string length.
  • Page 525: Configuring Data Log Queues

    V8.10.00 or later. Queues 1. Open a MicroLogix 1400 application. The first step in using Data Logging is to configure the data log queue(s). Access to this function is provided via the RSLogix 500/RSLogix Micro Project tree:...
  • Page 526: Publication 1766-Rm001A-En-P - October

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Recipe and Data Logging Enter the following information: Table 24.1 Data Log Queue Description Configuration Parameter Number of Records Defines the number of records (data sets) in the queue. Separator Character Choose the character to act as the separator for the data in this queue (tab, comma, or space).
  • Page 527: Micrologix 1400 Memory

    Controller When Rung Is: Data Log True False queue number MicroLogix 1400 8.9910 µs 2.6050 µs You must configure a data log queue before programming a DLG instruction IMPORTANT into your ladder program. The DLG instruction triggers the saving of a record. The DLG instruction has one operand: Queue Number - Specifies which data log queue captures a record.
  • Page 528: Data Log Status File

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Recipe and Data Logging Data Log Status File There is a Data Log Status (DLS) file element for each Data Log Queue. The DLS file does not exist until a data log queue has been configured. The Data Log Status file has 3-word elements.
  • Page 529 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Recipe and Data Logging Data Logging Overflow (OV) The Data Logging Overflow (OV) bit is used to indicate when a record gets overwritten in the associated queue. This bit is set (1) by the DLG instruction when a record is overwritten. Once set, the OV bit remains set until you clear (0) it.
  • Page 530: Retrieving (Reading) Records

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Recipe and Data Logging Table 24.2 Instruction Type Operand Compare Source A Source B Low Limit (LIM instruction) Test (LIM instruction) High Limit (LIM instruction) Source (MEQ instruction) Mask (MEQ instruction) Compare (MEQ instruction) Math Source A Source B Input (SCP instruction) Logical...
  • Page 531: Accessing The Retrieval File

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Recipe and Data Logging For easy use with Microsoft Excel, use the TAB character as the separator NOTE character. Accessing the Retrieval You can use a dedicated retrieval tool or create your own application. File Retrieval Tools There are a number of retrieval tools designed for use with Palm OS, Windows CE, Windows 9x, and Windows NT.
  • Page 532 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Recipe and Data Logging Information for Creating Your Own Application Controller Receives Communications Packet Command Structure CMD 0f FNC A2 Byte Size File No. File Tpe Ele. No. S/Ele. No. Table 4: Field Function Description Destination Node Source Node Command Code Status Code...
  • Page 533 If the data integrity check fails, the record is deleted and an error is sent with STS of 0xF0 and ext STS of 0x0E. For more information on writing a DF1 protocol, refer to Allen-Bradley publication 1770-6.5.16, DF1 Protocol and Command Set Reference Manual (available from http://www.literature.rockwellautomation.com).
  • Page 534: Conditions That Will Erase The Data Retrieval File

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Recipe and Data Logging Publication 1766-RM001A-EN-P - October 2008...
  • Page 535: Chapter 25 Lcd Overview

    This chapter describes how to use the LCD functions. LCD Overview Through the embedded LCD, your MicroLogix 1400 lets you monitor bit, integer and long integer data within the controller, and optionally modify that data, to interact with your control program. Similarly to the optional...
  • Page 536: Lcd Function File

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive LCD - LCD Information The second mode of operation again allows for output from the ladder logic to the display, but adds input from the operator back to the controller (hereafter called “Display With Input mode”). Up to two lines of up to 12 characters each can still be sent to the LCD for display, but the third line, in this mode, is used to obtain numeric input from the user.
  • Page 537: Lcd Function File Sub-Elements Summary

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive LCD - LCD Information The LCD Function File contains status information and control configurations for LCD, Trimpot, and keypad, such as: • Information about whether to use a customized display at power-up • Keypad key-in mode and timeout settings •...
  • Page 538: Lcd Function File Sub-Elements

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive LCD - LCD Information LCD Function File Feature Address Data Format Type User Program Access TMAX - Trimpot high value LCD:0.TMAX word (INT) control read-only POT0 - Trimpot 0 Data (TMIN – TMAX) LCD:0.POT0 word (INT) status read-only POT1 - Trimpot 1 Data (TMIN –...
  • Page 539 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive LCD - LCD Information program. By setting this bit to ON (1), you can let your controller display LCD instructions or get keypad inputs from the user at power-up, without additional operations. Data Input Timeout of LCD instruction (TO) Feature Address Data Format...
  • Page 540 (1) ERR bit. This means a Trimpot range error has occurred at program download. For more information about Trimpot functionality, refer to Using Trim Pots described in the MicroLogix 1400 Programmable Controllers User Manual, publication 1766-UM001. LCD Module Operation Error Number (ERN)
  • Page 541 - Allen Bradley,Rockwell,plc,servo,drive LCD - LCD Information F" message. For more information, refer to Using Trim Pots described in the MicroLogix 1400 Programmable Controllers User Manual, publication 1766-UM001. Jog data update Mode set (JOG) Feature Address Data Format Type...
  • Page 542 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive LCD - LCD Information after downloading program. You can check the ERR and ERN to see if the POT value is modified or not. The POT0 operation described above is identical to POT1. Instruction Display Window (WND) Feature Address Data Format...
  • Page 543 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive LCD - LCD Information ESC is set when ESC key is pressed. This bit should be cleared so as to get the next key input. Because once ESC key is pressed, this bit is set and latched until it is cleared by manually.
  • Page 544: Lcd - Lcd Instruction

    Instruction Type: output Execution Time for the LCD Instruction Controller When Rung Is: True False MicroLogix 1400 2.1233 µs 0.2191 µs The LCD instruction is used to display string or number, get value with keypad. display area on the LCD...
  • Page 545 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive LCD - LCD Information Default Values: • L2 Source A, L2 Source B, L3 Source A, L3 Source B, L4 Source A, L4 Source B: 0 (Zero means Address not assigned.) • Display With Input: 0 (Zero means Display Only mode.) On a true rung status, the LCD instruction operation depends on how to set the Display With Input operand value.
  • Page 546 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive LCD - LCD Information Displaying Special Characters With the LCD instruction, the LCD screen can display the characters of A to Z, a to z, 0 to 9, and special characters in the range of ASCII 0x00…0x7F.
  • Page 547: Programming Instructions Memory Usage And Execution Time

    Appendix MicroLogix 1400 Memory Usage and Instruction Execution Time This appendix contains a complete list of the MicroLogix 1400 programming instructions. The list shows the memory usage and instruction execution time for each instruction. Execution times using indirect addressing and a scan time worksheet are also provided.
  • Page 548 - Allen Bradley,Rockwell,plc,servo,drive MicroLogix 1400 Memory Usage and Instruction Execution Time MicroLogix 1400 Controllers - Memory Usage and Instruction Execution Time for Programming Instructions Programming Instruction Instruction Word Long Word Mnemonic Execution Time in µs Memory Execution Time in µs...
  • Page 549 - Allen Bradley,Rockwell,plc,servo,drive MicroLogix 1400 Memory Usage and Instruction Execution Time MicroLogix 1400 Controllers - Memory Usage and Instruction Execution Time for Programming Instructions Programming Instruction Instruction Word Long Word Mnemonic Execution Time in µs Memory Execution Time in µs...
  • Page 550 None MicroLogix 1400 Indirect Addressing The following sections describe how indirect addressing affects the execution time of instructions in the MicroLogix 1400 processor. The timing for an indirect address is affected by the form of the indirect address. For the address forms in the following table, you can interchange the following file types: •...
  • Page 551 - Allen Bradley,Rockwell,plc,servo,drive MicroLogix 1400 Memory Usage and Instruction Execution Time • Bit (B), Integer (N) • Timer (T), Counter (C), and Control (R) • String(ST) Publication 1766-RM001A-EN-P - October 2008...
  • Page 552: Scan Time Calculation

    - Allen Bradley,Rockwell,plc,servo,drive MicroLogix 1400 Memory Usage and Instruction Execution Time MicroLogix 1400 The following is an example of how to calculate a typical scan time for a ladder program. In this example, a program scan time of 15.0 ms is Scan Time Calculation assumed.
  • Page 553 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Appendix System Status File The status file lets you monitor how your controller works and lets you direct how you want it to work. This is done by using the status file to set up control bits and monitor both hardware and programming device faults and other status information.
  • Page 554: Appendix B Status File Overview

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive System Status File Status File Overview The status file (S:) contains the following words: Address Function Page Arithmetic Flags Controller Mode STI Mode S:2/9 Memory Module Program Compare S:2/15 Math Overflow Selection S:3H Watchdog Scan Time Free Running Clock Minor Error Bits Major Error Code...
  • Page 555: Status File Details

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive System Status File Status File Details Arithmetic Flags The arithmetic flags are assessed by the processor following the execution of any math, logical, or move instruction. The state of these bits remains in effect until the next math, logical, or move instruction in the program is executed.
  • Page 556 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive System Status File Sign Flag Address Data Format Range Type User Program Access S:0/3 binary 0 or 1 status read/write This bit is set (1) when the result of a mathematical operation or data handling instruction is negative. Otherwise the bit remains cleared (0). When a STI, High-Speed Counter, Event Interrupt, or User Fault Routine interrupts normal execution of your program, the original value of S:0/3 is restored when execution resumes.
  • Page 557 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive System Status File Forces Enabled Address Data Format Range Type User Program Access S:1/5 binary status read only This bit is always set (1) by the controller to indicate that forces are enabled. Forces Installed Address Data Format Range Type...
  • Page 558 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive System Status File Fault Override At Power-Up Address Data Format Range Type User Program Access S:1/8 binary 0 or 1 control read only When set (1), causes the controller to clear the Major Error Halted bit (S:1/ 13) at power-up.
  • Page 559 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive System Status File The mode of the controller after the transfer takes place is determined by the controller mode switch and the Power-Up Mode Behavior Selection bit (S:1/12). See also:LE - Load on Error on page 62. Load Memory Module Always Address Data Format...
  • Page 560 - Allen Bradley,Rockwell,plc,servo,drive System Status File The following table shows the Power-Up Mode under various conditions Table 6: MicroLogix 1400 - Major Error Power-Up Mode at Last Power-Down Power-Up Mode Mode Switch Position Halted Mode Behavior at Power-Up Program False Don’t Care...
  • Page 561 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive System Status File If you clear the Major Error Halted bit (S:1/13) when the controller mode ATTENTION switch is in the RUN position, the controller immediately enters the RUN mode. Future Access (OEM Lock) Address Data Format Range Type User Program Access...
  • Page 562 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive System Status File STI Enabled Data Format Range Type User Program Access Address S:2/1 binary 0 or 1 control read/write (1) This bit can only be accessed via ladder logic. It cannot be accessed via communications (such as a Message instruction from another device).
  • Page 563 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive System Status File Math Overflow Selection Address Data Format Range Type User Program Access S:2/14 binary 0 or 1 control read/write Set (1) this bit when you intend to use 32-bit addition and subtraction. When S:2/14 is set, and the result of an ADD, SUB, MUL, or DIV instruction cannot be represented in the destination address (underflow or overflow), •...
  • Page 564 Free Running Clock depends upon which controller you are using. • SLC 500 and MicroLogix 1000: 10 ms/bit (0.010 seconds/bit) • MicroLogix 1100, MicroLogix 1200, MicroLogix 1400 and MicroLogix 1500: 100 µs/bit (0.0001 seconds/bit) The following table illustrates the differences.
  • Page 565 1.28 seconds and off for 1.28 seconds for a total cycle time of 2.56 seconds. If bit S:4/7 is monitored in a MicroLogix 1400, then that bit will be on for 0.0128 seconds and off for 0.0128 seconds for a total cycle time of 0.0256 seconds.
  • Page 566 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive System Status File Memory Module Boot Address Data Format Range Type User Program Access S:5/8 binary 0 or 1 status read/write When this bit is set (1) by the controller, it indicates that a memory module program has been transferred due to S:1/10 (Load Memory Module on Error or Default Program) or S:1/11 (Load Memory Module Always) being set in an attached memory module user program.
  • Page 567 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive System Status File Install a replacement battery immediately. See your hardware manual for IMPORTANT more information. See also: RTC Battery Operation on page 58. Input Filter Selection Modified Address Data Format Range Type User Program Access S:5/13 binary 0 or 1...
  • Page 568 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive System Status File Suspend Code Address Data Format Range Type User Program Access word -32,768…+32,767 status read/write When the controller executes an Suspend (SUS) instruction, the SUS code is written to this location, S:7. This pinpoints the conditions in the application that caused the Suspend mode.
  • Page 569 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive System Status File Active Nodes (Nodes 16 to 31) Data Format Range Type User Program Access Address S:10 word 0…FFFF status read only (1) This bit can only be accessed via ladder logic. It cannot be accessed via communications (such as a Message instruction from another device).
  • Page 570 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive System Status File Baud Rate Data Format Range Type User Program Access Address S:15 (high byte) byte 0…255 status read only (1) This byte can only be accessed via ladder logic. It cannot be accessed via communications (such as a Message instruction from another device).
  • Page 571 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive System Status File STI Set Point Data Format Range Type User Program Access Address S:30 word 0…65535 status read only (1) This bit can only be accessed via ladder logic. It cannot be accessed via communications (such as a Message instruction from another device).
  • Page 572 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive System Status File Outgoing Message Command Pending Data Format Range Type User Program Access Address S:33/2 binary 0 or 1 status read only (1) This bit can only be accessed via ladder logic. It cannot be accessed via communications (such as a Message instruction from another device).
  • Page 573 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive System Status File Data File Overwrite Protection Lost Address Data Format Range Type User Program Access S:36/10 binary 0 or 1 status read/write When clear (0), this bit indicates that at the time of the last program transfer to the controller, protected data files in the controller were not overwritten, or there were no protected data files in the program being downloaded.
  • Page 574 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive System Status File RTC Day of Month Data Format Range Type User Program Access Address S:39 word 1…31 status read only (1) This bit can only be accessed via ladder logic. It cannot be accessed via communications (such as a Message instruction from another device).
  • Page 575 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive System Status File RTC Seconds Data Format Range Type User Program Access Address S:42 word 0…59 status read only (1) This word can only be accessed via ladder logic. It cannot be accessed via communications (such as a Message instruction from another device).
  • Page 576 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive System Status File OS Series Address Data Format Range Type User Program Access S:58 ASCII A…Z status read only This register identifies the Series letter for the Operating System in the controller. OS FRN Address Data Format Range Type User Program Access...
  • Page 577 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive System Status File User Program Functionality Type Address Data Format Range Type User Program Access S:63 word 0…32,767 status read only This register identifies the level of functionality of the user program in the controller. Compiler Revision - Build Number Address Data Format Range...
  • Page 578 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive System Status File Notes: Publication 1766-RM001A-EN-P - October 2008...
  • Page 579: Identifying Controller Faults

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Appendix Fault Messages and Error Codes This chapter describes how to troubleshoot your controller. Topics include: • identifying controller faults • contacting Rockwell Automation for assistance Identifying Controller While a program is executing, a fault may occur within the operating system or your program.
  • Page 580 Routine on page 310 for information on creating a user fault subroutine. Fault Messages This section contains fault messages that can occur during operation of the MicroLogix 1400 programmable controller. Each table lists the error code description, the probable cause, and the recommended corrective action.
  • Page 581 The base hardware faulted or is Non-User FAULT incompatible with the OS. • Replace the Controller (MicroLogix 1100, MicroLogix 1200, MicroLogix 1400). • Replace the Base Unit (MicroLogix 1500 only). • Contact your local Rockwell Automation representative for more information about available operating systems your controller.
  • Page 582 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Fault Messages and Error Codes Error Codes Error Advisory Message Description Fault Recommended Action Code Classification (Hex) 0015 I/O CONFIGURATION The user program I/O configuration Non-User Re-compile and reload the program, and enter FILE ERROR is invalid. the Run mode.
  • Page 583 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Fault Messages and Error Codes Error Codes Error Advisory Message Description Fault Recommended Action Code Classification (Hex) 0029 INSTRUCTION An indirect address reference in the Recoverable Correct the program to ensure that there are INDIRECTION ladder program is outside of the no indirect references outside data file space.
  • Page 584 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Fault Messages and Error Codes Error Codes Error Advisory Message Description Fault Recommended Action Code Classification (Hex) 003E INVALID BIT SHIFT OR A BSR or BSL instruction length Recoverable Correct the user program or allocate more LIFO/FIFO parameter is greater than 2048 or an data file space using the memory map, then...
  • Page 585 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Fault Messages and Error Codes Error Codes Error Advisory Message Description Fault Recommended Action Code Classification (Hex) • Check connections. EXPANSION I/O The controller cannot communicate Non-User xx81 HARDWARE ERROR with an expansion I/O module. • Check for a noise problem and be sure proper grounding practices are used.
  • Page 586 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Fault Messages and Error Codes Error Codes Error Advisory Message Description Fault Recommended Action Code Classification (Hex) • Either an expansion I/O cable is • Correct the user program to eliminate a (1)(2) EXPANSION I/O Non-User xx8A CABLE configured in the user program,...
  • Page 587: Contacting Rockwell Automation For Assistance

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Fault Messages and Error Codes Contacting Rockwell If you need to contact Rockwell Automation or local distributor for assistance, it is helpful to obtain the following information ready: Automation for Assistance • controller type, series letter, and revision letter of the base unit •...
  • Page 588 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Fault Messages and Error Codes Notes: Publication 1766-RM001A-EN-P - October 2008...
  • Page 589 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Appendix Protocol Configuration Use the information in this appendix for configuring communication protocols. The following protocols are supported from any RS-232 communication channel: • DH-485 • DF1 Full-Duplex • DF1 Half-Duplex • DF1 Radio Modem • Modbus RTU •...
  • Page 590: Communication Protocol

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration DH-485 Communication The information in this section describes the DH-485 network functions, network architecture, and performance characteristics. It also helps you Protocol plan and operate the controller on a DH-485 network. DH-485 Network Description The DH-485 protocol defines the communication between multiple devices that coexist on a single pair of wires.
  • Page 591 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration DH-485 Broadcast Messages A broadcast write command is sent as a DH-485 Send Data No Acknowledgement (SDN) packet. No acknowledgement or reply is returned. DH-485 Configuration Parameters When communications are configured for DH-485, the following parameters can be changed: Parameter Options...
  • Page 592 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration Number of Nodes The number of nodes on the network directly affects the data transfer time between nodes. Unnecessary nodes (such as a second programming terminal that is not being used) slow the data transfer rate. The maximum number of nodes on the network is 32.
  • Page 593 All devices should be set to the same maximum node address. IMPORTANT MicroLogix 1400 Remote Packet Support These controllers can respond and initiate with device’s communications (or commands) that do not originate on the local DH-485 network. This is useful in installations where communication is needed between the DH-485 and DH+ networks.
  • Page 594: Df1 Full-Duplex Protocol

    RS-232 connection to external devices, such as computers, or other controllers that support DF1 Full-Duplex. DF1 is an open protocol. Refer to DF1 Protocol and Command Set Reference Manual, Allen-Bradley publication 1770-6.5.16, for more information. DF1 Full-Duplex Operation DF1 Full-Duplex protocol (also referred to as DF1 point-to-point protocol) is useful where RS-232 point-to-point communication is required.
  • Page 595: Df1 Half-Duplex Protocol

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration DF1 Half-Duplex DF1 Half-Duplex protocol provides a multi-drop single master/multiple slave network. In contrast to the DF1 Full-Duplex protocol, Protocol communication takes place in one direction at a time. You can use the RS-232 port on the MicroLogix controller as both a Half-Duplex programming port, and a Half-Duplex peer-to-peer messaging port.
  • Page 596 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration Message-Based Polling Mode Message-based polling mode is best used in networks when communication with the slave stations is not time critical and where the user needs to be able to limit when and how often the master station communicates with each slave station.
  • Page 597 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration Standard polling mode causes the master station to continuously send one or more 4-byte poll packets to each slave station address configured by the user in the poll list(s) in round robin fashion – as soon as the end of the polling list is reached, the master station immediately goes back and starts polling slave stations from the top of the polling list over again.
  • Page 598 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration stations to an operator interface connected to the master station for monitoring, alarming and logging purposes, and to precondition MSG instructions to each particular slave. This second use is based on the supposition that if a slave station did not respond the last time it was polled, it may not be able to receive and respond to a MSG instruction now, and so it would most likely process the maximum number of retries and time-outs before completing in error.
  • Page 599 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration Addressing Tips Each station on the network, including the master station, must have a unique address. The address range is 0…254, so you can have a maximum of 255 stations on a single telemetry network. Station address 255 is the broadcast address, which you cannot select as a station’s individual address.
  • Page 600 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration Standard Mode Channel Configuration DF1 Half-Duplex Master MSG-based Polling Mode Operation With MSG-based Polling Mode, the master device only initiates communication with a slave when a MSG instruction to that slave is triggered in ladder logic. Once the read or write command has been transmitted, the master waits the Reply MSG Timeout period and then polls that slave for a reply to its command.
  • Page 601 When the system driver is DF1 Half-Duplex Master, the following parameters can be changed: DF1 Half-Duplex Master Configuration Parameters Parameter Options Programming Software Default Channel MicroLogix 1400: Channel 0 Driver DF1 Half Duplex Master Baud Rate 300, 600, 1200, 2400, 4800, 9600, 19.2K, 38.4K 19.2K Parity none, even none Node Address 0…254 decimal (255 is reserved for broadcast)
  • Page 602 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration DF1 Half-Duplex Master Configuration Parameters Parameter Options Programming Software Default RTS Send Delay 0…65535 (can be set in 20 ms increments) – only with control line set to “Half Duplex Modem (x20 ms) (RTS/CTS Handshaking)” Specifies the time delay between setting RTS until checking for the CTS response.
  • Page 603 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration DF1 Half-Duplex Master Channel Status Channel Status data is stored in the Communication Status Function File. Viewing Channel Status Data for DF1 Half-Duplex Master Double-click the Channel Status Icon Located beneath the Configuration icon to bring up the Channel Status screen.
  • Page 604 DF1 Half-Duplex Master Active Node Table. The table is stored in the Communications Status Function File, words CSx:27…CSx:42, where x is the channel number (x = 0 for MicroLogix 1400). Each bit in the table represents a station on the link, from 0…254, starting with CSx:27/0 for address 0 and CSx:42/14 for address 254.
  • Page 605 When the system driver is DF1 Half-Duplex Slave, the following parameters can be changed: DF1 Half-Duplex Slave Configuration Parameters Parameter Options Programming Software Default Channel MicroLogix 1400: Channel 0 Driver DF1 Half Duplex Slave Baud Rate 300, 600, 1200, 2400, 4800, 9600, 19.2K, 38.4K 19.2K Parity none, even none Node Address 0…254 decimal (255 is reserved for broadcast)
  • Page 606: Df1 Radio Modem Protocol

    DF1 Radio Modem protocol. DF1 Radio Modem protocol is currently supported by SLC 5/03, 5/04 and 5/05 controllers; MicroLogix 1400, 1200 and 1500 controllers; and Logix controllers at Version 16.1 firmware or higher. Publication 1766-RM001A-EN-P - October 2008...
  • Page 607 Channel 0 in MicroLogix 1400. Channel configuration appears as follows. Figure shows Channel 0 configuration. DF1 Radio Modem Channel 0 Configuration (MicroLogix 1400) When the system driver is DF1 Radio Modem, the following parameters can be changed for Channel 0.
  • Page 608 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration DF1 Radio Modem Channel 0 Configuration Parameters Parameter Options Programming Software Default Channel Channel 0 Driver DF1 Radio Modem Baud Rate 300, 600, 1200, 2400, 4800, 9600, 19.2K, 38.4K 19.2K Parity none, even none Node Address 0…254 decimal (255 is reserved for broadcast) Store and Forward...
  • Page 609 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration user-configured Store & Forward Table to indicate which received packets it should re-broadcast, based on the packet’s source and destination addresses. Configuring the Store & Forward Table The Store & Forward Table can be configured to use any valid binary data table file (B3, B9…B255) of length 16 words.
  • Page 610 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration Applying DF1 Radio Modem Protocol Note 1 – The link layer of Node 1 blocks the re-transmission of a packet that is received with the SRC byte equal to the receiving node’s station address. Packets received that originate from the receiving node should never be re-transmitted. Note 2 –...
  • Page 611 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration DF1 Radio Modem Channel Status Channel Status data is stored in the Communication Status Function File. Viewing Channel Status for DF1 Radio Modem Double-click the Channel Status Icon Located beneath the Configuration icon to bring up the Channel Status screen.
  • Page 612 DF1 Radio Modem driver using RSLogix 500/RSLogix Micro version 5.50 or higher. All MicroLogix 1400 controllers support DF1 Radio Modem protocol. RSLogix 500/RSLogix Micro version 7.0 or higher is required to configure the MicroLogix 1400.
  • Page 613: Modbus Rtu Protocol

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration 4. Can I take advantage of the SLC 5/03, 5/04 and 5/05 channel-to-channel passthru to remotely program the other SLC and MicroLogix nodes using RSLinx and RSLogix 500/RSLogix Micro running on a PC connected to a local SLC processor via DH+ or Ethernet? Yes, with certain limitations imposed based on the radio modem network.
  • Page 614 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration The most significant digit of the address is considered a prefix, and does not get entered into the Modbus Data Address field when configuring the message instruction. When the message is sent, the address is decremented by 1 and converted into a 4-character hex number to be transmitted via the network (with a range of 0-FFFFh);...
  • Page 615 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration The Baud defaults to 19200. The Control Line can be configured as: • No Handshaking • Full-Duplex Modem (RTS on) • Half-Duplex Modem (RTS/CTS handshaking). • No Handshaking (485 Network) In order to connect directly to an RS-485 Modbus network, use a NOTE 1763-NC01 cable and configure the Control Line setting for No Handshaking (485 network).
  • Page 616 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration Modbus RTU Master Communications Configuration Parameters Parameter Options Programming Software Default Channel Channel 0 Driver Modbus RTU Master Baud Rate 300, 600, 1200, 2400, 4800, 9600, 19.2K, 38.4K 19.2K Parity none, even, odd none Control Line No Handshaking, Full-Duplex Modem (RTS on), Half-Duplex Modem (RTS/CTS handshaking), No Handshaking...
  • Page 617 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration Modbus RTU Slave Configuration The Modbus configuration screen and configuration procedure are shown below: 1. To set up Channel 0 and data files for Modbus communication, select the Channel 0 Configuration tab. 2. Choose “Modbus RTU Slave” driver and assign driver characteristics. 3.
  • Page 618 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration When the system driver is Modbus RTU Slave, the following communication port parameters can be changed: Modbus RTU Slave Communications Configuration Parameters Parameter Options Programming Software Default Channel Channel 0 Driver Modbus RTU Slave Baud Rate 300, 600, 1200, 2400, 4800, 9600, 19.2K, 38.4K 19.2K...
  • Page 619 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration Modbus Slave Memory Map The modbus Memory map is summarized in and detailed in : Modbus to MicroLogix Memory Map - Summary Modbus Description Valid MicroLogix Addressing Addressing File Type Data File Number Address 0001…4096 Read/Write Modbus Coil Data space Bit (B) or Integer (N)
  • Page 620 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration Modbus Slave to MicroLogix Memory Map - Detail Modbus Addressing Modbus Address Reference Modbus Function Code (decimal) 0001…4096 Read/Write Modbus Coil Data space 1, 5, 15 10001…14096 Read Only Modbus Contact Data space 30001…30256 Read Modbus Input Register space 30501 Modbus Data Table Coil File Number...
  • Page 621 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration Modbus Slave to MicroLogix Memory Map - Detail Modbus Addressing Modbus Address Reference Modbus Function Code (decimal) 40257…40512 Read/Write Modbus Holding Register space (2nd Holding Register file). 3, 6, 16 40513…40768 Read/Write Modbus Holding Register space (3rd Holding Register file). 3, 6, 16 40769…41024 Read/Write Modbus Holding Register space (4th Holding Register file).
  • Page 622 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration Supported Modbus Commands as a Modbus RTU Master Command Function Code Subfunction Code (decimal) (decimal) Read Input Registers Write Single Coil Write Single Holding Register Write Multiple Coils Write Multiple Holding Registers (1) Broadcast is supported for this command. Publication 1766-RM001A-EN-P - October 2008...
  • Page 623 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration Modbus Error Codes Upon receiving a Modbus command that is not supported or improperly formatted, the controller configured for Modbus RTU Slave will respond with one of the exception codes listed in below: Modbus Error Codes Returned by Modbus RTU Slave Error Error Description...
  • Page 624 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration Modbus Error Codes in Modbus RTU Master MSG Instruction Error Error Description Received Code Exception Code Negative Acknowledge The slave cannot perform the program function received in the command. Memory Parity Error The slave attempted to read extended memory, but detected a parity error in the memory.
  • Page 625: Ascii Driver

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration ASCII Driver The ASCII driver provides connection to other ASCII devices, such as bar code readers, weigh scales, serial printers, and other intelligent devices. You can use ASCII by configuring the RS-232 port, channel 0 for ASCII driver.
  • Page 626 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration When the driver is set to ASCII, the following parameters can be changed: ASCII Channel Configuration Parameters Parameter Description Programming Software Default Channel Channel 0 Driver ASCII Baud Rate Toggles between the communication rate of 300, 600, 1200, 2400, 4800, 9600, 19.2K, and 38.4K. 1200 Parity Toggles between None, Odd, and Even.
  • Page 627: Ethernet Driver

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration ASCII Channel Configuration Parameters Parameter Description Programming Software Default RTS Send Allows you to select the delay between when RTS is raised and the transmission is initiated. Specify Delay (x20 the RTS Send Delay value in increments of 20 ms. Valid range is 0…65535. Stop Bits 1,5,2 Data Bits...
  • Page 628 Name Server System (DNS) server. Network Link 0…199. The Link ID assigned to the MicroLogix 1400 either by an RSLinx OPC topic or by the routing table in a 1756-DHRIO or 1756-DH485 module. Bootp Enable enabled, disabled 1 (enabled) Check this box to enable Bootp. If enabled, this causes the processor at power up to try to obtain its network-related parameters (IP address, subnet mask, gateway address, etc.) via BOOTP request.
  • Page 629 Once changed, the function will be operational in the processor after the system is restarted. SMTP Client The SMTP Client service enable switch. When SMTP is enabled, MicroLogix 1400 is capable of 0 (disabled) Enable transmitting e-mail messages generated by a 485CIF write message with a string element.
  • Page 630 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Protocol Configuration Ethernet Configuration Parameters Parameter Options Programming Software Default Port Setting Auto Negotiate is enabled 10/100Mbps Full Duplex/Half 10/100Mbps Full Duplex/Half Duplex, Duplex 100 Mbps Full or 100 Mbps Half Duplex, 100 Mbps Full Duplex or 10 Mbps Full Duplex, 100 Mbps Half Duplex or 10 Mbps Full Duplex, 100 Mbps Full Duplex, 100 Mbps Half Duplex,...
  • Page 631: Knowledgebase Quick Starts # 17444 "Quick Start" Pulse Train Output (Ptox)

    • # 18498 “Quick Start” Data Logging (DLG) on page 650 # 17444 “Quick Start” NOTE: The PTO and PWM functions are only available when using the BXB or BXBA models of the MicroLogix 1400 Pulse Train Output (PTOX) Locate the Function Files under Controller in RSLogix 500/RSLogix Micro v8.10.00 or later and select the PTOX tab, then select the [+] next to...
  • Page 632 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Knowledgebase Quick Starts Enter the following parameters as the “Minimum Configuration” required for the PTO to generate pulses. PTOX:0.OUT Select Destination Output for pulses: Output O:0/2, O:0/ 3 or O:0/4 PTOX:0.OF Output Frequency - Frequency of pulses: 0…100,000 Hz Data less then zero and greater then 100,000 generates a PTOX error PTOX:0.TOP...
  • Page 633 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Knowledgebase Quick Starts The following ladder logic will need to be entered into File #2 By toggling Bit B3/0 the PTO can be activated. Once running the PTO will generate the number of pulses entered into the PTOX:0.TOP long word and then stop.
  • Page 634: 17446 "Quick Start" Pulse Width Modulation (Pwmx)

    Knowledgebase Quick Starts # 17446 “Quick Start” NOTE: The PTO and PWM functions are only available when using the BXB or BXBA models of the MicroLogix 1400. Pulse Width Modulation (PWMX) Locate the Function Files under Controller in RSLogix 500/RSLogix Micro v8.10.00 or later and select the PWMX tab, then select the [+] next to...
  • Page 635 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Knowledgebase Quick Starts Example The following example will generate a waveform on Output O:0/2 at a frequency of 250Hz and a 50% Duty Cycle. The following ladder logic will need to be entered into File #2 By toggling Bit B3/0 the PWM can be activated.
  • Page 636: 17447 "Quick Start" High Speed Counter (Hsc)

    Refer to HSC Mode (MOD) on page 116. Input device connection depends on the counter mode selected. The MicroLogix 1400 uses a 32-bit signed integer for the HSC this allows for a count range of (+/-) 2,147,483,647.
  • Page 637 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Knowledgebase Quick Starts HSC:0/AS Auto-Start defines if the HSC function will automatically start when the MicroLogix enters run or test. HSC:0/CE Counting Enabled control bit is used to enable or disable the HSC HSC:0.HIP High Preset is the upper set point (in counts) that defines when the HSC will generate an interrupt and execute the PFN sub-routine.
  • Page 638 - Allen Bradley,Rockwell,plc,servo,drive Knowledgebase Quick Starts Proper wiring of a single ended encoder (Typical Allen-Bradley 845TK) when configuring HSC.MOD for Mode 6 (Quadrature Counter) The following diagram illustrates connecting an encoder to the MicroLogix 1400. The minimum configuration required for Mode 6 operation is to enter a file number for the PFN parameter, set the AS and CE bits to a (1) and enter a (6) for the MOD parameter.
  • Page 639 Solution:The input filter frequency may need to be adjusted in order to capture the input pulses. Follow the steps below. 1. Select “I/O Configuration” 2. Highlight the “MicroLogix 1400“ 3. Select “Adv Config“ 4. Select the “Embedded I/O Configuration” Tab 5. Adjust Input filters as needed Problem #2: The HSC instruction does not accumulate counts and the Error Code (ER) shows a value of (1).
  • Page 640: 17465 "Quick Start" Message (Msg)

    Only the HSC will have control over these outputs. # 17465 “Quick Start” Communications Specifications: Message (MSG) The MicroLogix 1400 processors contain a total of (12) Message Buffers. (8) Incoming Any incoming MSG's, Communications, and/or responses to a command the ML1400 initiated. (4) Outgoing Any outgoing MSG's, Communications and/or responses to incoming request for data.
  • Page 641 The MSG instruction in the MicroLogix 1400 controller uses a Data File MG to process the message instruction. All message elements are accessed using the MG prefix (example: MSG done bit = MG11:0/DN).
  • Page 642 - Allen Bradley,Rockwell,plc,servo,drive Knowledgebase Quick Starts MicroLogix 1400 (Node 1) Ladder Logic MSG Setup Screen Micrologix 1000 (Node 4) Ladder Logic No ladder logic is required in the destination processor, however the communications channel must be configured to match the source processor.
  • Page 643 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Knowledgebase Quick Starts Micrologix 1000 Channel Configuration Important Note:Do not connect to ML1000 directly using a 1761-CBL-AM00 cable. Important Note:After the ladder logic has been entered into the ML1400 and the ML1000 channel configuration has been changed, in order for this example to function connect the controllers using a 1761-CBL-PM02 cable, leave connected until the COMM 0 LED on the ML1400 starts to blink.
  • Page 644: 17501 "Quick Start" Selectable Timed Interrupt (Sti)

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Knowledgebase Quick Starts Note:This example was written using a ML1400 communicating to a ML1000, however any DF1 or DH485 device could have been substituted for the ML1000. (i.e. MicroLogix 1200, MicroLogix1500, SLC 5/03, 5/04, 5/ 05, PLC-5, Bar Code Scanners, etc.) # 17501 “Quick Start”...
  • Page 645 (3…255). STI:0/AS Auto-Start defines if the STI function will automatically start when the MicroLogix 1400 enters run or test. STI:0/UIE User Interrupt Enabled control bit is used to enable or disable the STI subroutine from processing.
  • Page 646: 17503 "Quick Start" Real Time Clock (Rtc)

    The RTC provides Year, Month, Day, Day of Month, Day of Week, Hour, Minute, and Second information to the RTC Function file in the controller. The MicroLogix 1400 has a built-in real time clock. Getting Started: Locate the Function Files under Controller in RSLogix 500/RSLogix Micro v8.10.00 or later and select the RTC tab (See Below)
  • Page 647 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Knowledgebase Quick Starts Values can be entered for the Year, Month, Day, Hour, Minute, and Seconds offline, once downloaded the values will take effect immediately. Note: The Day of the week is calculated by the RTC Online Pressing will set the ML1400 clock to the same Date &...
  • Page 648: 17558 "Quick Start" User Interrupt Disable (Uid)

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Knowledgebase Quick Starts # 17558 “Quick Start” The UID instruction can be used as an output instruction to disable selected user interrupts. User Interrupt Disable (UID) Once a user interrupt is disabled the User Interrupt Enable bit (UIE) for the selected interrupt will be cleared or reset to a zero (0).
  • Page 649: 18465 "Quick Start" Rtc Synchronization Between Controllers

    The User Interrupt Enable bit (UIE) determines if the interrupt executes or not. # 18465 “Quick Start” The following example illustrates a message write from an SLC 5/03 or higher processor to a Micrologix 1400 processor with RTC that has been RTC Synchronization enabled. Between Controllers This example can also be applied for messaging between MicroLogix 1100, 1200, 1400, and 1500 controllers.
  • Page 650 +24vdc TERM SHLD CHS GND DC SOURCE CABLE EXTERNAL 1747-CP3 Additional MicroLogix 1200/1500s MicroLogix 1400 TERM SHLD CHS GND DC SOURCE CABLE EXTERNAL 44616 1. Configure the SLC's Channel 0 port for DH-485 protocol. 2. Enter the following ladder logic into the SLC processor.
  • Page 651 Knowledgebase Quick Starts The example above messages the SLC 500 Date and Time data (S:37 - S:42)to the MicroLogix 1400 RTC, each time the SLC processor is powered up and placed into the RUN mode or each time the Time Synchronization Bit (B3:0/0) is enabled.
  • Page 652: 18498 "Quick Start" Data Logging (Dlg)

    Each record is stored in a user-configured battery backed queue. The size of the queue is 128K bytes, independent of the rest of the processor memory. Configuring the DLG instruction in the MicroLogix 1400 1. Create a new RSLogix 500/RSLogix Micro project for the MicroLogix 1400 2.
  • Page 653 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Knowledgebase Quick Starts FYI - Every time Configuration above is double-clicked a new queue is added. To delete queues, simply select the queue with the mouse and press the <delete> key on the keyboard. 4. Double-Click on Data Log configuration to open the Configuration window.
  • Page 654 7. Click OK and accept the Data Log Queue window 8. Once the N10 file has been created enter the following values for each 9. Download the program to your MicroLogix 1400. 10. Go On-Line 11. Toggle the Data Logging Enable(B3:0/0) bit Off to On a total of 5 times.
  • Page 655 ATTENTION computers communication port or if the wrong COM port is selected or a processor other then the MicroLogix 1400 is connected to the computer you will not be able to continue. The Data Logging utility is the only supported method for retrieving data, that has been stored in the processor.
  • Page 656 5. Click Read Status once a valid connection is established The DLOG utility will now retrieve the status information from the MicroLogix 1400 controller. In this example you can see that Queue #0 has 100 records allocated and 5 recorded.
  • Page 657 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Knowledgebase Quick Starts FYI - Remember that once the data records have been read from the MicroLogix the queue is automatically cleared. 7. Click Save Data. 8. Enter a file name. In our example “My_DLG_Data” was used. Make note of the filename about to be created and the directory it is being saved to for later reference.
  • Page 658 Q1: Can I write my own software application to retrieve the data stored in the Data Logging queue? A1: Yes - In the MicroLogix 1400 Instruction Set Reference manual, under the Data Logging chapter, all the information necessary to create your own software application, for retrieving the data stored in the processors Data Logging queue, is shown.
  • Page 659 Knowledgebase Quick Starts The following outlines the configuration and steps that can be used to read data log records from an MicroLogix 1400 controller remotely via a 1747CH0RAD (Remote Access Modem Kit) This example assumes that the programmer has configured the DLG instruction in the ML1400 to log data and that HyperTerminal is installed, configured and the user is familiar with its use.
  • Page 660 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Knowledgebase Quick Starts DISCONNECTING MODEM 1. 1. Ensure the DLG Utility has been shutdown. 2. 2.Start HyperTerminal (Do not re-connect) 3. 3.Open the previously configured “Datalog “ 4. Type “+++” to place modem in command mode, Do not press the ENTER KEY! Your modem will respond: OK 5.
  • Page 661 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Knowledgebase Quick Starts Notes: Publication 1766-RM001A-EN-P - October 2008...
  • Page 662 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Knowledgebase Quick Starts Publication 1766-RM001A-EN-P - October 2008...
  • Page 663: Appendix 26 Binary Numbers

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Appendix Number Systems This appendix: • covers binary and hexadecimal numbers. • explains the use of a hex mask to filter data in certain programming instructions. Binary Numbers The processor memory stores 16-bit binary numbers. As indicated in the following figure, each position in the number has a decimal value, beginning at the right with 2 and ending at the left with 2...
  • Page 664 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Number Systems = 16384 = 8192 = 4096 = 2048 = 1024 = 512 = 256 = 128 = 64 = 32 = 16 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 32767 = 0 This position is always zero for positive numbers.
  • Page 665: Hexadecimal Numbers

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Number Systems = 16384 = 8192 = 4096 = 2048 = 1024 = 512 = 256 = 128 = 64 = 32 = 16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 32767 = 32768 This position is always 1 for negative numbers.
  • Page 666 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Number Systems 2x16 = 8192 1x16 = 256 8x16 = 128 10x16 = 10 2 1 8 A 8586 Hexadecimal and binary numbers have the following equivalence. Hexadecimal 2 1 8 A = 8586 Binary 0 0 1 0 0 0 0 1 1 0 0 0 1 0 1 0...
  • Page 667: Hex Mask

    efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Number Systems Hex Mask This is a 4-character code, entered as a parameter in SQO, SQC, and other instructions to exclude selected bits of a word from being operated on by the instruction. The hexadecimal values are used in their binary equivalent form, as indicated in the figure below.
  • Page 668 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Number Systems Notes: Publication 1766-RM001A-EN-P - October 2008...
  • Page 669: Glossary

    - Allen Bradley,Rockwell,plc,servo,drive Glossary The following terms are used throughout this manual. Refer to the Allen-Bradley Industrial Automation Glossary, publication AG-7.1, for a complete guide to Allen-Bradley technical terms. address A character string that uniquely identifies a memory location. For example, I:1/0 is the memory address for data located in Input file word 1, bit 0.
  • Page 670 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Glossary communication scan A part of the controller’s operating cycle. Communication with devices (such as other controllers and operator interface devices) takes place during this period. control program User logic (the application) that defines the controller’s operation. controller A device, such as a programmable controller, used to control output devices.
  • Page 671 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Glossary Data Terminal Equipment Electromagnetic interference. embedded I/O Embedded I/O is the controller’s on-board I/O. For MicroLogix controllers, embedded I/O is all I/O residing at slot 0. expansion I/O Expansion I/O is I/O that is connected to the controller via a bus or cable. MicroLogix 1100, 1200 and 1400 controllers use Bulletin 1762 expansion I/ O.
  • Page 672 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Glossary full-duplex A mode of communication where data may be transmitted and received simultaneously (contrast with half-duplex). half-duplex A mode of communication where data transmission is limited to one direction at a time. hard disk A storage device in a personal computer. high byte Bits 8 to 15 of a word.
  • Page 673 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Glossary Input and Output jump Changes the normal sequence of program execution. In ladder programs a JUMP (JMP) instruction causes execution to jump to a specific rung in the user program. ladder logic A graphical programming format resembling a ladder-like diagram. The ladder logic programing language is the most common programmable controller language.
  • Page 674 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Glossary Modbus RTU Slave A half-duplex serial communication protocol. modem Modulator/demodulator. Equipment that connects data terminal equipment to a communication line. modes Selected methods of operation. Example: run, test, or program. negative logic The use of binary logic in such a way that “0” represents the desired voltage level.
  • Page 675 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Glossary offset A continuous deviation of a controlled variable from a fixed point. off-state leakage current When a mechanical switch is opened (off-state), no current flows through the switch. Semiconductor switches and transient suppression components which are sometimes used to protect switches, have a small current flow when they are in the off state.
  • Page 676 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Glossary processor A Central Processing Unit. (See CPU.) processor files The set of program and data files resident in the controller. program file Areas within a processor that contain the logic programs. MicroLogix controllers support multiple program files. program mode When the controller is not scanning the control program.
  • Page 677 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Glossary reserved bit A location reserved for internal use. retentive data Information (data) that is preserved through power cycles. RS-232 An EIA standard that specifies electrical, mechanical, and functional characteristics for serial binary communication circuits. run mode An executing mode during which the controller scans or executes the logic program.
  • Page 678 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Glossary sourcing A term used to describe current flow between two devices. A sourcing device or circuit provides a power. status The condition of a circuit or system. terminal A point on an I/O module that external devices, such as a push button or pilot light, are wired to.
  • Page 679 AEX instruction operation AHL instruction battery low status bit AIC instruction baud rate AIC+ Advanced Interface Converter baud rate status Allen-Bradley BHI Function File contacting for assistance allow future access setting bit instructions AND instruction bit shift left instruction application...
  • Page 680 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Index DF1 radio modem parameters counter file and status bits DH485 parameters definition Modbus RTU Master parameters how counters work Modbus RTU Slave parameters CPU (central processing unit), definition clear instruction CPW instruction clearing CS function file controller faults CTD instruction controller memory...
  • Page 681 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Index DIN rail PTO Quick Start DIV instruction PWM Quick Start divide instruction RTC Quick Start RTC Synchronization Quick Start Quick Start example STI Quick Start DLG Instruction user interrupt disable (UID) Quick Start download exclusive OR instruction DTE, definition executing mode execution time...
  • Page 682 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Index free running clock status input and output instructions full-duplex input device function files input filter selection modified status bit base hardware information (BHI) input filtering communications status (CS) file input scan event input interrupt (EII) input/output status file high-speed counter (HSC) inrush current...
  • Page 683 NOT instruction messaging logical OR instruction remote station-to-remote station low byte messaging overview MicroLogix 1400 scan time example minor error bits MMI function file major error code status mnemonic major error detected in user fault routine status bit Modbus definition...
  • Page 684 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Index modem series letter status modes operating voltage monitoring controller operation, fault recovery procedure OR instruction MOV instruction OSF instruction move instructions OSR instruction OTE instruction Quick Start example OTL instruction MSG instruction OTU instruction error codes outgoing message command pending status bit ladder logic output device...
  • Page 685 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Index programmable limit switch file disabling programming device function file programming instructions real-time clock proportional integral derivative Quick Start example application notes real-time clock adjust instruction PID instruction recipe PID tuning recipe instruction runtime errors REF instruction the PID concept refresh instruction the PID equation...
  • Page 686 TOF instruction Station list TON instruction viewing troubleshooting status automatically clearing faults status file contacting Allen-Bradley for assistance identifying controller faults enabled bit manually clearing faults executing bit using the fault routine file number status true function file lost status bit...
  • Page 687 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Index UIF instruction upload watchdog scan time user application mode status write user fault routine creating a user fault routine file number status XIC instruction major error detected status bit XIO instruction recoverable and non-recoverable faults XOR instruction user interrupt disable instruction XPY instruction...
  • Page 688 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Index Publication 1766-RM001A-EN-P - October 2008...
  • Page 689 - Allen Bradley,Rockwell,plc,servo,drive MicroLogix 1400 List of Instructions and Function Files Instruction List Instruction List Instruction- Description Page Instruction- Description Page LBL - Label ABL - Test Buffer for Line LCD - LCD instruction ABS - Absolute Value LEQ - Less Than or Equal To...
  • Page 690 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Instruction List Instruction- Description Page UIF - User Interrupt Flush XIC - Examine if Closed XIO - Examine if Open XOR - Exclusive OR XPY - X Power Y Function File List Function File- Description Page BHI - Base Hardware Information CS - Communications Status EII - Event Input Interrupt...
  • Page 691 ___No, there is no need to contact me ___Yes, please call me ___Yes, please email me at _______________________ ___Yes, please contact me via _____________________ Return this form to: Rockwell Automation Technical Communications, 1 Allen-Bradley Dr., Mayfield Hts., OH 44124-9705 Fax: 440-646-3525 Email: RADocumentComments@ra.rockwell.com Publication CIG-CO521D-EN-P- July 2007...
  • Page 692 PLEASE FASTEN HERE (DO NOT STAPLE) Other Comments PLEASE FOLD HERE NO POSTAGE NECESSARY IF MAILED IN THE UNITED STATES BUSINESS REPLY MAIL FIRST-CLASS MAIL PERMIT NO. 18235 CLEVELAND OH POSTAGE WILL BE PAID BY THE ADDRESSEE 1 ALLEN-BRADLEY DR MAYFIELD HEIGHTS OH 44124-9705...
  • Page 693 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive...
  • Page 694 efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive Rockwell Automation Rockwell Automation provides technical information on the Web to assist you in using its products. At Support http://support.rockwellautomation.com, you can find technical manuals, a knowledge base of FAQs, technical and application notes, sample code and links to software service packs, and a MySupport feature that you can customize to make the best use of these tools.

Table of Contents