The text of a manual · part 19 of 55
Hand-Held Terminal (Catalog Number 1747-PT1) User Manual: 8 - Saving and Compiling a Program
Pages 159 to 164 of 486, from Hand-Held Terminal (Catalog Number 1747-PT1) User Manual
The original document is the PDF (1.5 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Allen-Bradley 1747-PT1
Page 159
Chapter
8
Saving and Compiling a Program This chapter discusses the procedures used to save and compile ladder programs. Topics include: • save and continue editing • save and exit offline editing • view memory layout
Saving and Compiling Overview
When you are entering a new program or editing an existing program, the ladder program is stored in the work area of the HHT. After completing your editing session, you must save your program to the HHT RAM memory. First, your program is compiled, transforming it into a more efficient package. Then the program and data files are updated. When you save and exit, a summary of the data words and instruction words used along with the available memory is updated. Since programs are created or edited offline, it is important to save your work before downloading it to the processor.
Saving a Program
As mentioned in the previous chapter, whenever you are creating a new program or editing an existing one, you should periodically save your work. In the event of a power loss to the HHT, any edits that you have made up to that point, are not recoverable. Save and Continue (SAVE_CT) allows you to save your work and continue editing. Save and Exit (SAVE_EX) allows you to save your work and exit offline editing. To save your program, start at the main editing display: 2.0.0.0.*
] [ ] [ ] [ ] [ ] [
( ) ( ) ( ) ( ) ( )
] [
] [ ] [
OFL INS_RNG MOD_RNG SEARCH DEL_RNG UND_RNG > F1 F2 F3 F4 F5
1. Press [ENTER] to display additional menu selections. The following display appears: 2.0.0.0.*
] [ ] [ ] [ ] [ ] [ EDT_DAT F1
( ) ( ) ( ) ( ) ( )
] [
] [ ] [ F2
F3
OFL SAVE_CT SAVE_EX > F4 F5
8–1
Page 160
Chapter 8 Compiling and Saving a Program
2. To save this program and continue editing, press [F4], SAVE_CT. To save this program and exit offline editing, press [F5], SAVE_EX. If you are using a SLC 5/02 processor, the following display appears: Compiler Options Future Access: Yes Test Single Rung: Disable Index Across Files: Disallow File Protection: Outputs MODIFY OPTIONS, ACCEPT ACCEPT TO TO COMPILE COMPILE OFL MODIFY OPTIONS, OFL FUTACC TSTRUNG INDXCHK FILEPRT ACCEPT F1
F2
F3
F4
F5
Important: The above display appears if you have a SLC 5/02. If you have a fixed controller or a SLC 5/01 processor only [F1]and [F5] appear. Function Key
Description
[F1], Future Access – Fixed, SLC 5/01, and SLC 5/02 processors
Toggles between Yes and No. This option allows you to protect proprietary program data and algorithms. The protection takes affect only after the processor file is downloaded to a controller.
[F2], Test Single Rung – SLC 5/02 processor
Toggles between Enable and Disable. This option allows you to execute your program one rung at a time or a section at a time. Use this function for debugging purposes.
[F3], Index Checks – SLC 5/02 processor
Toggles between Allow and Disallow. This option allows you to use indexed addressing to address data table elements outside of the base address data file.
[F4], File Protect – SLC 5/02 processor
Toggles between Outputs, None, and All. This option allows you to protect your data table files from external modification by devices on the DH–485 network.
[F5], ACCEPT
Starts the compile.
3. After you have made your selections press [F5], ACCEPT.
8–2
Page 161
Chapter 8 Compiling and Saving a Program
If you selected SAVE_CT, you are returned to the editing display when the compile and save is complete. If you selected SAVE_EX, the following display appears: File Name: 222 File Name 0 1 2 222 3
Prog Name:1000 Type Size(Instr) System 77 Reserved 0 Ladder 13 Ladder 1 OFL CHG_NAM CRT_FIl EDT_FIL DEL_FIL MEM_MAP > F1
F2
F3
F4
F5
Available Compiler Options [F1] Future Access (All Processors) This option allows you to protect proprietary program data and algorithms. Important: The protection takes effect only after the program is downloaded to a controller. The protection does not allow online access to the processor unless a matching copy of the online processor program is resident on the terminal hard disk or in the HHT. Otherwise you are not able to upload the program. Yes: Online access to the processor program and data table using a programming terminal is unrestricted. This is the default. No: Online access to the processor program and data table is not permitted unless a matching copy of the online processor program is in the HHT. You cannot: • monitor the program • enter or change the processor password • upload the online processor program to HHT RAM • transfer the program from the processor memory to a memory module However, you can: • clear the processor memory • download a different program to the processor • change the processor mode Important: If you lose or delete the offline copy of the program, you cannot access the program in the controller. You must clear the controller memory and re–enter the program.
8–3
Page 162
Chapter 8 Compiling and Saving a Program
[F2] Test Single Rung (SLC 5/02 Specific) This option allows you to execute your program one rung at a time or a section at a time. Use this function for debugging purposes. Enable: When selected the size of your program increases by 0.375 instruction words per rung. Disable: Test Single Rung is not available. This is the default selection. Important: The HHT can save the program enabling Test Single Rung; however, the Test Single/Rung mode is available with APS. [F3] Index Checks (Index Across Files) (SLC 5/02) This option allows you to use indexed addressing to address data table elements outside of the base address data file. Refer to chapter 5 for more information. Allow: The processor will not verify if the indexed address, the sum of the base address, and the offset value is in the same data file as the base address. The processor does check to ensure that the indexed address is contained within the data table address space. Disallow: The processor performs runtime checks on indexed addresses to ensure that the indexed address is contained within the same data file as the base address. This is the default selection. [F4] File Protection (SLC 5/02) This function key toggles between Outputs, None, and All. This option allows you to protect your data table files from external modification by devices on the DH–485 network. Outputs: Only the output file (O0) is protected from external data modification. This is the default selection. None: External devices may change any data address within the data table files, including the output file (O0). All: The entire data table is protected from external data modification.
8–4
Page 163
Chapter 8 Compiling and Saving a Program
Viewing Program Memory Layout
The memory map function allows you to view your program memory layout. It shows you the type and size of the data files used. It also gives you a summary of the number of the program files created and the number of instructions used in them. Lastly, it shows you how much user memory is left. This section covers: • viewing data files • viewing program file sizes To view your program memory layout, start from the previous display or select [F3], PROG_MAINT from the main display. 1. Press [F5], MEM_MAP. The following display appears: File Type LastAddr Elements 0 O output O0:3.0 1 1 I input I1:2.1 2 2 S status S2:15 16 3 B bit B3/15 1 4 T timer – – CRT_DT F1
Words 1 2 16 1 – OFL DEL_DT NEXT_PG PREV_PG PRG_SIZE F2
F3
F4
F5
This display shows one output file word and two input file words created by the I/O configuration. There are 16 words in the status file (file 2). The number of words in the status file is determined by the particular processor: • fixed and SLC 5/01 processor–16 words • SLC 5/02 processor–33 words. There is one word in bit file 3 due to addresses used in the sample ladder program (B3/1, B3/2, B3/3). To view additional data files, press [F3], NEXT_PG. For a detailed description of data files refer to chapter 4, Data File Organization and Addressing. 2. To view the memory usage, press [F5], PRG_SIZE. The following display appears: ––––––––––––– MEMORY LAYOUT ––––––––––––– 20 data words used in 9 data files 90 instr. used in 4 program files 929 instructions of available memory
OFL F1
F2
F3
F4
F5
8–5
Page 164
Chapter 8 Compiling and Saving a Program
––––––––––––– MEMORY LAYOUT ––––––––––––– 1 output 20 data words used 2 input 16 status 1 bit 90 instruction words (ladder program and overhead) 20
4 = 5 instruction words (data) + 90 instruction words (ladder) 95 instruction words
1024–95 = 929 words left
If you had not saved your program after adding or deleting program files, or modifying data files, the following display appears with asterisks (*) indicating that the program has not been compiled. ––––––––––––– MEMORY LAYOUT ––––––––––––– **** data words used in *** data files **** instr. used in *** program files **** instructions of available memory
OFL F1
F2
F3
F4
F5
3. Press [ESC] three times to return to the main menu display.
8–6