Preface ............................................................................................. P-1 Who Should Use this Manual ........................................................................... Purpose of this Manual .................................................................................... Terms and Abbreviations ................................................................................. Common T echniques Used in this Manual ................................................
Preface Preface Read this preface to familiarize yourself with the rest of the manual.
APS Import/Export Utility User Manual Preface Who Should Use this Manual Use this manual if you are responsible for designing, installing, programming, or troubleshooting control systems that use Allen-Bradley small logic controllers. You should have a basic understanding of SLC 500t products. If you do not, contact your local Allen-Bradley representative for the proper training before using this product. We recommend reviewing the APS Quick Start for New Users before using the software.
Preface Related Documentation The following documents contain additional information concerning RSI and Allen-Bradley SLC products. To obtain a copy, contact your local sales office or distributor.
APS Import/Export Utility User Manual Preface Terms and Abbreviations The following terms and abbreviations are specific to this product. For a complete listing of Allen-Bradley terminology, refer to the Allen-Bradley Industrial Automation Glossary, publication number AG–7.1. Archive File a file, stored on a disk and in binary format, that contains an SLC 500 processor program.
Introducing the APS Import/Export Utility 1 Introducing the APS Import/Export Utility This chapter provides: • • • • an overview of the APSIE utility the system requirements the APSIE display format the APSIE menu display This chapter also shows you how to: • • run the software start the utility 1-1
APS Import/Export Utility User Manual Preface APSIE Overview The APS import/export utility, APSIE, lets you convert: • • APS archive files and program documentation into ASCII text files ASCII text files that contain an SLC 500 program and program documentation into APS archive files You install APSIE as you install APS, although it executes separately from APS. APSIE interacts with archive and documentation files generated by all versions of APS.
Introducing the APS Import/Export Utility Running the Software To run the APSIE software, follow these steps: 1. If necessary, change the drive specifier to the drive where the software is installed (typically C). To do this, type: C: and press [ENTER]. 2. If you are using the default directory, at the DOS prompt, type: CD \IPDS\ATTACH\SLC500 and press [ENTER]. If you specified a different directory path, change to that directory and press [ENTER]. 3. Type: APSIE and press [ENTER].
APS Import/Export Utility User Manual Preface APSIE Display Format The APSIE screen is divided into three areas: • • • display area message, prompt, data entry and status lines APSIE menu functions The screen below indicates what appears in these areas. SLC-500 APS IMPORT/EXPORT UTILITY Display area: Various windows overlay the display depending on the function you Rockwell Software Incorporated, are performing.
Introducing the APS Import/Export Utility Table 1.
APS Import/Export Utility User Manual Preface Starting the Utility Select a task to perform from table 1.B. Table 1.B Selecting a Task from the Main Menu If you want to: Press: configure the [F6] - SYSTEM CONFIGR import/export utility 1-6 import a file [F7] - IMPORT export a file [F8] - EXPORT exit the utility [F10] - EXIT SYSTEM Then: see chapter 2, Configuring the APS Import/Export Utility. see chapter 3, Importing ASCII Documentation/Archive Files.
Configuring the APS Import/Export Utility 2 Configuring the APS Import/Export Software This chapter shows you how to: • • choose between color and monochrome screens. (You must have a color adaptor card and color monitor to use the color selection.) specify the user drives and directories This chapter assumes that you have installed the APS/APSIE software and selected the [F6] – SYSTEM CONFIGR function key from the main menu. If not, see chapter 1, Introducing the APS Import/Export Utility.
APS Import/Export Utility User Manual Preface Configuring the System After selecting [F6] – SYSTEM CONFIGR, the import/export utility displays the system configuration screen.
Configuring the APS Import/Export Utility Table 2.A Specifying User Directories or Choosing between Color and Monochrome Screens If you want to: specify the user directories choose between color or monochrome displays➀ save the configuration permanently Press: [F1] - DEFINE DIR [F3] - COLOR SELECT [F9] - SAVE CONFIG Then: see the following section, Specifying the User Directories. toggle between COLOR and MONOCHROME➁, then press [F9] SAVE CONFIG or [ESC] after making your choice.
APS Import/Export Utility User Manual Preface Specifying the User Directories Below is the user directories screen. The directory paths shown are the default directories when the import/export utility is first run. The maximum number of characters in the pathname is 65. If there are more characters in the pathname than can fit in the window, the last 3 characters of the pathname are displayed as three periods (...), for example: “C:\THIS\IS\A\LONG\PATHNAME\FOR\THE\WINDOW...
Configuring the APS Import/Export Utility To enter a user directory, follow these steps: 1. Select the type of directory that you want to specify from table 2.B. Table 2.B Entering the User Directories If you want to: Press: specify the directory where APS archive and documentation files are stored specify the directory where ASCII archive and documentation files are stored Then: [F4] - ARCHIVE DIR the screen below is displayed. [F6] - ASCII DIR the screen below is displayed.
APS Import/Export Utility User Manual Preface 2. Enter the directory pathname. Press [INSERT] to toggle between overwrite and insert modes. Overwrite mode – writes over and destroys text that may already exist. Insert mode – writes new text without destroying the already existing text. 3. Press either: [ENTER] or [ESC] – to save the drive and directory pathname and return to the previous display. OR [ALT–U] – to discard any changes that were made and return to the previous display.
Importing ASCII Documentation/Archive Files 3 Importing ASCII Documentation/ Archive Files This chapter describes how to: • • • configure the import utility import ASCII files examine the results of the import At this point we assume that you have installed the APS/APSIE software and selected [F7] – IMPORT from the main menu. If not see chapter 1, Introducing the APS Import/Export Utility.
APS Import/Export Utility User Manual Preface Configuring the Import Utility After selecting [F7] – IMPORT from the main menu, the import screen is displayed. SLC–500 APS IMPORT/EXPORT UTILITY DIR Window: Contains the names of all the ASCII source files that exist in the specified directory.
Importing ASCII Documentation/Archive Files Table 3.A Selecting an Import Task to Perform If you want to: Press: Then: define a directory [F1] - DEFINE DIR see chapter 2, Configuring the APS Import/Export Utility. use as the import SOURCE file the name of the file that the cursor is on [F3] - SELECT SOURCE APSIE places the filename on the SOURCE line.
APS Import/Export Utility User Manual Preface Selecting Import Options After selecting [F5] – SELECT OPTIONS from the main import menu, the import/export utility displays the Import Options window.
Importing ASCII Documentation/Archive Files Table 3.B Selecting Import Options If you want to: ignore any errors detected during the archive import process abort the archive import process when any errors are detected ignore any duplicate or conflicting entries in the imported ASCII documentation file overwrite any duplicate or conflicting entries in the imported ASCII documentation file Toggle: YES [F3] - IGN SLC ERRORS If you want to: [F5] - ON COLLISION OVERWRITE DEFAULT KEYWORD SYMBOL➀➁ ADDR.
APS Import/Export Utility User Manual Preface Importing ASCII Files To import an ASCII file, follow these steps: 1. Start on the main import screen shown below. SLC–500 APS IMPORT/EXPORT UTILITY Rockwell Software Incorporated, C:\IPDS\TEXT\SLC500 Copyright 1989–19 9323 – PA2E All Rights Reserved File Names EXAMPLE1 Exists SLC EXAMPLE2 This software is licensed IMPORT FILES to: ALL SOURCE: NOT EXAMPLE1 SLC EXAMPLE4 SLC NOW Th DESTIN: ABC ESC exits Press a Function Key or Enter File Name 2.
Importing ASCII Documentation/Archive Files Note If the processor type is incorrect you are immediately prompted: “Processor type missing or incorrect in .SLC file. Configure I/O?, You can: • • press [F8] Yes to reconfigure I/O press [F10] No to allow the import to continue (An archive file will not be created). To correct the I/O configuration, refer to the Advanced Programming Software User Manual. (APSIE uses the same I/O configuration function as APS.
APS Import/Export Utility User Manual Preface Examining the Results of the Import The log file provides the results of the import. It lists any errors that the utility encountered during the import process. For each error, it identifies the type of error and the location where the error was encountered in the ASCII file. “Illegal Addresses” and “Illegal Comments” are two examples of errors that you may encounter. The default location for the log file is \IPDS\TEXT\SLC500.
Exporting APS Documentation/Archive Files 4 Exporting APS Documentation/ Archive Files This chapter shows you how to: • • • configure the export utility export APS files examine the results of the export At this point we assume that you have installed the APS/APSIE software and selected [F8] – EXPORT from the main menu. If not, see chapter 1, Introducing the APS Import/Export Utility.
APS Import/Export Utility User Manual Preface Configuring the Export Utility After selecting [F8] – EXPORT from the main menu, the import/export utility displays the main export screen. SLC–500 APS IMPORT/EXPORT UTILITY Rockwell Software, Inc. DIR Window: Contains the names of all the APS source files that exist in the specified directory.
Exporting APS Documentation/Archive Files Table 4.A Selecting an Export Task to Perform If you want to: define a directory use as the export SOURCE file the name of the file that the cursor is on Press: [F1] - DEFINE DIR [F3] - SELECT SOURCE APSIE places the filename on the SOURCE line.
APS Import/Export Utility User Manual Preface Selecting Export Options After selecting [F5] – SELECT OPTIONS from the main export menu, the import/export utility displays the Export Options window. SLC–500 APS IMPORT/EXPORT UTILITY EXPORT OPTIONS Rockwell Software, Inc.
Exporting APS Documentation/Archive Files Table 4.B Selecting Export Options If you want to: export the ASCII archive file with comments explaining the various sections, like processor type and data tables export the ASCII archive file without comments explaining the various sections.
APS Import/Export Utility User Manual Preface If you want to: ➀ Toggle: Until the status is: export rung comments [F8] - RUNG COMMENTS EXPORT➀ remove rung comments from the ASCII documentation file [F8] - RUNG COMMENTS DO NOT EXPORT save the configuration permanently [F9] - SAVE CONFIG use this configuration for this session only [ENTER] or [ESC] discard any changes that were made [ALT–U] APSIE saves the configuration to the user preference file. APSIE accepts any changes that were made.
Exporting APS Documentation/Archive Files Selecting Export Address Types After selecting [F10] – SELECT TYPES from the export options screen, APSIE displays the following window, labeled “Select Export Address Types.
APS Import/Export Utility User Manual Preface Table 4.C Selecting the Export Address Types Individually If you want to: export all of the program documentation for addresses of the type that you have highlighted. export none of the program documentation for addresses of the type that you have highlighted. If you want to: Toggle: Until the status is: YES [F1] - TOGGLE ENTRY NO Press: Then: use this configuration for the [ENTER] or [ESC] session only APSIE accepts any changes that were made.
Exporting APS Documentation/Archive Files Exporting APS Files To export an APS file, follow these steps: 1. Start from the main export display shown below. SLC–500 APS IMPORT/EXPORT UTILITY Rockwell Software, Inc. C:\IPDS\TEXT\SLC500 9323 – PA All Rights File Names EXAMPLE1 Exists ACH EXAMPLE2 This software is licensed EXPORT FILES to: ALL SOURCE: DOC EXAMPLE3 ACH EXAMPLE4 ACH EXAMPLE5 NOT EXAMPLE1 DOC DOC DOC NOW DESTIN: ABC ESC exits Press a Function Key or Enter File Name 2.
APS Import/Export Utility User Manual Preface After the export process begins the screen below is displayed. Rockwell Software Incorporated 9323 Series Software Display Area: SLC–500 IMPORT/EXPORT SOFTWARE Source Destin: Phase: Export Status Areas: These areas provide continually updated status information on the performance of the export.
Creating an ASCII Archive File 5 Creating an ASCII Archive File This chapter shows you how to create your own SLC 500 program in ASCII archive file format. You can use these programs with the import utility.
APS Import/Export Utility User Manual Preface Explaining Keywords, Operands, and Comments Each section of the ASCII archive file usually consists of keywords, operands, and comments. Keywords Keywords include symbols and ladder instruction mnemonics. Table 5.A explains the location of each keyword in the ASCII archive file. Table 5.A Defining Keywords This Keyword Precedes START the start of an ASCII file. RACK the definition of an expansion chassis.
Creating an ASCII Archive File Table 5.B Defining Keywords for SLC 5/03 and SLC 5/04 Processors This Keyword PROTECT_DATA PROTECT_LAD PROTECT_FORCE Indicates the type of DATA file protection applied to the specified file(s). The following keywords are used in conjunction with PROTECT_DATA: D CONSTANT Data file cannot be changed by the user or user program during program operation. D STATIC Data file can only be changed by the user program during program operation.
APS Import/Export Utility User Manual Preface Comments You can add comments anywhere in the ASCII archive file when you create it. To add a single line comment, place the comment after an exclamation mark (!). In this case, the import utility ignores all text from the exclamation mark to the end of the line. You may also enter comments in the ASCII archive file by inserting the comment between two percent signs. (Tabs, carriage returns or spaces before and after the percent signs are optional.
Creating an ASCII Archive File Specifying ASCII Archive Files When specifying an ASCII archive file, be aware of the following guidelines: • • To create the file, use a text editor that produces only printable ASCII characters, with no control or hidden characters. Do not use graphics characters. The ASCII archive file is made up of six sections for MicroLogix 1000 controllers, six sections for SLC 5/01 and SLC 5/02 processors, and seven sections for SLC 5/03 and SLC 5/04 processors.
APS Import/Export Utility User Manual Preface Table 5.
Creating an ASCII Archive File Specifying the Program Header The program header defines the target processor for the import utility. You must provide information for this section of the archive file. (You could leave any of the other six sections empty.) The program header format for fixed and modular controllers consists of the keyword “START” and the controller catalog number. Do not enter the catalog number with tabs or spaces.
APS Import/Export Utility User Manual Preface Table 5.
Creating an ASCII Archive File Table 5.H 40 I/O Fixed Controllers Controller Catalog Number: 1747-L40A Inputs: Outputs: Line Power: 24-120V ac 16-Relay 120/240V ac 1747-L40B 24-120V ac 16-Triac 120/240V ac 1747-L40C 24-dc Sink 16-Relay 120/240V ac 1747-L40E 24-dc Sink 16-Transistor 120/240V ac 1747-L40F 24-dc Sink 16-Relay 24V dc 1747-L40L 24-dc Source 16-Transistor 120/240V ac 1747-L40P 24-240V ac 16-Triac 120/240V ac Table 5.
APS Import/Export Utility User Manual Preface Table 5.J MicroLogix 1000 Controllers 5-10 Controller Catalog Number: 1761-L16AWA 1761-L32AWA Inputs: Outputs: Line Power: 10 pt. ac 6-Relay 120/240V ac 20 pt. ac 12-Relay 120/240V ac 1761-L16BWA 10 pt. ac 6-Relay 120/240V ac 1761-L32BWA 20 pt. ac 12-Relay 120/240V ac 1761-L16BWB 10 pt. dc 6-Relay 120/240V ac 1761-L32BWB 20 pt. dc 12-Relay 120/240V ac 1761-L16BBB 10 pt. dc 1761-L32BBB 20 pt. dc 1761-L32AAA 20 pt.
Creating an ASCII Archive File Configuring the Chassis (Does Not Apply to MicroLogix 1000 Controllers) The chassis configuration format consists of the keyword “RACK”, the chassis number and catalog number. Use this format for each expansion chassis that you have. For example: RACK 1 1746–A4 Keyword Chassis Number Catalog Number Specifying the Chassis Number The chassis number is the location of the expansion chassis in the I/O configuration. An SLC 500 modular processor can use up to three chassis.
APS Import/Export Utility User Manual Preface SLC 500 Fixed Controller Chassis Number 1 SLC 500 Processor 1746-A2 Specifying the Chassis Catalog Number The chassis catalog number defines the type of expansion chassis. When you enter the catalog number, do not use tabs or spaces between the numbers and letters.
Creating an ASCII Archive File Configuring the I/O Slots (Does Not Apply to MicroLogix 1000 Controllers) There are three formats that you can use to define the I/O slot configuration. The format that you use depends on your module. See table 5.L. Table 5.L Determining which I/O Slot Format to Use If your module: is listed in Table 5.M is not included in Table 5.M and the module ID number is not 63xx, 95xx, 127xx, 159xx, 199xx, 223xx, or 255xx is not included in Table 5.
APS Import/Export Utility User Manual Preface Table 5.
Creating an ASCII Archive File Table 5.
APS Import/Export Utility User Manual Preface Table 5.N Optional Arguments (For 1746–L524, –L532, –541, and –L542 modular controllers only) Optional Arguments: Use these integers with the optional argument: SCAN_IN (0 - 32)➀ SCAN_OUT M0_SIZE M1_SIZE (0 - 32)➀ (0 - 32768) (0 - 32768) ISR (0, 3 - 255)➁ G_FILE (0 - 255)➂ These integers specify: how many words of input the I/O scan updates. how many words of output the I/O scan updates. the size, in words, of the M0 file.
Creating an ASCII Archive File Screen 1 Address G1:0 0 1 2 0 0 0 3 0 4 0 5 0 6 0 7 0 8 0 9 0 0 1 2 0 2 3 3 4 4 5 5 6 7 8 9 Screen 2 Address G2:0 The common elements in the three formats are the keyword “SLOT” and the slot number. The slot number defines the location of the module. The first slot of the first chassis, slot 0, always contains the CPU module. The largest possible slot number for fixed style hardware is 2; for modular style hardware it is 30.
APS Import/Export Utility User Manual Preface Configuring the Data Table Lists The data table lists define the SLC 500 data table. There are two ways that addresses are defined. You can: • let the import utility define the file type and largest address when the data table is empty OR • enter the data table and describe each data file. This section will help you accomplish this task. The data table is the list of data files that the processor uses.
Creating an ASCII Archive File Defining the Logical Address The logical address consists of the file type, file number, a delimiter (a colon or semicolon) and the largest logical address. For example: Logical Address DATA N 7 : 5 1 2 3 4 5 6 File Type Delimiter File Number Largest Logical Address Data File Addressing If you precede the logical address with three periods (...), the import utility places the data contained in the value list into the data file starting at the logical address.
APS Import/Export Utility User Manual Preface Defining the Logical File The logical file consists of only the file type and data file number. For example: Logical File DATA N 7:5 1 2 3 4 5 6 File Type File Number If you supply only the file type and number (a logical file), the import utility calculates the correct data table size for the file. Defining the Value List The value list defines the initial values for the data table file. You can leave the value list empty or supply immediate values.
Creating an ASCII Archive File Important Notes on Data Table Files Read these notes before entering the data table files. • • • • • Input and output data tables are initialized one slot at a time. Therefore, the I/O configuration, not the value list, determines the data table size for output and input files. The data table files of a MicroLogix 1000 controller are fixed in type and size. You can use the value list only to initialize or alter the data values of a MicroLogix 1000 controller.
APS Import/Export Utility User Manual Preface Table 5.R Data File Formats and Examples DATA logical_address Examples of Data File Entries: DATA N7:5 The Example Data File Entry Creates: n7:0-5, initializes all to zero DATA logical_file DATA N7 n7:0, n7:0 = 0 2 DATA Logical_address Value_list DATA N7:5 1 2 3 4 5 n7:0-5, n7:0 = 1, n7:1 = 2, etc. 3 DATA Logical_file Value_list DATA N7 1 2 3 4 5 n7:0-4, n7:0 = 1, n7:1 = 2, etc. 4 DATA . . . Logical_address Value_list DATA . . .
Creating an ASCII Archive File Example Data Files The following examples show initial data values in decimal, hex and octal formats. The comments between the percent signs (%) explain each of the formats.
APS Import/Export Utility User Manual Preface Notice in the preceding example that “0XE000” indicates that control bits EN, TT and DN are set to one. Enter the contRol (R) data values in the following order: CTL, LEN and POS. The import utility does not prevent undefined control bits from being set. Providing data for undefined control bits does not affect a program. The control word (CTL) defines the control bits for timers (T), counters (C) and control (R) file. See tables 5.S, T, and U. Table 5.
Creating an ASCII Archive File Table 5.U Control Bits for Control Files Defined by the Word CTL Bit Address Bit Name Bit Number R6:0/EN Enable 15 R6:0/EU Enable Unload -or- Queued ➀ 14 R6:0/DN ➀ Done -or- Asynchronous Done 13 R6:0/EM Empty -or- Synchronous Done ➀ 12 R6:0/ER Error 11 R6:0/UL Unload 10 R6:0/IN ➀ Inhibit -or- Running 09 R6:0/FD Found 08 ➀ When CTL is used with an ASCII instruction.
APS Import/Export Utility User Manual Preface Specifying the Ladder Program Files The ladder program filename consists of the keyword “LADDER,” the file number and, if included, the rung list. For example: LADDER 3 SOR OTE B/0 EOR Rung List Keyword Ladder File Number If you leave the rung list empty, the import utility creates the EOR instruction. For MicroLogix 1000 controllers, files 2 to 15 are fixed ladder program files.
Creating an ASCII Archive File Table 5.V The Branch Types of the Ladder Rung Structure Types: Branch Type defined in ASCII: Notice this same instruction in the ASCII Program File in Figure 5.2: Branch Start BST BST A Next Branch NXB B NXB Branch End BND C BND Branch Type in APS ladder programming: Notice this same branch type in the APS Ladder Program in Figure 5.2: A B C Figure 5.
APS Import/Export Utility User Manual Preface Table 5.W Key to Figure 5.3 The following ASCII Instructions (highlighted in the ASCII program below): Specify this designated part of the APS ladder rung: XIO I:3/5 XIC I:3/6 OTE O:5/6 TON T4:3 1.0 200 0 BND Figure 5.
Creating an ASCII Archive File Specifying the Force Table List The format for specifying the force table consists of the keyword “FORCE”, a force table address and a value list. For example: FORCE I:4 1 2 3 4 Keyword Force Table Address Value List The value list contains the force on and force off information for the specified force table address. You do not have to specify the value list. When specifying the force table list, use the formats in table 5.X. Table 5.
APS Import/Export Utility User Manual Preface FORCE I:4 % ON % % OFF % % I:4.0 % 0x0000 0x0001 % I:4.1 % 0x0000 0x0010 % I:4.2 % 0x0003 0x0000 In this example, the force address “FORCE...O:7.4” skips over the first four words of slot seven and forces bit O:7.4/0 off and bit O:7.5/8 on. FORCE ...O:7.4 % ON % % OFF % % O:7.4 % 0x0000 0x0001 % O:7.
Creating an ASCII Archive File Channel Configuration File Types Table 5.Y defines the three file types that you can use as part of a channel configuration data list. Table 5.
APS Import/Export Utility User Manual Preface • CHAN_CONFIG channel_config_file_type default_driver The example below generates a default DH485, Channel 0 SYSTEM Mode Configuration File. CHAN_CONFIG CH0SYS DH485 • CHAN_CONFIG channel_config_file_type value_list The example below generates a General Configuration File with a value list.
Creating an ASCII Archive File Table 5.Z Value List Options 0 Maximum on Delay for Filters (ms) .075 1 .5 2 1 3 2 4 4 5 8 6 16 7 .1 8 .25 Value List If you do not use the keyword INPUT_FILTERS, or if you leave the value list empty, APSIE initializes a default input filter setting. The following are valid input filter formats: • EMPTY The example below generates a default that sets all filters to 8 ms.
APS Import/Export Utility User Manual Preface Specifying the Multi-Point I/O List In the APS Import/Export Utility, the multi-point I/O list has been added to the ASCII archive file for use with the SLC 5/03 OS302 and SLC 5/04 OS401 processors, and MicroLogix 1000 controllers. The format for specifying the multi-point I/O list consists of a keyword MULTIPOINT and a bit position, bit address, access flag, on description, and off description.
Creating an ASCII Archive File The following are valid multi-point I/O formats: • EMPTY The example below generates a default list of null values. ! • MULTIPOINT EMPTY The example below generates a default list of null values. !MULTIPOINT • MULTIPOINT value list The example below shows two entries in the list; all other positions in the list default to null values.
APS Import/Export Utility User Manual Preface Protecting Archive Files (SLC 5/03 and SLC 5/04 Processors Only) There are three types of file protection: data, ladder, and force. Data File Protection To protect a data file, place the keyword entry at the end of the data file. For example: PROTECT_DATA N7 STATIC Keyword Note Logical File Protection Type Default data file protection is: output file = STATIC; all other files = unprotected.
Creating an ASCII Archive File Ladder File Protection To protect a ladder file, place the keyword entry at the end of the ladder file. Also, you cannot set file protection in a program that has edit zones from an online editing session. (The APS default for file protection is no program files protected.) Use the following format: PROTECT_LAD 3 Keyword File Number The example above causes program file 3 to be protected.
APS Import/Export Utility User Manual Preface Examining ASCII Archive Files This section provides you with two example programs, each shown as an ASCII archive file and, for comparison, as an APS ladder program. Example Program #1 The following program example has two rungs. The first rung has a timer instruction, the second a nested branch. APS Ladder Program File 2: Rung 0 I:1 I:1 I:1 ] [ ] [ ] [ 4 7 TON (EN) 6 TIMER ON DELAY Timer T4;3 Time base 1.
Creating an ASCII Archive File ASCII Archive File START 1747–L524 RACK 1 1746–A4 SLOT 1 1746–IM8 SLOT 2 1746–NI4 SLOT 3 1746–OA8 DATA O:3 0X0001 %Bit O:3.0/0 initialized to 1% DATA ...T4:3 0XC000 100 25 % T4:3 CTL bits cleared T4:3.PRE = 100 T4.3.ACC = 25 % PROJECT “EX” LADDER 2 % FILE 2 % !RUNG 0 SOR BST XIC I:1/4 NXB XIO I:1/5 BND XIC I:1/7 XIC I:1/6 TON T4:3 1.
APS Import/Export Utility User Manual Preface Example Program #2 This example provides you with a longer and more complex program. The key feature of this program is its subroutine. Example program #2 in APS ladder format.
Creating an ASCII Archive File File 4: Rung 0 ADD ADD Source A N7;1 Source B N7:2 Dest N7;3 0 0 0 Rung 1 RET RETURN Rung 2 JENDJ 5-41
APS Import/Export Utility User Manual Preface ASCII Archive File % PROCESSOR CONFIGURATION INFORMATION % START 1747–L511 % 1747–L511 5/01 CPU – 1K USER MEMORY % % PROCESSOR CHASSIS CONFIGURATION INFORMATION % RACK 1 1746–A10 % 10–Slot Backplane % % SLOT SLOT 2 SLOT 3 SLOT 5 SLOT 7 SLOT 8 CONFIGURATION INFORMATION % 1746–NIO4I 1746–IA16 1747–DCM–FULL 2323 1746–IA16 % Combo Analog 2 in 2 Out Current % % 16 pt. 120 VAC Input % % Full Chassis DCM % % 16 pt.
Creating an ASCII Archive File % PROJECT AND LADDER FILENAMES % PROJECT EXAMPLE2 2 “MAIN_PROG” 4 “SUBR_4” % Ladder File Information % LADDER 2 % RUNG 0 % SOR BST MEQ XIC XIC OTE ADD SUB B3:55 B3:56 8754 NXB B3/1 XIO B3/2 XIC B3/3 BND B3/0 BST B3/99 NXB N7:0 50 N7:1 NXB N7:2 N7:3 N7:0 BND EOR % RUNG 1 % SOR NEQ N7:0 100 JSR 4 EOR % RUNG 2 % SOR LBL 5 OTE N7:0/15 EOR LADDER 4 % RUNG 0 % SOR ADD N7:1 N7:2 N7:3 EOR % RUNG 1 % SOR RET EOR % FORCE TABLE INFORMATION % FORCE O:2 % ON 0x0000 OFF 0x0000 % 0x0000
Creating an ASCII Documentation File 6 Creating an ASCII Documentation File This chapter shows you how to create your own ASCII documentation file. You can use these documentation files with the import utility.
APS Import/Export Utility User Manual Preface Creating an ASCII Documentation File When creating an ASCII documentation file, follow these guidelines: • • To create the file, use a text editor that produces only printable ASCII characters, with no control or hidden characters. Do not use graphics characters. IBM extended characters can be used within comment strings and as part of symbols.
Creating an ASCII Documentation File The example below shows an ASCII documentation file with a keyword for each statement. SYM AC IC IC XIO JMP Keywords I:0.0/0 I:0.0/0 I:0.0/0 2:LBL5 C5UNDERFL “Totalizer Pulse Counter” “North Cutter Running” “Jump to label 5” ASCII Instruction Addresses ASCII Programming Instructions ASCII Address Comments Placing Address Comments An address comment is a text string (a maximum of 50 characters), which provides notes or remarks for an address.
APS Import/Export Utility User Manual Preface These are example address comments: AC AC AC I:0.0/0 I:0.0/1 I:0.0/2 “UPPER LOADER HYDRAULIC SOLENOID” “OUT OF TOLERANCE ALARM ACKNOWLEDGE” “AIR STOP CLOSED LIMIT SWITCH” Keywords ASCII Instruction Addresses ASCII Address Comments Placing Instruction Comments An instruction comment is a text string (a maximum of 50 characters), which provides notes or remarks for an address/instruction pair.
Creating an ASCII Documentation File Placing Rung Comments A rung comment is a text string, (up to six lines long, 80 characters each), which provides notes or remarks for an output instruction/address pair. Rung comments help identify rungs. The following rules apply to rung comments: • • • • Rung comments should follow the instruction/address pair on the same line. Start rung comments with opening quotation marks (“) followed by a carriage return and end with closing quotation marks (”).
APS Import/Export Utility User Manual Preface Placing Symbols A symbol is a 10–character name associated with an address. IBM extended characters can be used as part of symbols. You start a symbol with a letter from A to Z. To complete the symbol, you can use any combination of ASCII characters except 0x00 through 0x2F and 0x3A through 0x3F. The following are examples of symbols: ASCII Address Symbols ASCII Instruction Addresses Keywords SYM SYM SYM 6-6 O:3.1/8 O:5.2/3 I:1.
Creating an ASCII Documentation File Annotating ASCII Documentation Files You can add comments anywhere in the ASCII documentation file. To add a single line comment, place the comment after an exclamation mark (!). In this case, the import utility ignores all text after the exclamation mark on that line. You may also enter comments in the ASCII documentation file by inserting the comment between two percent signs. (Tabs, carriage returns or spaces before and after the percent signs are optional.
APS Import/Export Utility User Manual Preface Example ASCII Documentation File This example ASCII documentation file shows you how the import utility places comments (address, instruction, and rung) and symbols on the APS ladder rung. (The ASCII documentation files are grouped by keyword.) ASCII Documentation File APS Ladder Program !This is a sample of a complete ASCII documentation file. PALLET SYM O:3.1/8 UPLOAD O:5.2/3 EMPTY_LITE I:1.1/8 PALLET UPLOAD I:1.1 O:3.
Programming Instruction References A Programming Instruction References This appendix lists all of the available programming instructions along with their parameters, valid addressing modes, and file types.
APS Import/Export Utility User Manual Preface Valid Addressing Modes and File Types The following addressing modes are available: Addressing Mode Example Direct N7:0 Indexed Direct #N7:0 Indexed N7:[N10:3] Indexed Indirect #N7:[N10:3] The following file types are available: • • • • • • • • • • • • • O Output I Input S Status B Binary T Timer C Counter R Control N Integer F Float➀ A ASCII➀ ST String➀ M M0/M1➁ Immediate – indicates that a constant is a valid file type ➀ S
Programming Instruction References Instruction ABL➀ Description ASCII Test Buffer for Line Instruction Parameter Valid Addressing Mode(s) Valid File Types channel control 0 direct R characters ABS➁ ACB➀ Absolute Value ASCII Number of Characters in Buffer 0-1024 direct, indexed direct indirect, indexed indirect O, I, S, B, T, C, R, N, F, A, ST, M -32,768-32,767 f min-f max destination direct, indexed direct indirect, indexed indirect O, I, S, B, T, C, R, N, F, A, ST, M none channel 0 dir
APS Import/Export Utility User Manual Preface Instruction ADD AEX➀ AHL➀ Description Add ASCII String Extract ASCII Set/Reset Handshake Lines Instruction Parameter Valid Addressing Mode(s) Valid File Types source A direct, indexed direct indirect, indexed indirect O, I, S, B, T, C, R, N, F, A, ST, M -32,768-32,767 f min-f max source B direct, indexed direct indirect, indexed indirect O, I, S, B, T, C, R, N, F, A, ST, M -32,768-32,767 f min-f max destination direct, indexed direct indirect,
Programming Instruction References Instruction ARD➀ ARL➀ ASC➀ ASN➁ ASR➀ ATN➁ Description ASCII Read Characters ASCII Read Line ASCII String Search Arc Sine ASCII String Compare Arc Tangent Parameter Valid Addressing Mode(s) Valid File Types channel Immediate Values 0 destination direct ST none control direct R none string length 0-82 characters read 0-82 channel 0 destination direct ST none control direct R none string length 0-82 characters read 0-82 source dire
APS Import/Export Utility User Manual Preface Instruction AWA➀ AWT➀ BSL Description ASCII Write with Append ASCII Write Bit Shift Left Parameter Valid Addressing Mode(s) Valid File Types channel 0 source direct ST none control direct R none string length 0-82 characters sent 0-82 channel 0 source direct ST none control direct R none string length 0-82 characters sent 0-82 file indexed direct indexed indirect O, I, S, B, N, A, ST none control direct R none bit ad
Programming Instruction References Instruction COP Description Copy File Parameter Valid Addressing Mode(s) Valid File Types source indexed direct indexed indirect O, I, S, B, T, C, R, N, F, A, ST, M none destination indexed direct indexed indirect O, I, S, B, T, C, R, N, F, A, ST, M none length COS➁ CPT➁ Cosine Compute 1-128 source direct, indexed direct indirect, indexed indirect O, I, S, B, T, C, R, N, F, A, ST, M -32,768-32,767 f min-f max destination direct, indexed direct indir
APS Import/Export Utility User Manual Preface Instruction DIV ENC➂ EQU FFL➃ FFU➃ Description Divide Encode 1 of 16 to 4 Equal FIFO Load FIFO Unload Parameter Valid Addressing Mode(s) Valid File Types Immediate Values source A direct, indexed direct indirect, indexed indirect O, I, S, B, T, C, R, N, F, A, ST, M -32,768-32,767 f min-f max source B direct, indexed direct indirect, indexed indirect O, I, S, B, T, C, R, N, F, A, ST, M -32,768-32,767 f min-f max destination direct, indexed
Programming Instruction References Instruction FLL Description Fill File Parameter Valid Addressing Mode(s) Valid File Types source direct, indirect O, I, S, B, T, C, R, N, F, A, ST, M -32,768-32,767 f min-f max destination indexed direct indexed indirect O, I, S, B, T, C, R, N, F, A, ST, M none length FRD GEQ GRT HSC➅ HSC➂ From BCD to Binary Greater Than or Equal Greater Than High-Speed Counter (SLC 5/01) High-Speed Counter Immediate Values 1-128 source (SLC 5/01) direct O, I, S
APS Import/Export Utility User Manual Preface Instruction HSL➂ Description HSC Load Parameter Valid Addressing Mode(s) Valid File Types Immediate Values counter direct C none source direct B and N none length always 5 IID➆ I/O Interrupt Disable slots double hex word (list of slots) IIE➆ I/O Interrupt Enable slots double hex word (list of slots) IIM Immediate Input with Mask slot direct I none mask direct, indexed direct indirect, indexed indirect O, I, S, B, T, C, R, N, A, S
Programming Instruction References Instruction LEQ LES LFL➃ LFU➃ LIM➃ Description Less Than or Equal To Less Than LIFO Load LIFO Unload Limit Test (circ) Parameter Valid Addressing Mode(s) Valid File Types Immediate Values source A direct, indexed direct indirect, indexed indirect O, I, S, B, T, C, R, N, F, A, ST, M none source B direct, indexed direct indirect, indexed indirect O, I, S, B, T, C, R, N, F, A, ST, M -32,768-32,767 f min-f max source A direct, indexed direct indirect, i
APS Import/Export Utility User Manual Preface Instruction LN➁ LOG➁ Description Natural Log Log to the Base 10 MCR Master Control Relay MEQ Mask Compare Equal To MOV MSG (5/02 only) Move Message Parameter Valid Addressing Mode(s) Valid File Types source direct, indexed direct indirect, indexed indirect O, I, S, B, T, C, R, N, F, A, ST, M -32,768-32,767 f min-f max destination direct, indexed direct indirect, indexed indirect O, I, S, B, T, C, R, N, F, A, ST, M none source direct, ind
Programming Instruction References Instruction MSG (5/03 and 5/04 only) Description Message Parameter Valid Addressing Mode(s) Valid File Types Immediate Values type 64=peer to peer read/write 0=read, 1=write target device 2=500CPU, 4=485CIF, 8=PLC5 local/remote 16=local, 32=remote control block direct N none control block length 14 channel number 0 or 1 target node 0-31, 0-254 if 485CIF remote bridge link ID 0-254, 0 when local remote bridge node address 0-254 0 when local loca
APS Import/Export Utility User Manual Preface Instruction MUL MVM NEG NEQ NOT OR OSR A-14 Description Multiply Masked Move Negate Not Equal To Logical NOT Logical OR One-Shot Rising Parameter Valid Addressing Mode(s) Valid File Types Immediate Values source A direct, indexed direct indirect, indexed indirect O, I, S, B, T, C, R, N, F, A, ST, M -32,768-32,767 f min-f max source B direct, indexed direct indirect, indexed indirect O, I, S, B, T, C, R, N, F, A, ST, M -32,768-32,767 f
Programming Instruction References Instruction Description Parameter Valid Addressing Mode(s) Valid File Types Immediate Values OTE Output Energize bit address direct, indirect O, I, S, B, T, C, R, N, A, ST, M none OTL Output Latch bit address direct, indirect O, I, S, B, T, C, R, N, A, ST, M none OTU Output Unlatch bit address direct, indirect O, I, S, B, T, C, R, N, A, ST, M none PID➆ PID control block direct N none process variable direct, indirect O, I, B, T, C, R, N, A
APS Import/Export Utility User Manual Preface Instruction RTO Description Retentive Timer On SBR Subroutine SCL➃ Scale SCP➁ Scale with Parameters Parameter timer Valid Addressing Mode(s) direct Valid File Types T Immediate Values none time base (SLC 5/01) 0.01 only time base (SLC 5/02, SLC 5/03, SLC 5/04, MicroLogix 1000 controllers) 0.01 or 1.
Programming Instruction References Instruction SIN➁ SQC SQL➃ Description Sine Sequencer Compare Sequencer Load Parameter Valid Addressing Mode(s) Valid File Types Immediate Values source direct, indexed direct indirect, indexed indirect O, I, S, B, T, C, R, N, F, A, ST, M -32,768-32,767 f min-f max destination direct, indexed direct indirect, indexed indirect O, I, S, B, T, C, R, N, F, A, ST, M none file indexed direct indexed indirect O, I, S, B, N, A, ST none mask direct, indexed d
APS Import/Export Utility User Manual Preface Instruction SQO SQR➃ Description Sequencer Output Square Root Parameter Valid Addressing Mode(s) Valid File Types Immediate Values file indexed direct indexed indirect O, I, S, B, N, A, ST none mask direct, indexed direct➄ indirect, indexed indirect O, I, S, B, T, C, R, N, A, ST, M -32,768-32,767 destination direct, indexed direct➄ indirect, indexed indirect O, I, S, B, T, C, R, N, A, ST, M none control direct R none length 1-255 posit
Programming Instruction References Instruction Description Parameter Valid Addressing Mode(s) Valid File Types Immediate Values SUS Suspend suspend ID -32,768-32,767 SVC➆ Service Communications channel 0 (SLC 5/03 and SLC 5/04) 0=no, 1=yes channel 1 (SLC 5/03 and SLC 5/04) 0=no, 1=yes SWP➁ Swap source indexed direct indexed indirect B, N, A, ST length TAN➁ Tangent TND Temporary End TOD Convert to BCD TOF Timer Off Delay none 1-128: bit, 1-128: integer, 1-41: string, 1-128: ASC
APS Import/Export Utility User Manual Preface Instruction TON Description Timer On Delay Parameter timer Valid Addressing Mode(s) direct Valid File Types T Immediate Values none time base (SLC 5/01) 0.01 only time base (SLC 5/02, SLC 5/03, SLC 5/04, MicroLogix 1000 controllers) 0.01 or 1.
Index A address control bit, 5 24 , 5 25 data file, 5 22 , 5 23 data table, 5 18 , 5 19 , 5 21 export address types, 4 7 , 4 8 force table, 5 29 , 5 30 logical, 5 3 , 5 18 multi point I/O, 5 34 slot, 5 17 string file, 5 19 symbols, 6 6 comments, documentation file address, 6 3 instruction, 6 4 rung, 6 5 configuring export utility, 4 2 import utility, 3 2 system, 2 2 configuring APSIE, 2 1 entering user directories, 2 5 function key definition, 2 3 , 2 5 user directories, 2 4 address comments, 4 5 , 6 3
I–2 Index placing symbols, 6 6 drivers, 5 31 E error ignore errors function keys, 3 5 ignore SLC errors during import, 3 4 menu display, 1 5 ignore text errors during import, 3 4 menu display, 1 5 illegal addresses export, 4 10 import, 3 8 illegal comments export, 4 10 import, 3 8 in examining the results of the export, 4 10 in selecting importing options, 3 4 in specifying the multi point I/O list, 5 34 invalid catalog number, 5 12 invalid chassis number, 5 12 message line, 1 4 processor definition, 1 5
Index K keywords, 5 2 L ladder file protection, 5 37 ladder program example, 5 27 , 5 38 , 5 40 , 6 8 program header, 5 7 project name format, 5 25 protect data file format, 5 36 protect force keyword format, 5 37 protect ladder file format, 5 37 R ladder program filename format, 5 26 rack configuration format, 5 11 log file export, 4 10 import, 3 8 rung comments, 6 5 logical address, 5 3 data file, 5 22 data table, 5 18 , 5 19 , 5 21 definition, 5 19 valid and invalid, 5 21 M main menu configure
Copyright Notice E1995 Rockwell Software Inc. All rights reserved Printed in the United States of America Portions copyrighted by Allen–Bradley Company, Inc. and used with permission This manual and any accompanying Rockwell Software products are copyrighted by Rockwell Software Inc. Any reproduction and/or distribution without prior written consent from Rockwell Software Inc. is strictly prohibited. Please refer to the license agreement for details.