topdoc manual

275
TOPDOC for SoftPLC Version 4 User's Guide for use with SoftPLC Version 2.1 and later By SoftPLC Corp. Publication No. TDZ-MN1 (C)Copyright 2000 SoftPLC Corp. ALL RIGHTS RESERVED.

Upload: gianny-marcos-fonseca-aires

Post on 20-Apr-2017

245 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Topdoc Manual

TOPDOC for SoftPLC Version 4

User's Guidefor use with

SoftPLC Version 2.1 and later

By SoftPLC Corp.

Publication No. TDZ-MN1

(C)Copyright 2000 SoftPLC Corp.ALL RIGHTS RESERVED.

Page 2: Topdoc Manual

THIS PAGE INTENTIONALLY LEFT BLANK

Page 3: Topdoc Manual

Because of the variety of uses of the information described in this manual, the users of, and thoseresponsible for applying this information must satisfy themselves as to the acceptability of eachapplication and use of the information. In no event will SoftPLC Corp. be responsible or liable forits use, nor for any infringements of patents or other rights of third parties which may result from itsuse.

SoftPLC Corp., MAKES NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THECONTENTS HEREOF AND SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OFMERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE.

SoftPLC Corp., reserves the right to change product specifications at any time without notice.

No part of this document may be reproduced by any means, nor translated, nor transmitted to anymagnetic medium without the written consent of SoftPLC Corp.

TOPDOC and SoftPLC are registered trademarks of SoftPLC Corp. O@N@E (Optimum NetworkExecutive) and SoftWIRES are trademarks of SoftPLC Corp.

First Printing: July, 1988Sixth Printing: July, 2000

(C)Copyright 2000 SoftPLC Corp.ALL RIGHTS RESERVED.

Page 4: Topdoc Manual

THIS PAGE INTENTIONALLY LEFT BLANK

Page 5: Topdoc Manual

Pub. No. TDZ-MN1 28 July 2000i

PREFACE

This manual is intended to be used in conjunction with SoftPLC Corp’s. TOPDOC, Advanced PLCprogramming and documentation software for SoftPLC. This manual also covers SoftWIRES, PLCemulation, systems simulation and testing software. Specifically, it supports TOPDOC andSoftWIRES version 4.4.

WHAT IS TOPDOC?

TOPDOC is a complete programmable controller development environment. With TOPDOC youcan create, edit, and document PLC ladder logic programs on computers compatible with Windows32 bit operating systems (Win 95, 98, NT, or 2000). TOPDOC includes offline (computer basedprogram development and reporting), online (PLC based program development and monitoring) andSoftWIRES(offline emulation and simulation).

OFFLINE FEATURES SUMMARY

@ Creating and documenting new programs on computer disk@ Modifying and documenting existing programs on computer disk@ Using old programs (or portions of programs) to create new programs@ Transferring programs to/from the SoftPLC and the computer (Upload/Download)@ Printing reports of the documented ladder diagram, address labels and cross references, data

table values, etc.@ Comparing two programs for differences (Difference Detection)@ Converting Allen-Bradley ASCII format (*.PC5) program files to/from TOPDOC format (*.LOB)

and Allen-Bradley ASCII format documentation files to/from TOPDOC format

ONLINE FEATURES SUMMARY

@ Creating and documenting new programs in a PLC@ Modifying and documenting existing programs in a PLC@ Transferring programs to/from the PLC and the computer (upload/download)@ Online program and data table monitoring@ Changing bit status and data table values@ Forcing I/O bits, performing contact histograms

SoftWIRES FEATURES SUMMARY

@ PLC program emulation, or open-loop testing@ PLC program and systems simulation, or closed-loop testing

Page 6: Topdoc Manual

PREFACE

SoftPLC Corp. Inc. 28 July 2000ii

@ Continuous or single step program execution@ Operator Interface for testing and training

ABOUT THIS MANUAL

This manual explains only how you use TOPDOC. This manual presumes you already know andunderstand how to use your computer and the Windows operating system. The SoftPLC andTOPDOC Quick Reference Guide describes software installation and configuration; as well ascommunication driver setup.

This manual was written to explain the use of TOPDOC. The TOPDOC help files also includeinformation on TOPDOC and more detailed information about the specific data you need to enteror are viewing while using TOPDOC.

NOTE: With each TOPDOC product and update there is aTDZREAD.ME and HISTORY.DOC file. These text filescontain product update information and additions orcorrections to the information in this manual. Beforeinstalling or using TOPDOC or any updates you receive,be sure to read these files carefully. You may also wantto print the files and store them with this manual for futurereference.

HINT: SoftPLC offers training on TOPDOC and on SoftPLChardware and programming. If you are interested, callSoftPLC.

NOTATIONAL CONVENTIONS

Option Menu options are shown in bold face, blocked letters.

< > ANGLE BRACKETS Words in < > denote variable information that you must provide.For example, a request for the name of a file would be represented by <FILE>. You donot enter the angle brackets.

[ ] SQUARE BRACKETS Words in [ ] denote names and symbols on keys. For example,[F1] means to press the F1 key.

If a sequence of keys is given and the [Ctrl], [Shift], or [Alt] key(s) are listed you shouldpress the [Ctrl], [Shift], or [Alt] key at the same time as the following key(s), rather thanpressing the keys in sequence. Other keys listed together (such as [Ins] or [Del]) shouldbe pressed sequentially.

Page 7: Topdoc Manual

PREFACE

Pub. No. TDZ-MN1 28 July 2000iii

X> A letter followed by > indicates a disk drive. We normally use the letter C to indicatethe hard disk drive, A for the floppy drive, and D for the CD-ROM drive. You would usethe appropriate letter(s) for your system.

NOTE: Denotes that special attention needs to be given to aparticular point.

CAUTION: Denotes that special attention needs to be given to thispoint as well as exercising caution, otherwise loss of dataor work could result.

WARNING: Denotes that extreme caution should be used at this point,otherwise injury to personnel or equipment could result.

HINT: This designates helpful information or short-cuts.

Page 8: Topdoc Manual

SoftPLC Corp. Inc. 28 July 2000iv

TABLE OF CONTENTS

Page 9: Topdoc Manual

THIS PAGE INTENTIONALLY LEFT BLANK

Page 10: Topdoc Manual

SoftPLC Corp. Inc. 28 July 2000vi

PART I

GENERAL INFORMATION

Page 11: Topdoc Manual

THIS PAGE INTENTIONALLY LEFT BLANK

Page 12: Topdoc Manual

Pub. No. TDZ-MN1 28 July 20001-1

CHAPTER 1

REQUIREMENTS

This chapter describes computer and printer hardware and operating system requirements forTOPDOC and SoftWIRES.

MINIMUM COMPUTER REQUIREMENTS

@ Windows dictates the required memory, CPU, and hard drive required. You only need about10MB free hard drive space for TOPDOC.

@ Parallel port (Required for users connecting to a parallel printer and/or requiring SoftwareSentinel protection device).

@ Ethernet port for communicating to the SoftPLC

PRINTER REQUIREMENTS

You can use either a dot matrix, line printer, or laser printer with TOPDOC. The requirements foreach are listed in this section.

TOPDOC prints reports in user selectable widths. Your printer requirements will be based on thewidth selected. The minimum width is 125 characters and the maximum width is 200 characters.The requirements for these widths are listed below. Your printer requirements may vary if you selecta different width.

DOT MATRIX/LINE PRINTER REQUIREMENTS

125 Characters/Line:

@ 8-1/2" wide paper printer in compressed mode

@ 14-7/8" wide paper printer NOT in compressed mode

200 Characters/Line:

@ 14-7/8" wide paper printer in compressed mode

LASER PRINTER REQUIREMENTS

Page 13: Topdoc Manual

CHAPTER 1 REQUIREMENTS

SoftPLC Corp. Inc. 28 July 20001-2

125 Characters/Line:

@ 8-1/2" wide paper@ print in portrait orientation@ support a fixed pitch font of 16.6 pitch or greater

200 Characters/Line:

@ 14" x 8-1/2" (Legal Size) paper@ print in landscape orientation@ support a fixed pitch font of 16.6 pitch or greater

HINT: Application Note TD-AN-23 includes a soft font for HPLaserJet II compatible printers which allows 200 characterwide reports to print on 8-1/2" x 11" paper in landscapemode.

Page 14: Topdoc Manual

Pub. No. TDZ-MN1 28 July 20002-1

CHAPTER 2

TOPDOC CONFIGURATION

Refer to the SoftPLC/TOPDOC Quick Reference Guide for detailed installation and loadinginformation. This chapter only includes details not found in that guide.

SOFTWARE SENTINEL INSTALLATION

The TOPDOC installation files are not copy protected. You can duplicate them and make as manybackup copies as you wish or you can install on multiple PC’s. However, unless the SoftwareSentinel (Software Protection Device) is installed on your computer, you will not be able to runTOPDOC. The Software Sentinel was included with your TOPDOC package and is a squareconnector measuring 2" x 2".

TOPDOC Super-Users do not require a Sentinel. If you are a Super-User, you can skip this section.

WARNING: DO NOT LOSE YOUR SENTINEL! The replacement costof a Sentinel is 100% of the list price of the software theSentinel activates. You should treat the Sentinel as youwould treat your wallet or other valuable goods.

The Sentinel connects to a parallel communications port on your computer (printer port). Anyparallel port can be used if you have multiple ports. You can still use your parallel port forcommunications (ie: to a printer). Just connect your parallel cable to the back of the SoftwareProtection Device instead of directly to the computer.

WARNING: Do not plug or unplug a Sentinel attached to a printer whilethe printer is ON. Turn the printer OFF first. Otherwisedamage may occur to your Sentinel. Also, do not"LapLink" or perform other similar operations throughthe Sentinel as damage to the Sentinel WILL occur.

Each SoftPLC product (catalog number) has its own specially coded Sentinel. Only one Sentinelmay be placed on a single parallel port at any one time, you cannot stack them.

The Sentinel has been programmed for the products you ordered. If you would like to combinemultiple SoftPLC products on a single Sentinel, contact SoftPLC for reprogramming information.

Page 15: Topdoc Manual

CHAPTER 2 INSTALLATION

SoftPLC Corp. Inc. 28 July 20002-2

SCREEN COLOR CONFIGURATION

With the Colors option (under the main menu option Setup ), you can configure the colors of thedifferent windows you see in TOPDOC. You can specify 10 sets of foreground and background colorcombinations and attributes for 6 aspects of a window.

NOTE: TOPDOC will install with a default color configuration file.You do not have to set your Colors before using TOPDOC.

To load the Color Configuration program, select Setup from the TOPDOC main menu, then selectColors from the setup menu. TOPDOC displays the color configuration screen shown in Figure2-1. The commands you use to change the color configuration are listed at the top of the screen inthe colors program and in Table 2-4.

Color ConfigurationArrows = cursor; +/- = inc/dec background; INS/DEL = inc/dec foreground; ESC = quit

Main Menu Scheme 2 Scheme 3 Scheme 4 Scheme 5

Border Border Border Border Border

Clear Screen Clear Screen Clear Screen Clear Screen Clear Screen

Text Text Text Text Text

Input Field Input Field Input Field Input Field Input Field

Current Field Current Field Current Field Current Field Current Field

Title Title Title Title Title

Datatable Label Edit Ladder Error Help

Border Border True - ] [ - Border Border

Clear Screen Clear Screen False - ] [ - Clear Screen Clear Screen

Text Text Cursor - ] [ - Text Text

Mark Input Field Marked Cursor Input Field Input Field

Cursor Current Field Marked Area Current Field Current Field

Title Title Rung Comment Title Title

Figure 2-1Color Configuration Editor

The 10 window color sets you can configure are:

@ Data Table Editor @ Error messages@ Label Editor @ Help messages@ Ladder Editor @ Main window (lines 1 and 2)@ 4 additional windows used for other menus and messages (the exact options or command

menus that these windows correspond to vary depending on the order the options are selected)

Page 16: Topdoc Manual

CHAPTER 2 INSTALLATION

Pub. No. TDZ-MN1 28 July 20002-3

You can set the foreground, background colors, and attributes for 6 aspects within each window setas shown in Table 2-1. The Ladder and Data Table Editor's configuration are somewhat differentand are described in Tables 2-2 and 2-3.

Aspect Description

Border The outlined edge of the window.

Clear Screen Areas of the window that do not contain any text or fields.

Text Any static characters in the window.

Input Field Locations in the window for user Responses.

Current Field The active field, the location to enter the Response, or where the cursor is located in amenu window.

Title The name at the top of the window.

Table 2-1Color Configuration Options

Aspect Description

True - ] [ - How the instruction will be displayed when it is true.

False - ] [ - How the instruction will be displayed when it is false.This is also the color of the ladder itself.

Cursor - ] [ - How the cursor will be displayed.

Marked Cursor How the cursor will be displayed when positioned in an area that has been marked.

Marked Area How an area will be displayed when marked.

Rung Comment How the Rung Comment text will be displayed.

Table 2-2Ladder Editor Color Configuration

Page 17: Topdoc Manual

CHAPTER 2 INSTALLATION

SoftPLC Corp. Inc. 28 July 20002-4

Aspect Description

Border The outlined edge of the window.

Clear Screen Areas of the window that do not contain any text or fields.

Text Any static characters in the window.

Mark Specifies configuration for marked ranges of values.

Cursor How the cursor will be displayed.

Title The name at the top of the window.

Table 2-3Color Configuration Options

Position the cursor on the window set and aspect you want to change, use the [+], [-], [Ins], and [Del]keys to scroll through the available color/attribute choices until you see the one you want. To select,press any of the arrow keys to move to another aspect or window set or press [Esc] to quit.

Keys Description

[÷] / [²] Move cursor right/left one configuration set.

[8] / [9] Move cursor up/down one aspect in current set.

[+] / [-] Increment/Decrement background color/attribute.

[INS] / [DEL] Increment/Decrement foreground color/attribute.

[ESC] Quit and display color configuration menu.

Table 2-4Color Configuration Key Sequences

Continue selecting in this manner until you are satisfied with all your choices, then press [Esc]. Thisdisplays a menu with the options Abort Changes, Edit, Save to Disk and Use Temporarily.Select Edit to change the colors again.

Abort Changes keeps the color scheme you had before changes were made. Save to Diskchanges the color configuration file (WC.CFG) and uses the new colors in the current session andall future sessions. Use Temporarily will use any changes in the current session only. If you exitto the operating system, the old color setup will be used next time you load TOPDOC. In any case,you are returned to the Setup menu.

BACKING UP YOUR PROGRAM AND DATA FILES

Page 18: Topdoc Manual

CHAPTER 2 INSTALLATION

Pub. No. TDZ-MN1 28 July 20002-5

It is a good idea to remember to make regular back-ups of your program and data files in case ofcomputer or PLC hardware failures. Your biggest investment is your data, regular backups followinga set procedure can potentially save your company millions of dollars.

A single program is stored on your computer as a number of smaller files, all with the same rootname but different extensions. Appendix A describes each of the TOPDOC application data files.

Page 19: Topdoc Manual

Pub. No. TDZ-MN1 28 July 20003-1

CHAPTER 3

TOPDOC OVERVIEW

This chapter describes TOPDOC's user interface and defines some terms. You will learn how toselect menu options and choices from a list, respond to a request for information, get help, andhandle errors. You will also learn the special commands and key sequences you can use to makedata entry and selection easier.

By learning the information in this chapter, you will find both TOPDOC and the rest of this manualvery easy to use, and will also be able to use TOPDOC's productivity tools to your maximumadvantage.

TOPDOC is easy to use. You just select a menu option and respond to the TOPDOC prompts.

If at any time you need more information, simply press [F1] to get help. Toabort or return to a prior step, just use the [Esc] key.

HINT: A great way to learn how to use TOPDOC is to press [F1]at each menu option and within each editor and read thehelp messages.

SPECIAL KEYS AND KEY SEQUENCES

This section defines the special keys and key sequences you can use throughout TOPDOC.Additional commands and key sequences for specialized tasks are identified in the sections abouteach task and summarized in the Quick Reference Guide.

Table 3-1 describes the keys that are used for special purposes.

Tables 3-2 list the special keys and key sequences you can use when responding to a prompt.These key sequences can be used globally throughout TOPDOC whenever you are asked to enterinformation.

Page 20: Topdoc Manual

CHAPTER 3 TOPDOC OVERVIEW

SoftPLC Corp. Inc. 28 July 20003-2

Key Description

[F1] Used to obtain context sensitive help at any time.

[F9] Used to assemble (process and save) current edits to a rung, address, label records, orother multi-field information.

[F10] Used to display TOPDOC menus from within an editor.

[ESC] Used to abort and return to the prior location or menu.

[8] / [9] / [6] / [7] Used to move from field to field in windows (where more than one response is required).These keys are also used for positioning in the various editors, on menus or choice lists.

[HOME] Moves the cursor to the 1st position in a field or line of the screen.

[END] Moves the cursor to the last position in a field or line of the screen.

[ENTER] Used to complete a response (or accept a default) and continue. [ENTER] is also used toselect the current (blinking) menu option.

[INS] Used to toggle between insert and exchange (overstrike) editing modes. The [INS] key isalso used in conjunction with other keys to perform specific actions. When you use [INS]in conjunction with other keys, you press the keys sequentially, not simultaneously.

[DEL] Used to edit responses by deleting the character at the current cursor location. [DEL] isalso used in conjunction with other keys to perform specific actions. When you use [DEL]in conjunction with other keys, you press the keys sequentially, not simultaneously.

[BKSP] Used to edit responses by deleting the previous character.

[ALT] / [CTRL] Used in conjunction with other keys to perform specific actions. When you use thesekeys, you press them simultaneously with the other keys in the sequence, not sequentially.

Table 3-1Special Keys

Key Sequence Description

[INS] Toggles insert and exchange (overstrike) modes.

[DEL] Deletes character under cursor.

[BKSP] Deletes character to left of cursor and moves left one space.

[CTRL] / [BKSP] Erases current field.

[CTRL] / [ENTER] Erases from cursor to end of field.

[ENTER] Accepts value of current field.

[ESC] Aborts and returns to prior menu.

Table 3-2(a)Global Editing Key Sequences

Page 21: Topdoc Manual

CHAPTER 3 TOPDOC OVERVIEW

Pub. No. TDZ-MN1 28 July 20003-3

Key Sequence Description

[7] Moves cursor left one space or to prior menu option (moves from first option to the lastoption if positioned on the first)

[6] Moves cursor right one space or to next menu option (moves from last option to the firstoption if positioned on the last)

[8] Moves cursor to prior field (moves to last field if on first field)

[9] Moves cursor to next field (moves to first field if on last field)

[CTRL] / [7] Moves cursor one field to the left

[CTRL] / [6] Moves cursor one field to the right

[HOME] Moves cursor to beginning of current field

[END] Moves cursor to end of current field

Table 3-2(b)Global Movement/Positioning Key Sequences

SELECTING

You can use two different methods to select a menu option or choice from a list:

1) You can press the key that matches the first letter of the menu option or choice. For example,to select a Quit option, press [Q]. If more than one option on a menu begins with the sameletter, the option occurring first on the list is always selected if you press that letter.

NOTE: You can use either upper or lower case entries forselections.

2) You can use [6], [7], [9], [8], [Home] and [End] to position the cursor on the desired choice andthen press [Enter].

A short description below a horizontal menu explains what the current option does. An easy way tobecome familiar with the menu options is to use the arrow keys to read each message, pressing [F1]for additional help if you need more detail about a particular option.

Page 22: Topdoc Manual

CHAPTER 3 TOPDOC OVERVIEW

SoftPLC Corp. Inc. 28 July 20003-4

RESPONDING

After you select a menu option, TOPDOC displays either another lower level menu (in which caseyou would select again) or a set of prompts to which you must respond. You can either respond orpress [F1] for help.

Most prompts display a default response. To accept the default, simply press [Enter]. Whereresponses must be selected from a list, pressing [Ins] will display the list, then you can select bypositioning on your selection and pressing [Enter].

To change the default or enter a new response, type in the information requested. You can also edityour response using the special keys listed in Table 5-2(a). [Esc] can always be used to abort andreturn to the prior menu level.

After you enter a response, TOPDOC requests an entry for the next field. If you are positioned onthe last field TOPDOC takes the next action.

NOTE: You can use either upper or lower case entries whenresponding.

PATH/FILE ENTRY

For most upper level menu options you must enter the drive specification, path, and filename youwant to use. This section describes how to enter this information, it is not repeated throughout themanual. After you select the option, the data entry window shown in Figure 5-1 appears.

FILENAME SELECT

Edit the file

Enter a file name

PATH: \TDZ\SPLC\

FILE: MY_FILE3

Figure 3-1Path/File Entry Window

DRIVE:\PATH SPECIFICATION

<PATH> is the drive and directory\subdirectory specification you use to identify the location of<FILE>. If no drive is given, the current drive is searched. SoftPLC and TOPDOC support only 8character subdirectory names.

The initial default <PATH> will be based on the value you gave the environment variable"TDZDAT". After you enter a <PATH>, this becomes the default until you exit TOPDOC.

Page 23: Topdoc Manual

CHAPTER 3 TOPDOC OVERVIEW

Pub. No. TDZ-MN1 28 July 20003-5

FILE SELECTION

<FILE> is the name of the program you want to process. Filenames have two parts - the rootand the extension. For example, a file named "program.ext" has "program" as the root and "ext"as the extension. In TOPDOC, you do not need to enter the extension only the root. Themaximum root size is 8 characters.

HINT: If you don't remember the name of the <FILE> you wantto use, press [Enter] at a blank <FILE> prompt. Awindow opens that lists all files in the specified <PATH>in alphabetical order (Figure 5-2). To quickly blank outthe field to access the file list display, press[Ctrl][BackSpace]. Only files with the correct extensionfor the current menu option or TOPDOC function arelisted. Normally, the last accessed <FILE> is displayedas a default.

TOPDOC for SoftPLC EDITOR by SoftPLC Corp

File Dbase Ladder SoftWIRES Quit

Edit a PLC Workfile

FILENAME SELECT

Edit DIR: C:\TDZ\SPLC\*.LOB

Ente FILES:24 FREE SPACE:3321KB TOTAL SPACE:32504KB

PATH 15DEMO.LOB 3MREV1.LOB BENCH5.LOB BENCH4.LOB

FILE BOXLINE.LOB C114.LOB CONR110.LOB CONVEYOR.LOB

CYCLE.LOB DUMP7.LOB FLD-CGAS.LOB GLASSCUT.LOB

KEYHOLE.LOB LOADBOX.LOB PAINTS.LOB PROCESS.LOB

RELAY.LOB RUNNER.LOB SCROLL.LOB SHAPED.LOB

SHOWDEMO.LOB STRN118.LOB STRTAWS.LOB ULTRA1.LOB

Copyright(C)1986-2000 SoftPLC Corp. ALL RIGHTS RESERVED

Figure 3-2File Directory Listing

You can use [66], [77], [99], [88], [Home], [End], [PgUp] and [PgDn] to position the cursor on the <FILE>you want. Press [Enter] to select that <FILE>. If the <FILE> you want is not listed, the <PATH>could be incorrect. Press [Esc] to return and select a new <PATH>.

HINT: If you have loaded multiple files into the offline Editor, youcan use the [F7] and [F8] keys to cycle through the list ofloaded files and display the <PATH> and <FILE> of each.When the one you want to use is displayed, press [Enter]twice to select it.

PROCESSING RESPONSES

Page 24: Topdoc Manual

CHAPTER 3 TOPDOC OVERVIEW

SoftPLC Corp. Inc. 28 July 20003-6

After you have responded to all the prompts for a given function, TOPDOC processes yourresponse(s). During processing of functions that may take several seconds or longer, a messageis displayed that tells you what is happening (eg: "Printing the report..."). When processing iscomplete, TOPDOC redisplays the prior menu and waits for you to select another option.

If any errors are detected in your responses that prevent the process from continuing, an errormessage is displayed that briefly describes the problem. You can press [F1] for help or [Esc] toreturn and correct the error. The last section in this chapter discusses errors in more detail.

ABORTING A PROCESS

To stop a process midway, you can usually press [Ctrl][Break]. [Ctrl][Break] can be used, forexample, to abort processes such as printing a report or uploading/downloading a file from the PLCto/from the computer.

Pressing [Ctrl][Break] brings up a menu with options to Continue or Abort . Selecting Continuecauses the process to go on uninterrupted. Selecting Abort cancels the process and returns youto the menu.

Sometimes only the Continue option is displayed because aborting during processing could causeinvalid files. Allow the process to complete, then make any necessary corrections and start theprocess again.

GETTING HELP

TOPDOC has a context sensitive online help facility. What this means is that you can get helppertinent to the task you are doing as you are doing it. You can get help any time TOPDOC iswaiting for you to select or respond, or has displayed an error message (refer to the last section inthis chapter).

Every menu option and response field has an associated help message. Simply press [F1] beforeor during your selection or response. A help window opens which contains the message.

If the message is longer than can be displayed in a single window page you will see the word "more..." at the lower right hand corner. Pressing [PgDn] or any key (except [Esc], [PgUp], or [8]) displaysthe next page of the message. The word "End ..." at the lower right hand corner indicates that thisis the last window of information for the current context. You can page backward through the helpmessage windows by pressing [PgUp].

Figures 5-3 show the help message for the <FILE> entry field.

TOPDOC EDITOR by SoftPLC Corp.

File Dbase Ladder SoftWIRES Quit

Page 25: Topdoc Manual

CHAPTER 3 TOPDOC OVERVIEW

Pub. No. TDZ-MN1 28 July 20003-7

Edit a PLC Workfile

HELP ON: "FILENAME". ESC TO QUIT

Enter the 8 character DOS file name - without the extension.

Since a PLC program file and all its associated files, such as cross

reference and database, all have the same filename and path

specifications, you will usually be able to reuse the displayed

defaults by pressing [Enter] twice. A file directory feature is available.

If on a blank FILENAME field you press [Enter], TOPDOC displays

an alphabetized list of files in the specified PATH with the

correct more...

Copyright(C) 2000 SoftPLC Corp. ALL RIGHTS RESERVED.

Figure 3-3(a)Sample Help Message

TOPDOC EDITOR by SoftPLC Corp.

File Dbase Ladder SoftWIRES Quit

Edit a PLC Workfile

HELP ON: "FILENAME". ESC TO QUIT

extension for the selected menu option. You can use

the arrow keys to move the pointer to the desired

FILENAME on the list. Then press [Enter] to select the

FILENAME at the current pointer position and continue

with your selected option. End...

Copyright(C) 2000 SoftPLC Corp. ALL RIGHTS RESERVED.

Figure 3-3(b)Sample Help Message (cont'd)

HELP BROWSE

With the TOPDOC Help system Browse option, you can view help messages on different topicsfrom within any help window, regardless of where you are in the program.

When you press [F1] to access the help system, then press [Esc] to quit viewing the message, amenu displays with the options Browse or Quit . Quit or [Esc] will return you to where you werebefore you pressed [F1].

Select Browse to display the topics for which help is available. Move the cursor using the arrowkeys to the desired function and press [Enter]. This will display the help message for the selectedoption.

Pressing [Esc] will display the menu prompting you to Browse again or Quit the help system.

SEE ALSO'S

Page 26: Topdoc Manual

CHAPTER 3 TOPDOC OVERVIEW

SoftPLC Corp. Inc. 28 July 20003-8

At times you will see on the help menu a third option, See Also . "See Also" references list othermessages in the Help system related to the current area. Select a topic using the arrow keysfollowed by [Enter], then view the help message. There may be additional levels of help below thislevel. [Esc] will return you to the help menu again.

IF YOU GET AN ERROR MESSAGE OR HAVE A PROBLEM...

Errors are displayed in a window at the bottom center of the screen (Figure 3-4). This windowcontains a short explanation of the error. Press [F1] to get more information about the error and/orsuggested methods to correct the problem.

TOPDOC EDITOR by SoftPLC Corp.

Open Close Files Open Verify Save Header Quit

Load a Workfile into memory

ERROR

Press F1 for help

File does not exist, create it with “Edit”

Release: 4.4

Copyright(C)2000 SoftPLC Corp. ALL RIGHTS RESERVED

Figure 3-4Sample Error Window

A 5-digit error number is displayed in the help message at the top center of the help window (Figure3-5). This number is extremely important for SoftPLC to be able to identify and troubleshoot theproblem.

HINT: Be sure to write down the error number at the top of thehelp message and the exact error message before callingfor technical assistance.

Press [Esc] to close the help and error windows and continue. Part IX has additional troubleshootinginformation.

Page 27: Topdoc Manual

Pub. No. TDZ-MN1 28 July 20003-9

TOPDOC EDITOR by SoftPLC Corp.

Open Close Files Open Verify Save Header Quit

Load a Workfile into memory

HELP ON: "05031". ESC TO QUIT

The file you selected to load is not in the specifiedpath. Verify that the path you

entered is correct and that the filename

was entered correctly.

If neither of these apply, you must use the

EDIT option to create a new Workfile.

End...

Copyright(C)2000 SoftPLC Corp. ALL RIGHTS RESERVED

Figure 3-5Sample Help Message For Error

HOW DO I . . .?

Table 3-3 provides a simple overview of how to use TOPDOC to perform various functions.

How do I . . . ? MENU OPTION(S)/KEYS

Create a new program offline Edit ; Ladder

Check Communications Xfer ; Who is it?

Upload a program from SoftPLC to Computer Xfer ; Upload

Download a program from Computer to SoftPLC Xfer ; Download

Save a program in SoftPLC to Flash Xfer ; Write

Monitor a program in a SoftPLC Online ; Ladder

Generate address usage Cross Reference Utilities ; Cross Ref

Enter program address documentation Edit ; Dbase

Print a report Document

Convert file formats Workfiles

Test a program Edit ; SoftWIRES

Table 3-3How do I . . .?

PART II

Page 28: Topdoc Manual

INDEX

Pub. No. TDZ-MN1 28 July 2000Page v

PC to PLC COMMUNICATIONS

Page 29: Topdoc Manual

THIS PAGE INTENTIONALLY LEFT BLANK

Page 30: Topdoc Manual

Pub. No. TDZ-MN1 28 July 20004-1

CHAPTER 4

PLC COMMUNICATIONS / XFER OPTIONS

Refer to the Quick Reference Guide for information on establishing communications betweenTOPDOC and SoftPLC, cabling requirements, and ethernet networking.

Once communications have been established, you can upload/download programs to/from thecomputer and PLC; monitor PLC operation online and perform troubleshooting functions such asforcing, contact histogram, etc.

The TOPDOC Xfer (transfer) options make it easy for you to test communications, performprogram transfers to and from the PLC, and other functions. The Xfer options are described in thischapter.

CHECKING COMMUNICATION AND CLEARING MEMORY

There are a number of ways you can check communications, verify you have selected the correctPLC before going online or performing an upload/download, and to verify you have selected acorrect program before downloading to the PLC.

Two of these are the Header and Who Is It? options. These options are described in this section.

CAUTION: It is important to verify you have selected the correct PLCbefore performing online functions or upload/download.Otherwise, hazardous machine operation could result.

THE WHO IS IT? OPTION

This option displays information about a PLC connected to the selected communication channel.

HINT: You can also use this option as a way of verifying thatcommunications are working.

After you select Who Is It? from the menu, a message will be displayed asking you to enter theChannel and Station number of the desired PLC. Once you enter these, the Who Is It window(Figure 4-1) is displayed.

Page 31: Topdoc Manual

CHAPTER 4 PLC COMMUNICATIONS/XFER OPTIONS

SoftPLC Corp., Inc. 28 July 20004-2

Data Highway Manager

Program header of PLC Device 0.002

Originator : JOHN DOE

Origin : 11/1/99 at 10:18 a.m.

From PLC Device : 0.002

Type of PLC : SoftPLC-1k

Data Table Size : 1152 words

Number of racks : 2

Tot used memory : 1375 words

Tot avail memory : 16392 words

Comm Module type : 1775-S5 Ser A Rev F

Program Description : Klinker Conveyance Processor

PAUSE

Press any key.. .

Figure 4-1Who Is It? Display

THE HEADER OPTION

The Header option shows you pertinent information on existing *.LOB files (workfiles) and PLC-3memory image files (*.PLC). When you select Header , you must provide the <PATH> and <FILE>of the program you want to view. After you enter the program name, the information is displayed.

When you are finished viewing, press any key to return to the menu. Figure 4-2 illustrates anexample Program Header display.

Program Header

Program header of disk file: "\TDZ\SPLC\DEMO.LOB

Originator : JOHN DOE

Origin : 8/25/99 at 10:32 a.m.

From PLC Device : 0.002

Type of PLC : SoftPLC-1K

Data Table Size : 256 words

Number of racks : 2

Tot used memory : 203 words

Tot avail memory : 6912 words

COMM Module type : PCL to PLC-5 ser B rev B

Program Description:

PROGRAM CREATED FOR TOPDOC DEMONSTRATION

Figure 4-2Program Header Window

Page 32: Topdoc Manual

CHAPTER 4 PLC COMMUNICATIONS/XFER OPTIONS

Pub. No. TDZ-MN1 28 July 20004-3

CLEARING MEMORY

In case of memory or processor faults that cannot be cleared by normal means, or if you want toclear a PLC's memory before creating or downloading a new program, you can download anempty program. Alternatively, SoftPLC processor memory can be cleared using the Clear Mem option on the Xfer menu.

PROGRAM TRANSFER OPTIONS

This section describes the Upload and Download options used to move programs betweenthe computer and the PLC. This chapter assumes you have already connected your devices,established, and checked communications.

THE UPLOAD OPTION

You use the Upload option menu to transfer information in the PLC RAM memory to yourTOPDOC computer hard disk. After you select Upload , you must enter the <PATH> and<FILE> you want to assign to the uploaded program.

You must then enter the Channel and Station Number of the PLC you want to upload from.

TOPDOC displays the program description if one exists. You have the option of retyping thedescription or leaving it as is by pressing [Enter].

If there is not already a file of this name on disk, TOPDOC will ask for a 78 character descriptionof the program. The program header information is displayed on the screen during the transfer,as is the part of PLC memory currently being uploaded.

CAUTION: If you had previously uploaded a program with this samename, the old .LOB file is written over by the uploadoperation.

You can upload regardless of the PLC mode. If the data table values are changing during theupload, the value reflected in the Data Table in the disk file will be the value of the bit/word atthe time the PLC memory was read.

When the Upload operation is performed, the program is automatically written to disk. When theupload is complete, you can press any key to return to the menu.

You can use the [Ctrl][Break] key sequence to abort the transfer and return to the menu.

THE DOWNLOAD OPTION

Page 33: Topdoc Manual

CHAPTER 4 PLC COMMUNICATIONS/XFER OPTIONS

SoftPLC Corp., Inc. 28 July 20004-4

You use the Download option to transfer information in your computer to a PLC processor. After you select Download , you must enter the <PATH> and <FILE> of the file you want todownload.

After entering the program name, you must enter the Channel and Station Number of the PLCyou want to download to. TOPDOC will then transfer the program to the PLC.

During the transfer, the program header information is displayed on the screen along with amessage indicating which part of the PLC program is being transferred.

You can use the [Ctrl][Break] key sequence to abort the transfer and return to the menu. However, if a download is aborted, the contents of the PLC memory will be corrupted. Acomplete successful download operation must be performed to create a valid program in theprocessor.

The PLC must be in Remote or Program mode to perform a download. If you try to downloadwhen the PLC is in run mode, a message will be displayed indicating this. No download willoccur. When you confirm that you wish to perform a download, the PLC will be placed into theremote program mode and all outputs will be de-energized.

WARNING: If a program download is attempted while the PLC is inremote run mode, unpredictable and/or hazardousmachine operation could occur. Damage to equipmentand/or injury to personnel could result from the PLCbeing placed into Remote Program mode.

CAUTION: Download only modifies the PLC RAM memory. IfSoftPLC is re-started before a Write to flash isperformed, you will start with the last saved workfile, notthe last downloaded or runtime state. The QuickReference Guide describes retentive memory in moredetail.

THE READ OPTION

You use the Read option menu to transfer information in the SoftPLC Flash or other disk toSoftPLC’s RAM memory. This function is meant to provide an easy way to revert to a previousprogram version without performing a download. For example, use this option if you have madeonline changes that you don’t want to keep or want to start from a saved data table values state.

After you select Read, you must enter the Channel and Station Number of the PLC you want towork with. You then enter the <PATH> and <FILE> of the program on the SoftPLC disk you wantcopied into the SoftPLC RAM.

The PLC must be in Program Remote Program to perform a Read operation.

Page 34: Topdoc Manual

CHAPTER 4 PLC COMMUNICATIONS/XFER OPTIONS

Pub. No. TDZ-MN1 28 July 20004-5

NOTE: The <PATH> and <FILE> display are not the TOPDOCcomputer, but the SoftPLC disk(s). No data transferfrom the SoftPLC to the TOPDOC PC occurs during aREAD. To transfer from SoftPLC to TOPDOC, useUpload.

When the read is complete, you can press any key to return to the menu.

THE WRITE OPTION

You use the Write option to transfer information in your SoftPLC’s RAM to the SoftPLC flash orother disk.

The Write function is meant to provide an easy way to back up your SoftPLC. If you have madeonline ladder changes, you should Write them to the SoftPLC flash disk to ensure they are notlost in case SoftPLC is ungracefully shut down or power is lost.

After you select Write, you must enter the Channel and Station Number of the PLC you want towork with. Then, enter the <PATH> and <FILE> you want to save the RAM contents to, on theSoftPLC disk.

After entering the program name, download to. TOPDOC will then transfer the program to thePLC.

During the transfer, the program header information is displayed on the screen along with amessage indicating which part of the PLC program is being transferred.

The PLC must be in Remote or Program mode to perform a download. If you try to write whenthe PLC is in run mode, a message will be displayed indicating this. No write will occur. Whenyou confirm that you wish to perform a download, the PLC will be placed into the remoteprogram mode and all outputs will be de-energized.

NOTE: The Write option is SoftPLC RAM to SoftPLC disk. Nodata transfer from the TOPDOC PC occurs during aWrite. To transfer from TOPDOC PC to SoftPLC, useDownload.

WARNING: online ladder logic and data table changes are notautomatically saved unless your SoftPLC has batterybacked up RAM memory. A number of options areavailable to provide retention memory functions. Theseare described in detail in the Quick Reference Guide.

Page 35: Topdoc Manual

PART III

LADDER LOGIC& DATA TABLE EDITING

Page 36: Topdoc Manual

THIS PAGE INTENTIONALLY LEFT BLANK

Page 37: Topdoc Manual

Pub. No. TDZ-MN1 July 28, 20005-1

CHAPTER 5

LADDER EDITOR OVERVIEW

This chapter describes the Ladder Editor user interface and some basic concepts you need toknow to use the Ladder Editor, both online and offline. This includes how you interact with theEditor, what the display looks like, how to use the command buffer and menus, and other generalediting concepts.

The user interface is free-form, much like the interface for a word processor or spreadsheetprogram. You decide what you want to do and when you want to do it. At times, a menu or listof choices will be displayed. Chapter 5 describes how to select from menus and lists, and torespond to prompts.

LADDER EDITOR PURPOSE/SCOPE

You use the Ladder Editor to create and/or modify ladder diagram programs and programdocumentation - a program file. The term "program file" describes the entity consisting of:

@ program description (the file header)@ ladder diagram program rungs@ data table configuration and values@ I/O configuration files@ force table@ rung comments associated with the rungs@ database of address labels and tagnames@ address usage cross references@ non-sequential rung and/or data table lists

TOPDOC maintains all parts of a program file as a set of disk files, all with the same name, butdifferent extensions. Appendix A describes each of the TOPDOC files. You only need to enterthe root name of the program file you want to use for an option and not the file extension,TOPDOC determines which file(s) it needs.

The major difference between online and offline editing is that online, the program and data tableTOPDOC uses are in the PLC, rather than the disk file copy that is used offline. The informationin this chapter applies to both online and offline editing.

Page 38: Topdoc Manual

CHAPTER 5 LADDER EDITOR OVERVIEW

SoftPLC Corp., Inc. 28 July 20005-2

EDITOR CONFIGURATION

This section describes how to configure the Ladder Editor. The configuration defaults are shownin Figure 5-1.

The first time you load the Ladder Editor (either online or offline) after installing TOPDOC, theEditor Configuration Window will be displayed automatically to allow you to setup the Editor. You can also change the setup using the Editor option found under the main menu Setup option.

Figure 5-1 depicts the Editor Configuration window. After you enter all the values, TOPDOCeither returns you to the Setup Menu or into the Ladder Editor.

TOPDOC by SoftPLC Corp.

Setup Manager

Colors Editor Printer Quit

Configure EDITOR CONFIGURATION

<F9>:accept all <ESC>:abort changes

Number of rung comment lines to be displayed

Number of displayed comment lines : 5

Rung comment display position (A/B) : A

Tab width for comment display : 4

# of rungs to scroll on PAGE keys : 4

Display expression data values? (Y/N) : N

Copy data values on rung copy? (Y/N/P) : P

Copy address tags on rung copy? (Y/N/P) : P

Display next higher address label? (Y/N) : N

Number of lines in Data Watch Window : 5

Show addresses/tags in ladder (A/T) : A

Figure 5-1Editor Configuration Window

NUMBER OF DISPLAYED COMMENT LINES

In this field you enter the number of lines of Rung Comment (per rung) you want to see on thescreen during Ladder Diagram Editing when comment display is turned on. (The [F4] key is usedto turn the comment display on and off during ladder editing.)

Page 39: Topdoc Manual

CHAPTER 5 LADDER EDITOR OVERVIEW

Pub. No. TDZ-MN1 July 28, 20005-3

RUNG COMMENT DISPLAY POSITION

In this field enter "A" to display comments above the rung or "B" to display comments below therung. Displaying comments below the rung may allow you to see more ladder diagram instructionson the screen, especially for rungs with multiple parallel branches.

TAB WIDTH FOR COMMENT DISPLAY

Enter into this field the number of spaces you want TOPDOC to display for each tab characterencountered in a comment, instead of the actual tab length set in the comment itself. Commentsalways begin in column 3, regardless of this value.

Using a small value here lets you see more of the comment on the screen even if you had set thetab stops in the comment to larger values for printing purposes.

NUMBER OF RUNGS TO SCROLL ON PAGE KEYS

In this field you enter the number of rungs you want to move up or down when you press [PgUp] or[PgDn], respectively. During ladder editing you can use the [PgUp] and [PgDn] keys to move up ordown the number of rungs you specify here.

DISPLAY EXPRESSION DATA VALUES?

In this field, specify Y (Yes) or N (No) as to whether you want to display the current values of eachword used in expressions for CPT and FAL type instructions. Most times, you would enter "N", soyou can maximize the amount of ladder displayed on the screen.

COPY DATA VALUES ON RUNG COPY?

In this field, you specify whether data table values are copied when rungs are copied from oneprogram to another. Y (Yes) will copy the values and N (No) will not copy the values. P (Prompt)will cause the editor to ask you if you want values copied on each rung copy operation acrossprograms.

COPY ADDRESS TAGS ON RUNG COPY?

In this field, you can specify whether address labels are copied when rungs are copied from oneprogram to another. Y (Yes) will copy the address labels, N (No) will not copy the address labels,and P (Prompt) will cause the editor to ask you if you want address labels copied on each rung copyoperation across programs.

DISPLAY NEXT HIGHER ADDRESS LABEL?

Page 40: Topdoc Manual

CHAPTER 5 LADDER EDITOR OVERVIEW

SoftPLC Corp., Inc. 28 July 20005-4

If this field is Y (Yes), and database display is turned ON, then the Ladder Editor will displayadditional database information. If the instruction address does not have a database entry,TOPDOC will look for a database entry for the higher data table objects of which the current addressis a part, and display that label if it exists.

For example, if Timer Bit T4:0/DN is used and does not have a database label, TOPDOC will displaythe label for TIMER T4:0. This feature is also implemented on the Ladder Report and is describedin more detail in Chapter 19. However, this field affects only the display and not the Ladder Report.If this field is N (No), then only exact matches of database records to addresses will be displayed.

NOTE: If you use the Database Editor Create Blanks option(Chapter 16) and do not go back and delete blank recordsafter your database entry is completed, this feature maynot seem to operate as TOPDOC treats blank recordsdifferently than no record.

SIZE OF DATA WATCH WINDOW

In this field, specify the number of lines of data to be displayed when the Data Watch Windowfunction is active in the ladder editor. Refer to Chapter 12 for more information on the Data WatchWindow function.

SHOW ADDRESSES/TAGS IN LADDER

In this field, enter <A> to display the data table addresses for each instruction parameter, or <T> todisplay the 13 character tagname. If no tagname exists for an address, the address will display.

[ALT] [F6] can be used to toggle the address/tagname display during ladder editing.

THE EDITOR DISPLAY

The Ladder Diagram Editing window is displayed after you select the Ladder option from either theOnline menu or the offline Edit menu. Figure 5-2 shows the Ladder Editor display for a newprogram.

Page 41: Topdoc Manual

CHAPTER 5 LADDER EDITOR OVERVIEW

Pub. No. TDZ-MN1 July 28, 20005-5

Mode:operate F10=Menu Rung:P2/0

C:\TDZ\SPLC\DEMO

--------------------------------END OF PROGRAM-----------------------------

Figure 5-2Ladder Diagram Editing Window

Line 1 displays the current mode of operation, messages, and the current rung number. It alsoreminds you to press [F10] to see the Ladder Editor pull-down menus. Online, Line 1 also displaysthe forced I/O status, and other related information (Chapter 10).

Line 2 contains the "command buffer" (used for instruction parameter entry) and the<PATH>\<FILE> of the currently displayed program.

All the remaining lines on the screen are used for the Ladder Diagram program.

OPERATING MODES

The TOPDOC Editor has two main operating modes - operate and insert. The mode is displayedon Line 1 to the far left side. You perform all editing functions except entering new rungs orinstructions from operate mode. These include searching and positioning, changing the displaymode, loading other editors, program documentation, and more. In insert mode you enter new rungsor instructions.

NOTE: Online the displayed mode will be the PLC operatingmode, not the TOPDOC Editor mode.

CURRENT RUNG NUMBER DISPLAY

You can edit only the current rung, which is the one the cursor is on and is normally located in themiddle of the ladder diagram window. The current rung number is displayed to the far right on line1 and the cursor points to the current instruction on that rung.

SoftPLC RUNG NUMBERING

SoftPLC rungs are numbered as follows:

@ Rungs are prefixed with Pn, where n is the SoftPLC program number, beginning with program2 through 999 (Programs 0 and 1 are reserved for non-ladder logic functions). TOPDOCdisplays the last rung of each program as END OF PROGRAM, as shown in Figure 5-2.

@ Rungs are numbered in increments of 1, beginning with rung "0". The rung number follows theProgram number, separated by a slash. For example, rung P2/0 is the first rung of the firstprogram. Other example rung numbers are P54/932, P4/23, P17/2.

Page 42: Topdoc Manual

CHAPTER 5 LADDER EDITOR OVERVIEW

SoftPLC Corp., Inc. 28 July 20005-6

The END OF PROGRAM statements are automatically inserted. You cannot include thesestatements within a range (for block copy/move) or delete an END OF PROGRAM statement itself.You also cannot insert rungs beyond an END OF PROGRAM statement without inserting a newprogram file first.

LADDER LOGIC DISPLAY

Figure 5-3 is a sample ladder display with all program documentation turned OFF. Note that thecursor is located in the middle of the screen to make program editing easier. In TOPDOC, you canscroll from program section to program section. For example, in the program in Figure 5-3, the ENDOF PROGRAM statement is the last rung of program 31 (Rung 31/6), and the next rung is the firstrung of program 32 (Rung 32/0).

If the rung size exceeds the ladder editing window size, you can use [6], [7], [Home] and [End] keysto scroll the rung horizontally within the window and use [9] and [8] to scroll the rung vertically withinthe window.

Mode:operate F10=Menu P31/6 > C:\TDZ\SPLC\

* **N210:031 +) ADD )))))))))))),*

/))] [)))))))))))))))))))))))))))))))))))))))))))))))))))))1 A + B --> R /1* 08 * A: 1 *** * *** * B: N211:031 *** * 2 *** * R: N211:031 *** * 2 *** .))))))))))))))))))-** +) RET ))))))))))))))))),*/)))))))))))))))))))))))))))))))))))))))))))))))))))))1 Output parm N211:031 /1

* .)))))))))))))))))))))))-** *

/)))))))))))))))))))))))))))))))END OF PROGRAM)))))))))))))))))))))))))))))))))1* *

*+) SBR )))))))))))))))), +) GRT )))))))))))), +) MOV )))))))))))),*/1 Input parm: N210:032 /)1 A > B /)))))))))))))1 (MOVE) A --> R /1*.))))))))))))))))))))))- * A: N208:010 * * A: 26 **

* * 8 * * *** * B: 26 * * R: N208:010 *** * * * 8 *** .))))))))))))))))))- .))))))))))))))))))-*

Figure 5-3Example Ladder Program Display

POWER BAR DISPLAY

Normally the power bars are displayed as solid lines. When creating or editing a rung, however, thepower bars adjacent to that rung will be displayed with "i's" or "r's" instead of the solid power bar line.The "i's" indicate that a new rung is being Inserted. The "r's" indicate that a replacement of theoriginal logic may have occurred.

Page 43: Topdoc Manual

CHAPTER 5 LADDER EDITOR OVERVIEW

Pub. No. TDZ-MN1 July 28, 20005-7

The rung may be completed (assembled) and the power bars restored by pressing [F9].

NOTE: If you are offline editing, you can also complete(assemble) a rung by moving off the rung with anypositioning command or by inserting a new rung.

MENU DISPLAY [F10]

A number of "HotKey" commands are available to allow you to quickly perform different editingfunctions without having to use a lot of keystrokes. By pressing [F1] from operate mode you can geta list of these commands.

Alternatively, you can use a set of pull-down menus to perform the editing functions. By pressing[F10] when TOPDOC is waiting for a command, you will display a set of pull-down menus on the topline of the screen (Figure 5-4).

))))))))))))))))))))))))))))))))))))))Ladder Editor))))))))))))))))))))))))))))))))))))))))

File Ladder Text Data Position View Special

Figure 5-4Ladder Editor Menu [F10]

USING THE MENUS

Before any single menu item has been "pulled-down", you can use the [6] and [7] keys to move thecursor to a desired option. At any time you can pull-down the current option by pressing [9]. Oncean option has been pulled-down, the [6] and [7] keys will still move through the options on line 1,but the menus will be pulled-down.

While in the pulled-down menus you can:

@ Select an option using the [9] and [8] keys to position, then press [Enter] to execute the option.

@ Select and execute an option by pressing the first letter of the option name. Only the top mostoption in the list with the pressed letter can be selected using this method. For this reason,some of the option names may seem awkward as we have forced each option to begin with aunique letter.

@ View the possible commands and execute an option by pressing a "HotKey" command.

@ Press [Esc] to exit the menus without selecting an option.

After you select an option, the command is executed, and the menu display is turned off. You canre-display the menus by pressing [F10] again.

READING THE MENUS

Page 44: Topdoc Manual

CHAPTER 5 LADDER EDITOR OVERVIEW

SoftPLC Corp., Inc. 28 July 20005-8

After the menu option names (in the pulled-down menu), there will be one of three things:

@ A key sequence NOT enclosed in ( ). These are "HotKey" commands that can be executeddirectly by pressing the appropriate keys (ie: [Alt][P] or [F6]). These "HotKey" commands areidentical to the commands you can use when the menus are turned off.

@ A key sequence enclosed in ( ). These are commands that can only be executed by selectingthe menu option or exiting the menus and pressing the key sequence. These are not "HotKey"commands that can be executed from the menu as they require multiple sequential keystrokes.The commands are listed on the menus as a training/information tool only.

@ An arrow symbol. This indicates that the menu option pulls down an additional level menu.

+)))))))))))))))))))))))))))))Ladder Editor))))))))))))))))))))))))))))))))))),*File Ladder Text Data Position View Special *

.)))))+)))))))))))))))))))))))))))),))))))))))))))))))))))))))))))))))))))))))-*T004:*Accept Edits F9 * +) TON )))), */))]/[*Test Edits Assembly Alt+A *))))))))))))))))))))))))))1 T004:000 /(EN)1* D/))))))))))))))))))))))))))))1 * Base .01 * ** *Instruction Edits 4+)))))))))))))))))))))), * PR 120 /(DN)*

* *Rung Edits 4*Delete Rung (Del R) * * AC 119 * ** *Subroutine Edits 4/))))))))))))))))))))))1 .))))))))))- ** .)))))))))))))))))))))))))))*Add Above (Ins 8) * *

* *Insert Below (Ins 9) * ** T004:000.ACC T004:000.ACC /))))))))))))))))))))))1 O:001 */)))))] [))))))))))] [))))))))))))1Range Edits 4>/)))))))))))( )))))))*

* 07 06 .))))))))))))))))))))))- 02 ** ** ** **T004:000 +) JSR ))))))))))))))))),*/))] [)))))))))))))))))))))))))))))))))))))))))))))))1 JUMP TO SUBROUTINE /1

* DN * SBR file number P003 *** * Input parm: *** * Output parm: *** .)))))))))))))))))))))))-*

Figure 5-5Using the Ladder Editor Pull-Down Menus

LADDER DOCUMENTATION DISPLAY

There are different options which specify how the ladder diagram is displayed. In the Ladder Editoryou can select to display:

@ rungs only@ rungs and rung comments@ rungs and address labels@ rungs and tag names@ rungs, tag names and address labels@ rungs, address labels, and rung comments

Page 45: Topdoc Manual

CHAPTER 5 LADDER EDITOR OVERVIEW

Pub. No. TDZ-MN1 July 28, 20005-9

@ rungs, tag names, and rung comments@ rungs, tag names, address labels, and rung comments

RUNG COMMENT TOGGLE

COMMAND: Rung Comment ToggleHOTKEY: [F4]MENU: View ; Rung Comment Toggle

You use the Rung Comment Toggle command to toggle the display of rung comments on and off.Rung comments are described in more detail in Chapter 17. The way the comments are displayeddepends on the "EDITOR CONFIGURATION" (described earlier in this Chapter).

ADDRESS LABEL TOGGLE

COMMAND: Label ToggleHOTKEY: [F6]MENU: View ; Label Toggle

You use the Label Toggle command to select whether to display the address label text, tagnames,or no descriptions above the instruction. (The address label text and tagnames are described inChapter 26.) When you enter/select the Label Toggle command, a menu is displayed with optionsAll , Labels , None , Tag Only or Quit . Quit takes you back to the Ladder Editor withoutchanging the prior selected display. None turns off the display of database information completely.

Labels displays the address label TEXT information from the database for the instruction address.(In multi-address instructions the "main" address, which is normally the first address or the FileControl address is the instruction address.

Tag Only displays the value of the TAGNAME field from the database for the instruction address.

All displays both the TAGNAME and the address label TEXT information. The TAGNAME isplaced as the top line in the display.

Address Label Display Considerations

Choosing to display the database information can cause the following to occur:

1) The Editor may seem to work slower because a) there is more information on the screen, andb) the information in the database file must be retrieved from disk before it can be displayed onthe screen. This is particularly noticeable when scrolling quickly through the program.To help alleviate this situation you can use the [PgUp] and [PgDn] keys and the positioncommand, [Alt][P] (Chapter 6). You can also turn the address label display off until you scrollto the desired location and then turn the display on again.

2) Rungs which could be displayed within the boundaries of the ladder editing window could nolonger fit. In this case, a message "Current rung extends beyond the screen width/depth" is

Page 46: Topdoc Manual

CHAPTER 5 LADDER EDITOR OVERVIEW

SoftPLC Corp., Inc. 28 July 20005-10

displayed on line 2. You can use [6], [7], [9], [8], [Home], and [End] to scroll around to see theentire rung.

NON-SEQUENTIAL RUNG DISPLAY

COMMAND: Non-Sequential Rung Display EditorHOTKEY: [F5]MENU: View ; Non-Sequential Rungs

This section describes TOPDOC's Non-Sequential Rung Display feature. With this feature, you canselect up to 8 rungs from any locations within a Ladder Program and sequentially display them. Thisis an extremely useful troubleshooting tool since you can see logic related to a particular controlfunction even if it is not entered sequentially into the program.

The Non-Sequential Editor contains five "list windows". Each "list window" may contain up to 8 rungnumbers, and each of the five lists of rungs can be given a unique name. Furthermore, each groupof five "list windows" can be stored as a disk file for later re-use without having to re-specify the rungnumbers.

With TOPDOC, you can display any one of the current five "list window" groups of rungs. It is theneasy to switch to another group within the five, go back to normal full consecutive rung display, orto load another group of five "lists".

Page 47: Topdoc Manual

CHAPTER 5 LADDER EDITOR OVERVIEW

Pub. No. TDZ-MN1 July 28, 20005-11

RUNG DISPLAY MODE

Regular Display Selected Display Edit Load Save Quit

Edit non-consecutive display list

List selected to display: DISPLAY1

DISPLAY1 DISPLAY2 DISPLAY3 DISPLAY4 DISPLAY5

P2/0 P3/2 P2/1 P2/0 P2/1

P2/3 P2/1 P2/3 P2/6 P3/1

P3/1 P4/2 P2/4 P2/8 P4/1

P3/2 P6/2 P2/6 P2/10 P2/0

P3/1 P2/10 P2/11

P4/1 P2/12 P2/13

P5/2 P2/14 P2/14

P2/0 P2/16

Figure 5-6Non-Sequential Rung Display Editor

To load the Non-Sequential Rung Display Editor (Figure 5-6), enter/select the command from theLadder Editor. The Non-Sequential Editor menu includes the options Regular Display , SelectedDisplay , Edit , Load , Save , and Quit . Quit returns you to the Ladder Program. The otheroptions are described in the following sections.

REGULAR DISPLAY

Selecting Regular Display from the Non-Sequential Rung Display Editor re-displays the ladderlogic in normal mode (sequentially, all rungs displayed). The cursor will be located on the rung youwere positioned on before you accessed the Non-Sequential Rung Display Editor.

SELECTED DISPLAY

After you select a list of rungs to be displayed non-sequentially (described below), this option allowsyou to display the currently selected list of rungs (designated in the "List selected to display:" field).The rungs will be displayed in the order specified in the "list window". To indicate that you are innon-sequential display mode, TOPDOC puts an asterisk "*" before the rung number in the upperright hand corner of the Ladder Editor.

To return to the Non-Sequential Rung Display Editor and/or Regular Display mode, enter/select theNon-Sequential Display command again.

Most of the Ladder Editing commands are not valid in the Non-Sequential Display Mode. Table 5-1lists the valid commands.

Page 48: Topdoc Manual

CHAPTER 5 LADDER EDITOR OVERVIEW

SoftPLC Corp., Inc. 28 July 20005-12

KEYS DESCRIPTION

OFFLINE/ONLINE COMMANDS

[8][9][6][7] Moves cursor through ladder

[Home]/[End] Moves cursor to beginning/end of rung

[Ins][D] Insert data

[Alt][L] Address Label Editor

[Alt][R] Rung Comment Editor

[Alt][D] Data Table Editor

[Alt][S] On-Screen cross reference

[F2] Force Table

[F4] Toggle rung comment display ON/OFF

[F5] Non-Sequential Rung display menu

[F6] Toggle address label display ON/OFF

ONLINE ONLY COMMANDS

[+]/[-] Turn ON/OFF the bit corresponding to the currentEXAMINE ON/OFF instruction

[Ins][+]/[-] Force ON/OFF the bit corresponding to the current bitinstruction

[F3] Change PLC operating mode

Table 5-1Allowed Non-Sequential Display Mode Functions

SELECTING RUNGS

There are two ways to select the rungs to be displayed non-sequentially:

1) Mark the rungs from the Ladder Editor. This is described in the next section.2) Enter the rung numbers using the Non-Sequential Editor Edit option. This technique is

described in "SELECTING RUNGS USING THE EDIT OPTION".

CAUTION: If rungs are inserted or deleted from the ladder logic, non-sequential display lists will no longer reflect the same logicthey did when they were first created. The non-sequentiallists use only the rung number, not the logic. Therefore,you may need to adjust the lists when the program logicchanges.

Page 49: Topdoc Manual

CHAPTER 5 LADDER EDITOR OVERVIEW

Pub. No. TDZ-MN1 July 28, 20005-13

Selecting Rungs From the Ladder

COMMAND: Mark Non-Sequential RungHOTKEY: [Alt][F5]MENU: View ; Add Rung to List

You can easily select the rungs to be displayed non-sequentially from within the Ladder Editor, whileyou are looking at the logic. To do this, position the cursor on the rung to be selected and enter theMark Non-Sequential Rung command.

This enters the rung number into the currently selected "list window". The default "list window"selection, if you have not previously selected a list from the Non-Sequential Display Editor, is thefirst "list window".

Then, position on the next desired rung, and enter the Mark Non-Sequential Rung command again,etc. You may select up to 8 rungs in this manner. If more than 8 rungs are selected for the current"list window", a message "Selected list already full" will display.

HINT: If you need to view a set of rungs non-sequentially you canuse this marking technique very quickly and will not haveto use the full power (and additional setup required) of theNon-Sequential Display Editor, such as naming lists,saving groups of lists to disk, etc.

Once you have marked the desired rungs, you can load the Non-Sequential Rung Editor, select theSelected Display option and view only the selected ladder logic rungs in the order they weremarked. To return to regular consecutive display, select the Regular Display option from the Non-Sequential Rung Display menu. See the appropriate sections for more details.

Selecting Rungs Using the Edit Option

The Edit option allows you to create or change non-sequential rung display lists. You can changethe name of each of the five list windows, insert/change the rung numbers in the lists, or delete alist of rung numbers. The cursor will move to the top of the first "list window" when Edit is selected.

List Name

Each of the five list windows may be given an 8 character name, called the "list name". Thecurrently selected "list name" is displayed in the top center of the editing window.

HINT: Lists do not have to be named provided you only have 1list window with entries in it. Otherwise, althoughTOPDOC knows which list you have selected, if all thenames are blank, you will not be able to easily tell whichlist will display.

To enter a new "list name" or change the current "list name", press [Alt][X]. An entry window willopen and prompt you to enter a name. Input the name, then press [Enter].

Page 50: Topdoc Manual

CHAPTER 5 LADDER EDITOR OVERVIEW

SoftPLC Corp., Inc. 28 July 20005-14

Insert Rung Numbers

The rungs to be displayed may be specified or changed by entering the rung numbers in the "listwindow". To do this, press [Ins] while the cursor is positioned on the "list window" name. This willposition the cursor on the first rung number entry field. Input the rung number and press [Enter] toaccept it. The cursor will move to the entry field for the second rung. You may enter up to 8 rungnumbers per "list window" in this same manner.

You can enter rung numbers in any order from any valid rungs in the current program file. Therungs do not have to be in ascending order and you can even enter the same rung number morethan once!

Table 5-2 summarizes the list window editing commands. If you enter a rung number, then decideyou do not want that entry, you can type over it to remove from the list. If you enter a rung numberthat can't be found in the current program, the cursor will remain positioned on the entry until youenter a valid rung number.

KEYS DESCRIPTION

[8][9][6][7] Move cursor

[Ins] Toggles Insert and Overstrike mode

[Ctrl][BkSp] Erase current field

[Home] Move cursor to beginning of current field

[End] Move cursor to end of current field

[F9] Accept all entries

[Esc] Abort entries

Table 5-2List Window Edit Commands

When you have entered all of the numbers for the rungs you want to display, press [F9] to acceptthe entries or [Esc] to abort the entries. This will move the cursor to the current "list name".

Use the [6] and [7] keys to move the cursor to the other "list window" name fields. New "list window"names and rung numbers may be entered by performing the previous steps.

Delete Entire List

While positioned on the "list window" name, you can press [Del] to delete the entire list of rungs.A message will be displayed asking you to confirm the deletion. Responding with Yes will clearthe rung numbers fields leaving the cursor on the "list window" name. Responding with No willplace the cursor back on the "list window" name.

Page 51: Topdoc Manual

CHAPTER 5 LADDER EDITOR OVERVIEW

Pub. No. TDZ-MN1 July 28, 20005-15

Selecting the List to Display

Above the "list windows" is a statement "List selected to display: __________".

This indicates the "list window" name currently selected to be displayed in the Ladder Editor whenyou select Selected Display .

To select another list, press [Enter] while the cursor is located on the desired list name (at the topof the list windows).

SAVE

The Save option allows you to save rung numbers entered into the five "list windows" and theirrespective names as a disk file that can later be retrieved. The contents of the entire Rung DisplayMenu will be saved.

Select Save from the Non-Sequential Display Menu. A window will open prompting you to entera <PATH> and <FILE>, with the default being the name of the current PLC program. The file isgiven an .NCR extension.

LOAD

The Load option allows you to load a rung display configuration that has been previously writtento disk with the Save option.

Select Load from the Non-Sequential Display Menu. A window will open prompting you to entera <PATH> and <FILE>, with the default being the name of the current PLC program. When youenter the filename, the rung display configuration will be loaded.

Page 52: Topdoc Manual

Pub. No. TDZ-MN1 July 28, 20006-1

CHAPTER 6

POSITIONING COMMANDS

This chapter describes the various methods available to find rungs or instructions within a program:cursor movement commands, the Position command, and the Find commands. You use thesecommands while in operate mode in the Ladder Editor.

THE POSITION COMMAND

COMMAND: Position on rung numberHOTKEY: [Alt][P]MENU: Position ; Position on Rung Number

The Position command moves the cursor to a specified rung. When you enter this command, youare prompted to enter a rung number on line 2. Type the desired rung number and press [Enter].The rung you choose becomes the current rung and is displayed in the middle of the ladder window.

To quickly enter the rung number, you can use the commands in Table 6-1.

KEYS DESCRIPTION

[Ctrl][BkSp] Clear the entry field

[Ctrl][6] Position cursor on rung number (after program section number)

[Ctrl][Enter] Clear from cursor to end of field

[Ins] Toggle insert and overstrike mode

Table 6-1Rung Number Entry Shortcuts

If the rung number you enter does not exist, the cursor will be positioned on the first "bad" characterin the buffer so you can correct the entry.

CURSOR MOVEMENT COMMANDS

The 12 cursor movement commands are listed in Table 6-2. These commands can be used whenyou are in operate mode.

Page 53: Topdoc Manual

CHAPTER 6 POSITIONING COMMANDS

SoftPLC Corp., Inc. 28 July 20006-2

HOTKEY MENU OPTION Position , then

DESCRIPTION

[8]/[9] Prior/Next rung or parallel branch

[7]/[6] Prior/Next instruction

[Home] Beginning of Rung First instruction on current rung

[End] Rung End Last instruction on current rung

[PgUp] Up a Page of Rungs Up "n" rungs, "n" is configurable

[PgDn] Down a Page of Rungs Down "n" rungs, "n" is configurable

[Ctrl][PgUp] Move to top of Section First instruction in program section

[Ctrl][PgDn] Go to End of Section Last instruction in program section

[Ctrl][Home] Top of Program First instruction in entire program

[Ctrl][End] End of Program Last rung in entire program

Table 6-2Cursor Movement Commands

NOTE: The [PgUp] and [PgDn] keys move the cursor up or downthe number of rungs you specified in the EditorConfiguration (Chapter 5).

THE FIND COMMANDS

COMMAND: Find Instruction/AddressHOTKEY: [Alt][F]MENU: Position ; Find Instruction/Address

You can use the Find commands to locate all occurrences of:

@ Parameter a parameter (address, jump label, or constant)@ Instruction an instruction (mnemonic)@ Instruction an instruction and address combination@ Unlabeled Parameter an address with no label in the database

When you enter the Find command, a menu window (Figure 6-1) appears with options Parameter,Instruction, Unlabeled Parameter , and Quit .

The first two options are described in this section. The Quit option returns you to the ladder displayand operate mode. The Unlabeled Parameter option has to do with the address labels databaseand is described in Chapter 15.

Page 54: Topdoc Manual

CHAPTER 6 POSITIONING COMMANDS

Pub. No. TDZ-MN1 July 28, 20006-3

Find locates and positions the cursor on the next occurrence of the specified search criterion in theprogram. After a "Find", you are asked whether you want to search again for the next occurrence.

FIND

Parameter Instruction Unlabeled address Quit

Find an address, a tagname, a label or a constant

Figure 6-1Find Command Menu Window

If you select Yes , TOPDOC searches again for the next occurrence. If you select No, you arereturned to operate mode. Once the end of program is reached, TOPDOC goes back to thebeginning of the program and searches from that point forward to where you started the first search.

FIND INSTRUCTION/ADDRESS COMBINATION

You can use the Instruction option to find any instruction by its mnemonic, or aninstruction/address combination. After you select Instruction , the instruction entry commandbuffer is opened on line 2.

Enter the instruction mnemonic you want to search for. The command buffer works exactly asduring instruction entry (Chapter 7). You can enter the mnemonic directly or press [Enter] to use thepull-down mnemonic menus, if desired.

If you want to specify particular address(es) or other parameters, also enter them into the commandbuffer. You can use the Scroll Recall feature and other typing shortcuts while entering information(see Tables 3-2 and Chapter 7).

As TOPDOC searches, the cursor will be positioned on the first occurrence of that type instruction(and address). You can then search again or abort (as described previously).

FIND ADDRESS/PARAMETER

You use the Parameter option to find any instruction using a specified PLC address, tagname,label or constant. After you select Parameter , an address entry window is displayed. Enter theaddress, tagname, label or constant you want to search for.

NOTE: When entering the parameter, the commands in Table 6-1can be used for typing shortcuts.

As TOPDOC searches, the cursor will be positioned on the first occurrence of that address. You canthen search again or abort (as described previously).

TOPDOC will search for the parameter in all instructions, including those in multi-addressinstructions and embedded in files. However, TOPDOC searches based on the type of address

Page 55: Topdoc Manual

CHAPTER 6 POSITIONING COMMANDS

SoftPLC Corp., Inc. 28 July 20006-4

entered. If you enter a bit address, all uses of the bit are found. However, if the word part of the bitis used in the program, TOPDOC will not find those occurrences. More information on TOPDOCaddress types can be found in Chapters 13 and 14, and in the next section.

USING WILDCARDS

You can use an * (asterisk) as a "wildcard" in your parameter specification.

In the Parameter specification, the * indicates you want all values to match that particular part of theparameter value. For example, */2 means all words using bit 2. T* means all timers.

FIND/PARAMETER DESCRIPTION

T4:* Find all Timers in File 4

O3/* Find all bit occurrences of output word 3

C5:*.ACC Find all uses of Counter Accumulated words in Counter File 5

Table 6-3Wildcard Search Examples

The Parameter specification is "object" sensitive. If you enter a bit type address, TOPDOC will onlysearch for bits. For example, if you want to be sure to find all occurrences of all parts of a Timer,you must search for the:

@ Timer File as a File (#T*:*)@ Timer as a Timer (T*:*)@ Each Timer Word as a Word (ie: ACC, PRE) (T*:*.*)@ Each Timer Bit as a Bit (T*:*/*)

Page 56: Topdoc Manual

Pub. No. TDZ-MN1 July 28, 20007-1

CHAPTER 7

INSTRUCTION LEVEL EDITING

This chapter explains how you can insert/change the data associated with an instruction (withoutusing the Data Table Editor) and how to change, delete, or insert (add) instructions to a ladderprogram.

NOTE: When instruction level changes are made to an existingrung (ie: instructions or branches are inserted, deleted, orchanged), sections of the power bars adjacent to that rungwill be displayed with "R's" instead of the solid power barline. This is to indicate that a replacement of the originallogic may have occurred. The rung may be completed (orassembled) and the power bars restored by pressing [F9].Offline, or online in program mode, you can also restorethe power bars by moving the cursor off the rung.

INSERTING DATA INTO INSTRUCTIONS/CONFIGURING PID ANDMSG

COMMAND: Insert DataHOTKEY: [Ins][D]MENU: Data ; Edit Instruction Data

You can change the data associated with instructions that reference data table values, liketimers/counters, PID, MSG, etc. You do this with the Insert Data command. To use the insert datacommand, position the cursor on the desired instruction and enter/select the command.

Data Watch Window is created with a list of bit/word addresses used in the current instruction(except control bits). Refer to Chapter 12 for details on the Data Watch Window functions. Forcomplex instructions using integer control files (ie: PID or MSG), a special Editor appears which letsyou configure the control block data. When you have changed all the values you want, press [F9]to accept the values or [Esc] to abort your edits. Detailed help is available on each option and fieldin these screens. Press [F1] if you are unsure of what to enter.

DELETING AN INSTRUCTION

COMMAND: Delete InstructionHOTKEY: [Del][I]MENU: Ladder ; Instruction Edits ; Delete Instruction

Page 57: Topdoc Manual

CHAPTER 7 INSTRUCTION LEVEL EDITING

SoftPLC Corp., Inc. 28 July 20007-2

To use the Delete Instruction command, position the cursor on the instruction to be deleted andenter/select the command. The instruction is deleted, but any data table values or address labelsassociated with the instruction address(es) are not affected.

CHANGING AN INSTRUCTION

COMMAND: exchange InstructionHOTKEY: [Alt][X]MENU: Ladder ; Instruction Edits ; Change Instruction

The exchange Instruction command is used to change an existing instruction's parameters(addresses or data) and also to exchange one instruction with a different instruction altogether.

To use the command, position the cursor on the instruction to be changed and enter/select thecommand. The current mnemonic, address(es) and parameters for the instruction are displayed inthe command buffer on line 2.

Make the required changes to the mnemonic, address(es), and/or parameters. To save typing, youcan use any of the command buffer editing commands (Table 7-1), the Scroll Recall feature, andthe Instruction Entry Shortcuts described later in this chapter. Two of the most commonly usedediting commands are:

[Ctrl][BkSp] Erase the entire contents of the command buffer[Ctrl][Enter] Erase from the cursor location to the end of the command buffer

You can press [Esc] to abort your changes and retain the original instruction mnemonic andparameters.

INSERTING AN INSTRUCTION

COMMAND: Insert Instruction AfterHOTKEY: [Ins][6]MENU: Ladder ; Instruction Edits ; Right Insert

COMMAND: Insert Instruction BeforeHOTKEY: [Ins][7]MENU: Ladder ; Instruction Edits ; Left Insert

To use these commands, position the cursor and enter/select the command to insert an instructionin the desired direction. A command buffer is displayed on line 2 and you are prompted to enter theinstruction mnemonic, instruction address(es), and parameters.

After the instruction entry is complete, you are returned to operate mode unless you are on the firsthorizontal path of a new rung. In this case, you are prompted to enter another instruction. Press[Esc] to return to operate mode.

Page 58: Topdoc Manual

CHAPTER 7 INSTRUCTION LEVEL EDITING

Pub. No. TDZ-MN1 July 28, 20007-3

The following sections provide additional information and helpful hints on entering instructions,instruction parameters/data, branches, and more.

USING THE COMMAND BUFFER

Entry of instructions, addresses, and certain other information is made into a command buffer online 2. The command buffer is simply an area where you enter multiple responses, separated bycommas or spaces, into a horizontal group of fields.

+)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))),+)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))),**Enter Timer Address, Base, [Preset, Accum] ****>TON T4:0, 0.01, 120, 119 *** **T004:000 I:022 +) TON )))), *

/))]/[)))))] [)))))))))))))))))))))))))))))))))))))))))))))))))1 T004:000 /(EN)1* DN 10 * Base .01 * ** * PR 120 /(DN)** * AC 119 * ** .))))))))))- ** *

Figure 7-1Command Buffer Display Example

Line 1 contains a message describing what you are to enter in the current field(s). When youcomplete a response by filling the entire field, pressing [Enter] (which inserts a "," for you), or byentering a [,] or [ ], the cursor moves to the next field.

After you enter a response into the last field, your responses are processed and the instruction isinserted. If any responses are invalid, the cursor is positioned in the first invalid field, and amessage is displayed on line 1. You can correct the response(s) using any of the key sequenceslisted in Table 7-1.

Optional entries (such as Timer/Counter Presets and Accumulator values) are shown in the messageon line 1 enclosed in [ ]. Pressing [Enter] when only optional entries remain will accept the entireline, and enter the current data table values for the optional parameters.

NOTE: When entering instructions, use the addressingconventions per the Quick Reference Guide. In TOPDOC,you need to precede file addresses with a "#". When onlya file address can be used in the instruction, you need notenter it, but TOPDOC may insert it when the instruction isredisplayed.

Page 59: Topdoc Manual

CHAPTER 7 INSTRUCTION LEVEL EDITING

SoftPLC Corp., Inc. 28 July 20007-4

KEYS DESCRIPTION

MOVEMENT AND POSITIONING COMMANDS

[7]/[6] Move cursor left/right one space

[Home]/[End] Move cursor to beginning/end of buffer

[Ctrl][6] Move right one entry

[Ctrl][7] Move left one entry

EDITING COMMANDS

[8]/[9] Cycle through prior entries (see next section)

[Enter] Accept value of current entryAccept entire buffer if on last required field

[=] Initialize current address with value

[Ins] Toggle insert and overstrike (exchange) modes

[Del] Delete character under cursor

[BkSp] Delete character left of cursor & move left

[Ctrl][BkSp] Erase entire buffer

[Ctrl][Enter] Erase from cursor to end of buffer

[Esc] Abort changes and return to operate mode

Table 7-1Command Buffer Editing Commands

INSTRUCTION ENTRY SHORTCUTS

This section describes several additional features provided by TOPDOC (besides those listed inTable 7-1) that can help you save time and keystrokes when creating or editing your ladder program.

Scroll Recall Feature

When entering instructions and addresses in the command buffer, you can use the [8] and [9] keysto cycle through your last 14 entries. If the new entry you want to make is similar to a prior entry,press the arrow keys as necessary to redisplay the most similar prior entry. Then use any of thecommand buffer editing key sequences (Table 7-1) to make the changes.

The example in Table 7-2 illustrates the Scroll Recall feature. Try entering these keystrokes yourselfto see how it works.

Page 60: Topdoc Manual

CHAPTER 7 INSTRUCTION LEVEL EDITING

Pub. No. TDZ-MN1 July 28, 20007-5

WHAT WAS ENTERED BUFFER CONTENT DESCRIPTION

[Ins][9] Enters a new rung.

XIC,I11/6[Enter] XIC,I11/6 Enters XIC for I:011/06.

XIO,T4:5/DN[Enter] XIO,T4:5/DN Enters XIO for T4:005/DN

[8] XIO,T4:5/DN Displays prior entry

[8] XIC,I11/6 Displays prior entry.

[End][Bksp]10[Enter] XIC,I11/10 Goes to end of buffer, deletes bit 6, inserts XIC forI11/10.

[8] XIC,I11/10 Displays prior entry.

[8] XIO,T4:5/DN Displays prior entry.

TON[End][Bksp][Bksp][Bksp][,]1.0[Enter]

TON,T4:5,1.0 Changes XIO to TON, removes bit part of Timeraddress,enters Time base and thus TON for T4:5.

Table 7-2Example: Using Scroll Recall

No Leading Zeroes

When entering addresses, leading zeroes are not required. For example:

instead of I001:000/01, use I1:0/1instead of T004:003.ACC/05, use T4:3.ACC/5

No Shift Key

You can use ";" instead of ":" when entering addresses. For example:

Instead of I1:0/1, use I1;0/1Instead of T4:0.ACC/5, use T4;0.ACC/5

Set Data Table Values/Data Initialization

When entering instructions, you can also set data table values on the command buffer line using avariety of numbering systems. For example:

MOV N7:0=456, N7:1 (Sets value of N7:0 to 456 Integer)MOV N7:0=1CBH, N7:1 (Sets value of N7:0 to 1CB Hexadecimal)MOV N7:0=710O, N7:1 (Sets value of N7:0 to 7100 Octal)MOV N7:0=0000000111001000B, N7:1 (Sets value of N7:0 to 0000000111001000 Binary)

Page 61: Topdoc Manual

CHAPTER 7 INSTRUCTION LEVEL EDITING

SoftPLC Corp., Inc. 28 July 20007-6

BRANCHING

TOPDOC does not use branching instructions but instead uses a graphical free-form way of"branching around" instructions. This eliminates the need for you to know whether an "Input/Output"or "Start/Continue/End" Branch instruction is required - TOPDOC figures it out for you!

To use TOPDOC branching, you must insert the instructions you want to branch around on the rungbefore you can insert the branch itself.

HINT: If you need to insert a branch between the power bar andthe first instruction on a rung or to the left of an instruction,you must enter "Roaming Insert" mode which is describedlater in this chapter.

DELETING A BRANCH

COMMAND: Delete BranchHOTKEY: [Del][B]MENU: Ladder ; Instruction Edits ; Branch Delete

To delete a branch, position the cursor on the branch and enter/select the Delete Branch command.This deletes the branch and all instructions on that branch.

INSERTING A BRANCH

COMMAND: Insert BranchHOTKEY: [Ins][B]MENU: Ladder ; Instruction Edits ; Insert Branch

To insert a branch, position the cursor to the first instruction you want to branch around andenter/select the Insert Branch command.

This inserts a branch with a "flexible" right side. You can use [6] and [7] to increase/decrease thescope of the range of instructions enclosed by the branch. See Figure 7-2 for an example branchinsertion.

Pressing [Enter] inserts the branch and causes TOPDOC to prompt for entry of an instruction to beplaced on the branch. Pressing [Esc] will abort entry of the branch.

Once you have "set" the right edge of the branch by pressing [Enter], the branch cannot be movedor changed to encompass a different group of instructions. To modify a branch, you must changethe instructions or delete the branch and re-insert it.

*I:000 I:000 T4:000 T4:002 O:000 */)]/[))0)] [))0)]/[))))))]/[)))))))))))))))))))))))))))))))( )))1

* 00 * 01 * EN EN 00 *

Page 62: Topdoc Manual

CHAPTER 7 INSTRUCTION LEVEL EDITING

Pub. No. TDZ-MN1 July 28, 20007-7

* * * ** .))))))- *

(a) Result of entering/selecting "Insert Branch" Commandwhen cursor positioned on XIC I0/01

*I:000 I:000 T4:000 T4:002 O:000 */)]/[))0)] [))))]/[))0)))]/[)))))))))))))))))))))))))))))))( )))1

* 00 * 01 EN * EN 00 ** * * ** .)))))))))))))- *

(b) Result of Pressing [6]

Figure 7-2Inserting a Branch

ROAMING INSERT MODE

COMMAND: Roaming InsertHOTKEY: [Ins][Ins] (followed by [B] for branch or [I] for instruction)MENU: Ladder ; Instruction Edits ; Use Roaming Insert (followed by [B] for branch or

[I] for instruction)

In roaming insert mode you can enter instructions and branches in a unique manner. To enterroaming insert mode, enter/select the Roaming Insert command when you are on the horizontalcircuit path where the insertion is to be made.

This changes the instruction cursor into a tall narrow cursor which moves between instructions,rather than onto instructions as it does normally. Any insertions are now made at the location of thiscursor.

You can use [6] and [7] to move the cursor on the current horizontal circuit path. Vertical movementis not allowed. [Esc] takes you out of roaming insert and back to operate mode.

Inserting Instructions: Once you are in roaming insert mode you can insert instructions bypressing [Enter] or [I]. The instruction is inserted at the cursor location and you can proceed withnormal instruction entry.

Inserting Branches: You can insert branches by pressing [B], which inserts a branch with a flexibleright edge, just as if you had selected the Insert Branch command described in the prior section.

Figure 7-3 illustrates how to use Roaming Insert Mode to insert a branch.

Page 63: Topdoc Manual

CHAPTER 7 INSTRUCTION LEVEL EDITING

SoftPLC Corp., Inc. 28 July 20007-8

*I:000 " I:000 T4:000 T4:002 O:000 */)]/[)))"))] [))))]/[))))]/[)))))))))))))))))))))))))))))))( )))1

* 00 " 01 EN EN 00 *

(a) Result of entering/selecting Roaming Insert Commandwhen cursor positioned on XIC I0/1

*I:000 I:000 " T4:000 T4:002 O:000 */)]/[))))] [)))"))]/[))))]/[)))))))))))))))))))))))))))))))( )))1

* 00 01 " EN EN 00 *

(b) Result of Pressing [6]

*I:000 I:000 T4:000 T4:002 O:000 */)]/[))))] [))0)]/[))0)]/[)))))))))))))))))))))))))))))))))( )))1

* 00 01 * EN * EN 00 ** * * ** .))))))- *

(c) Result of Pressing [B]

Figure 7-3Roaming Insert Mode

Page 64: Topdoc Manual

Pub. No. TDZ-MN1 July 28, 20008-1

CHAPTER 8

RUNG LEVEL EDITING

This chapter describes single rung editing, including Inserting a Rung and Deleting a Rung, as wellas multi-rung editing (block range copy/move/delete).

INSERTING A RUNG

COMMAND: Insert Rung AfterHOTKEY: [Ins][9] or [Enter]MENU: Ladder ; Rung Edits ; Insert Below

COMMAND: Insert Rung BeforeHOTKEY: [Ins][8]MENU: Ladder ; Rung Edits ; Add Above

To use these commands, position the cursor and enter the command to insert a rung in the desireddirection. You are placed into insert mode and a blank rung is displayed. You can now insert theinstructions.

TOPDOC continues to prompt for entry of instructions on the current horizontal path until you enteran output instruction. To enter additional instructions or branches, you will need to use theInstruction Entry commands (Chapter 7). To enter branches, you MUST enter the instruction(s) youwant to branch around before you can enter the branch.

After you have completed entry of the rung, you must assemble it by pressing [F9]. To abort anddelete an unfinished rung, press [Esc].

HINT: Offline, or online in program mode, you can also assemblerungs by either moving the cursor off the rung with any ofthe positioning commands or entering another Insert Rungcommand.

DELETING A RUNG

COMMAND: Delete RungHOTKEY: [Del][R]MENU: Ladder ; Rung Edits ; Delete Rung

To delete a rung, you use the Delete Rung command. Simply position the cursor on the rung to bedeleted and enter/select the command.

Page 65: Topdoc Manual

CHAPTER 8 RUNG LEVEL EDITING

SoftPLC Corp., Inc. 28 July 20008-2

If the rung has a comment associated with it the comment is also deleted. Data table values andaddress labels referenced by instructions in the rung are not affected.

THE RANGE EDITING COMMANDS

The Range Editing commands give you access to the cut & paste features of the Editor. A rangecan be a single rung or a group of contiguous rungs within a program. You can select a range ofrungs and delete, move, or copy them into the same file.

NOTE: You can also move and copy rungs to any other programloaded into memory using the offline multi-file editingcapability (Chapter 11) with the same commandsdescribed below.

MARKING A RANGE OF RUNGS

COMMAND: Range MarkHOTKEY: [Alt][K]MENU: Ladder ; Rung Edits ; Range Edits ; Range Mark

You mark a range with the Range mark command. First, enter/select the Range mark commandwhen the cursor is located on the first rung of the desired set of rungs.

Next, using the cursor positioning commands (Chapter 6), move the cursor to the last rung of thedesired set and use the mark command again to define the range end. The rungs in the range areshown in a different color, based on the Color Configuration.

NOTE: If the range consists of a single rung, you only need to usethe mark command once, not twice.

You can mark a range in either direction - up or down from the current rung. However, END OFPROGRAM statements cannot be part of a marked range.

You can define only one range at a time. To define a new range, you need to Unmark the previouslydefined range.

COPYING A RANGE OF RUNGS

COMMAND: Copy RangeHOTKEY: [Alt][C]MENU: Ladder ; Rung Edits ; Range Edits ; Copy Range

By using the range Copy command, you can create a duplicate set of rungs. The rungs are placedabove the rung where the cursor is positioned when you enter the Copy command.

Page 66: Topdoc Manual

CHAPTER 8 RUNG LEVEL EDITING

Pub. No. TDZ-MN1 July 28, 20008-3

To use the Copy command, define the range to be copied with the mark command, move the cursorto the rung after the desired location of the identical rungs, and enter the command. The Copycommand copies both the ladder rungs and their associated comments.

You can copy the same set of rungs again without having to remark since the range is still markedafter a Copy command is executed.

DELETING A RANGE OF RUNGS

COMMAND: Delete RangeHOTKEY: [Del][K]MENU: Ladder ; Rung Edits ; Range Edits ; Delete Range

You can remove a marked range of rungs using the Delete range command. Mark the range andenter the command. All the rungs in the range are removed from the program. The cursor does nothave to be located within the range to use this command, you can be on any rung in the program.

If any rungs in the range have comments associated with them, the comments are also deleted.Data table values and address labels are not affected.

MOVING A RANGE OF RUNGS

COMMAND: Move RangeHOTKEY: [Alt][M]MENU: Ladder ; Rung Edits ; Range Edits ; Move Range

With the Move Range command, you can physically Move a range of rungs from their old locationto a new location. The rungs are placed above the rung where the cursor is positioned when youenter the command.

To use the Move command, define the range to be moved, position the cursor to the rung after thedesired new location, and enter the command.

If any rungs in the range have comments associated with them, the comments are also moved.

UN-MARKING A RANGE OF RUNGS

COMMAND: Unmark RangeHOTKEY: [Alt][U]MENU: Ladder ; Rung Edits ; Range Edits ; Unmark Range

You must Unmark a defined range before you can mark another range of rungs. To do this, you usethe Unmark command. You can unmark a range at any time, from any position in the program.

Page 67: Topdoc Manual

Pub. No. TDZ-MN1 July 28, 20009-1

CHAPTER 9

PROGRAM FILE EDITING (SUBROUTINES)

This chapter describes Program File (Subroutine) level editing, including how to insert a newSubroutine Program and delete an existing Subroutine Program.

INSERTING A SUBROUTINE FILE

COMMAND: Insert FileHOTKEY: [Ins][F]MENU: Ladder ; Subroutine Edits ; Insert Subroutine/File

To insert a new program file (subroutine) into a program, position the cursor on the END OFPROGRAM statement for the subroutine prior to where you want to insert the new subroutine.

Then enter/select the Insert File command. This will insert another END OF PROGRAM statement.The program ID number is one greater than the previous one, and all rungs below this newsubroutine will be re-numbered.

You can then insert rungs into the new subroutine program.

DELETING A SUBROUTINE FILE

COMMAND: Delete FileHOTKEY: [Del][F]MENU: Ladder ; Subroutine Edits ; Delete Subroutine/File

To delete a subroutine file, you must first delete all the rungs in that subroutine. Then simply placethe cursor on the last rung of the program to be deleted (the END OF PROGRAM statement andenter/select the Delete File command.

HINT: You can quickly delete all the rungs in a subroutine bymarking them (with the mark command) and then usingthe delete range command. (See Chapter 8.)

Page 68: Topdoc Manual

Pub. No. TDZ-MN1 July 28, 200010-1

CHAPTER 10

ONLINE OPTION

With the Online option on the TOPDOC main menu, not only can you edit the ladder diagram,documentation and data table values, but you can also change the status of bits, force I/O bits ONand OFF, perform contact histograms and change the operating mode of the PLC. This chapterdescribes these latter Online Only functions in detail.

WARNING: Online operations are potentially dangerous. It's importantthat you heed all warnings in this Chapter before usingTOPDOC to perform online operations!

When you select Online from the main menu, the Online menu is displayed with these options:

Ladder Select to access the Online Ladder editor for programmonitoring/editing/etc.

Setup Accesses the O@N@E Communications Driver configuration program.

Quit Returns to main menu.

ONLINE OPTION

After you select any of the Online options, you will be prompted for the O@N@E Channel and PLCStation number. Enter these, and providing communications are OK, you can begin the selectedfunction.

The first time you enter the Channel/Station either from the online or menu options, these valueswill be saved in a file called DH.CFG. This file is created in the subdirectory you specified forconfiguration data when you installed TOPDOC (default is \TDZ). This file is used to display defaultChannel/Station values from then on until you change them.

ONLINE PROGRAM EDITING CONSIDERATIONS

WARNING: If it is necessary to make program changes while the PLCis in the remote run mode, be sure that the consequencesof the changes are thoroughly understood beforehand. Ifnot, unpredictable and/or hazardous machine operationcould occur. Damage to equipment and/or injury topersonnel could result.

Page 69: Topdoc Manual

CHAPTER 10 ONLINE OPTION

SoftPLC Corp., Inc. 28 July 200010-2

There are some functional limitations when Online, based on the PLC operating mode:

PLC MODE FUNCTIONAL LIMITATION

PROGRAM or REM PROG No forcing

TEST or REM TEST Cannot change Data Table size. No downloading (changes PLC toremote program mode)

RUN No mode changes No forcing No online programming No downloading Cannot change Data Table size No data change allowed

REMOTE RUN No downloading (changes PLC to remote program mode) Cannotchange Data Table size

Table 10-1PLC Mode Limitations

SAVING PROGRAM AND DOCUMENTATION CHANGES

When Online, the program information source is the PLC. All documentation (labels, rungcomments, and cross reference) is resident only on disk. When program changes are made, youmust assemble the rung (to verify the changes) before TOPDOC sends them to the PLC.

HINT: If you change the program logic, in order to update yourdisk based copy of the program, an Upload must beperformed to save the new information. This is animportant step to ensure you have a backup of the PLCprogram in the event of PLC hardware problems.

CAUTION: If you add/delete rungs while online, you should upload theprogram to disk. Otherwise, the comments may not beable to match up with the ladder if you try to do offlineprogramming or print reports. If this happens, refer toChapter 27 for details on the comment re-synchronizationprocess and CMT5.EXE utility program.

ONLINE LADDER EDITOR

Online, some display functions make it easy for you to monitor and troubleshoot your PLC system.Instructions which are "true" are shown in a different color than "false" instructions. The colors useddepend on the color configuration you are using (Chapter 2). When the PLC is running, the powerbars also display in the "true" color.

Page 70: Topdoc Manual

CHAPTER 10 ONLINE OPTION

Pub. No. TDZ-MN1 July 28, 200010-3

Line 1 of the screen displays the PLC operating mode, a Forces Enabled/Disabled message,whether there are forces or not, the current rung number and the press [F10] for menu displayreminder (Figure 10-1(a)).

+)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))),+)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))),** Mode:Rem/Run Forces:ENABLED Edits:Testing AAF10=Menu P2/99 **** \TDZ\SPLC **

Figure 10-1(a)Online SoftPLC Status Line Display

SPECIAL ONLINE COMMANDS

Table 10-2 lists the special Online Ladder Editor commands. These are described in detail in thischapter.

KEYS MENU OPTION Online , then DESCRIPTION

[F2] PLC Mode Change Change PLC operating mode

[F2] Test Edits Toggle Test Edits Toggle

[Alt][H] Contact Histogram Contact Histogram

[+] Set a Bit (on) Turn ON the bit corresponding to the current EXAMINEON/OFF instruction

[-] Reset a Bit (off) Turn OFF the bit corresponding to the current EXAMINEON/OFF instruction

[Alt][T] Forces ; Force Table Force Table

[Ins][+] Forces ; Insert Force ON Force ON the bit corresponding to the current bitinstruction

[Ins][-] Forces ; Set Force OFF Force OFF the bit corresponding to the current bitinstruction

[Del][+] Forces ; Delete Force ON Remove Force ON

[Del][-] Forces ; Remove Force OFF Remove Force OFF

Table 10-2Online Commands

CHANGING THE PLC OPERATING MODE

COMMAND: PLC Mode ChangeHOTKEY: [F2]MENU: Online ; PLC Mode Change

Page 71: Topdoc Manual

CHAPTER 10 ONLINE OPTION

SoftPLC Corp., Inc. 28 July 200010-4

You can change the operating mode of the PLC processor with the mode change command. Thiscommand can be used only if the PLC keyswitch is in the REMOTE position (for SoftPLC’s withhardware keyswitches).

When you enter/select the PLC Mode Change command, a menu window with options Program, Run, Test is displayed. Pressing [Esc] returns you to the Ladder Display. Figures 10-2 illustratethe Mode Change window.

Change PLC Mode

Program Run Test Quit

Select Program Mode

Current Mode:Rem/Run Forces:ENABLED

Figure 10-2(a)PLC Mode Change Window

To change the mode, select the option corresponding to the desired mode of operation. After themode is changed, use [Esc] to return to the ladder display.

CHANGING BIT STATUS

There are two ways to change the bit status when online. You can do this from the Ladder or theData Table Editor. This section describes the commands used to change bit status.

This function changes the value of the bit in the data table from 1 to 0 (or vice versa). It does NOTact like a force. Therefore, if you try to change the status of a bit in the I/O image tables the I/Oscan could override your change. The program could override any change, or it might not. Both arepotentially hazardous as there is no indication that the bit status has been changed, as there is whena force is used.

WARNING: If it is necessary to change the status of a bit, be sure thatthe consequences of the change are thoroughlyunderstood beforehand. If not, unpredictable and/orhazardous machine operation could occur directly orindirectly as a result of changing the bit status. Damageto equipment and/or injury to personnel could result.

CHANGING BIT STATUS FROM THE LADDER

COMMAND: Set a Bit (on)HOTKEY: [+]MENU: Online ; Set a Bit (on)

COMMAND: Reset a Bit (off)HOTKEY: [-]

Page 72: Topdoc Manual

CHAPTER 10 ONLINE OPTION

Pub. No. TDZ-MN1 July 28, 200010-5

MENU: Online ; Reset a Bit (off)

You can change the ON/OFF status of any bit referenced by an examine closed (XIC) or examineopen (XIO) instruction in any PLC operating mode other than Run Mode.

Position the cursor on an XIC or XIO instruction. If the bit is ON, press [-] to turn it OFF. If the bitis OFF, press [+] to turn it ON.

CHANGING BIT STATUS FROM THE DATA TABLE

Within the Data Table Editor, you can change bit values. The Data Table editor is described indetail in Chapter 12. If you are in a Binary Format display, you are in "Bit Manipulation" and the onlyvalid values are 0 (off) and 1 (on).

CAUTION: If input image table bits are forced, the value shown in theData Table Editor reflects the forced condition. If outputimage table bits are forced, the value in the Data TableEditor reflects the actual logic state as determined by thespecific rung controlling the output image table bit.

CHANGING DATA VALUES

There are two ways to change data values; from the Ladder display and from the Data Table. Thissection describes these functions.

WARNING: If it is necessary to change a word value (which in turnchanges the status of the bits in the word), be sure that theconsequences of the change are thoroughly understoodbeforehand. If not, unpredictable and/or hazardousmachine operation could occur directly or indirectly as aresult of the change. Damage to equipment and/or injuryto personnel could result.

WARNING: When the address of an instruction whose data is to bechanged duplicates the address of other instructions in theprogram, the consequences of changing the data for eachinstruction should be thoroughly explored beforehand.You can use the On-screen Cross Reference displayfunction to do this easily, Chapter 13.

Page 73: Topdoc Manual

CHAPTER 10 ONLINE OPTION

SoftPLC Corp., Inc. 28 July 200010-6

CHANGING DATA VALUES FROM THE LADDER

In all PLC operating modes other than Run Mode, you can change the data associated withinstructions that use data table values, like timers and counters or instructions that have specialdisplays such as PID and MSG.

You use the Insert Data command to change the data associated with an instruction. Refer toChapter 7 for more information on the Insert Data command.

CHANGING DATA VALUES FROM THE DATA TABLE

In the Data Table Editor you can change word values. Each of the Data Table Editor options aredescribed in detail in Chapter 12.

CAUTION: If input image table bits are forced, the value shown in theData Table Editor reflects the forced condition. If outputimage table bits are forced, the value in the Data TableEditor reflects the actual logic state as determined by thespecific rung controlling the output image table bit.

FORCING

There are two ways to Force in TOPDOC -- from the Force Table or from the ladder diagram.Forcing changes the status of real I/O independent of the program scan. Regardless of where theforces are initiated, they must be Enabled from the Force Table.

NOTE: You can also use the Force Table offline to pre-set forcesfor downloading to the PLC. The Force Table is preservedon upload/download.

WARNING: When an energized output is being forced off, keeppersonnel away from the machine area. Accidentalremoval of force functions could cause damage toequipment and/or injury to personnel.

WARNING: Disconnecting the computer from the PLC while forces areenabled is a potential hazard as there is no way ofknowing what has been forced ON or OFF withoutTOPDOC's force displays.

FORCED I/O LADDER DISPLAY

In the Ladder Editor display, the current status of forces is displayed on line 1 (Enabled/Disabled)as well as whether any forces exist. Bit instructions whose addresses are forced display the forced

Page 74: Topdoc Manual

CHAPTER 10 ONLINE OPTION

Pub. No. TDZ-MN1 July 28, 200010-7

state (ON or OFF) below the instruction in the ladder display. Figure 10-3 is an example of theLadder display with forces.

64444444444444444444444444444444444444444444444444444444444444444444444444475 Mode:Run Forces:ENABLED F10=Menu Rung:PO/2 5

5 C:\TDZ\SPLC\DEMO 5K))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))M

5 *I:110 +) TON )), 55 /)] [))))))))))))))))))))))))))))))))))))))))))))))))))))1T4:0 /(EN)1 5

5 *ON 10 *Base 1.0* 17 * 55 * *PR 011/(DN)1 55 * *AC 011* 15 * 55 * .))))))))- * 5

Figure 10-3Ladder Editor Force Display

FORCING FROM THE LADDER DISPLAY

Table 10-3 lists the commands used for forcing functions. To use the commands, position thepointer on any bit instruction with the address to be forced and enter the command key sequence.These are the same commands you use when in the Force Table.

NOTE: You must Activate forces from the Force Table beforeyou can force I/O from the ladder display.

HOTKEY MENU OPTIONS/DESCRIPTION

[Ins] [+] Online ; Forces ; Insert Force On

[Ins] [-] Online ; Forces ; Set Force Off

[Del] [+] Online ; Forces ; Delete Force On

[Del] [-] Online ; Forces ; Remove Force Off

[Alt] [T] Online ; Forces ; Force Table

Table 10-3Ladder Editor Forcing Commands

Page 75: Topdoc Manual

CHAPTER 10 ONLINE OPTION

SoftPLC Corp., Inc. 28 July 200010-8

FORCE TABLE

COMMAND: Force TableHOTKEY: [Alt][T]MENU: Online ; Forces ; Force Table

The Force Table allows you to view and change the forces in a tabular fashion. Entering/selectingthe Force Table command brings up the Force Table Editor display (see Figure 10-4).

The Force Table menu includes the options Edit , Activate , Disable , Remove All , PartialRemove and Quit . Quit or [Esc] return you to the ladder display. The other options aredescribed in this section.

FORCE TABLE

<INS><+>:Force on <INS><->:Force off

<DEL><+>:Remove force on <DEL><->:Remove force off

OUTPUT FORCES: 5 INPUT FORCES: 6 I/O DESCRIPTION

O:010 @@@@@9@@ @@@@@@@@ I:010 @@@@@@@@ @@@@@@@@ I:013/17

O:011 @@@@@@@@ @@@@@@@@ I:011 @@@@@@@@ @@@@@@@@ MAIN STARTER

O:012 @@@@@@@@ @@@@@@@@ I:012 @@@@@8@@ @@@@@@@@ IF THIS IS ON

O:013 @@@@@@@@ @@@@@@@@ I:013 8@@@@@@@ @@@@@9@@ THE PROCESS

O:014 @@@@@@@@ @@@@@@@@ I:014 @@@@@@@@ @@@8@@@@ IS RUNNING

O:015 @@@@@8@@ @@@@@@@@ I:015 @@@@@@@@ @@@@@@@@

O:016 @@@@@@@@ @@@@@@@@ I:016 @@@@@@@@ @@@@@@@@

O:017 @@@@@@@@ @@@@@@@@ I:017 @@@@@@@@ @@@@@@@@

Figure 10-4Force Table

To move around the Force Table or insert/remove individual forces, you must select the Editoption.

The Data Table Editor also has a force table display/editor from within the I/O image tables. Referto Chapter 12 for more information on this feature.

READING THE FORCE TABLE DISPLAY

Refer to Figure 10-4. The Force Table displays a block of 16 I/O words per page. Each "."character represents one bit for the word address to the left, with bit 00 to the far right and bit 17 tothe far left.

A "8" is used to show that a bit is forced ON. A "9" is used to show that a bit is forced OFF.

Page 76: Topdoc Manual

CHAPTER 10 ONLINE OPTION

Pub. No. TDZ-MN1 July 28, 200010-9

The bit address at the current cursor location, and its label (if one exists), will be displayed in the I/ODescription window on the right side of the display. This is useful to ensure you are positioned inthe correct location before you force a bit ON/OFF or remove a force.

THE EDIT OPTION

Select the Edit option to change or view the Force Table. Pressing [Esc] returns you to the ForceTable Menu.

While you are in edit mode, you can move around the Force Table and force I/O bits.

Moving Around the Force Table

The positioning commands available in the Force Table are listed in Table 10-4.

KEYS DESCRIPTION

[6]/[7] move right/left one bit

[9]/[8] go to next/prior word in data table

[Home] go to bit 00 in current word

[End] go to bit 17 in current word

[Ctrl][Home] display word I:000

[Ctrl][End] display highest address word in data table

[Alt][P] go to specified word, bit 00

Table 10-4Force Table Positioning Commands

Page 77: Topdoc Manual

CHAPTER 10 ONLINE OPTION

SoftPLC Corp., Inc. 28 July 200010-10

Forcing

Table 10-5 lists the forcing commands. These are the same commands you can use to force I/Ofrom the ladder display.

KEYS DESCRIPTION

[Ins][+] Insert a "force on"

[Ins][-] Insert a "force off"

[Del][+] Remove a "force on"

[Del][-] Remove a "force off"

Table 10-5Force Table Forcing Commands

THE ACTIVATE AND DISABLE OPTIONS

Although Forces are set either from the Ladder Display or the Force Table, they are not active untilyou enable them from the Force Table Menu. To do this, select the Activate option. This willenable all of the forces.

NOTE: You cannot Activate forces unless at least 1 force exists.

Use the Disable option in the Force Table Menu to Disable all forces. The Force Table remainsunchanged but the Forces are not activated.

REMOVE ALL OPTION

The Remove All option allows you to remove all forces as a group.

WARNING: As a safety measure, you should Disable forces beforeremoving them. This will allow you to see programoperation without forces, yet still be able to quickly re-enable the forces if necessary without having toindividually set them again.

Page 78: Topdoc Manual

CHAPTER 10 ONLINE OPTION

Pub. No. TDZ-MN1 July 28, 200010-11

PARTIAL REMOVE OPTION

The Partial Remove option is used to remove groups of forces by type. When you select PartialRemove , a menu appears. Each option corresponds to the group of forces you can remove bytype. These are:

ON Inputs Removes all input bit ON forces.

OFF Inputs Removes all input bit OFF forces.

ON Outputs Removes all output bit ON forces.

OFF Outputs Removes all output bit OFF forces.

CONTACT HISTOGRAM

COMMAND: Contact HistogramHOTKEY: [Alt][H]MENU: Online ; Contact Histogram

With the Contact Histogram feature, you can monitor a history of data table values. You will findthis feature extremely valuable for troubleshooting. Online, you can monitor, print, and save thehistory of a single bit or any combination of up to 16 bits in a word. Offline, you can view and printa previously saved histogram.

Sample Histogram displays are shown in Figures 10-5. The top of the display shows the addressesbeing monitored, and status information about the Histogram function. In the data section, column1 contains the elapsed time from when the histogram started, column 2 shows the time betweenstate changes, and the remaining columns show the bit status/word value changes for each entry.

Page 79: Topdoc Manual

CHAPTER 10 ONLINE OPTION

SoftPLC Corp., Inc. 28 July 200010-12

64444444444444444444444444444444444HISTOGRAM4444444444444444444444444444444444475 Monitor Load Output Format Browse Quit 55 Monitor changing bit values 5

5))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))55 Bit Address: T004:000.ACC/00 55 Output: Console 55 Started on: 1/5/92 at 10:25:46 a.m. Status: Running 5

5))))))))))))))))0))))))))))))))))0))))))))))))))))))))))))))))))))))))))))))))55 ELAPSED TIME * DELTA TIME * BIT VALUE 5

5))))))))))))))))3))))))))))))))))3))))))))))))))))))))))))))))))))))))))))))))55 00:00:00.00 * 00:00:00.00 * OFF 55 00:00:00.98 * 00:00:00.98 * ON 55 00:00:01.98 * 00:00:01.00 * OFF 55 00:00:02.97 * 00:00:00.99 * ON 55 00:00:03.96 * 00:00:00.99 * OFF 55 00:00:04.98 * 00:00:01.02 * ON 55 * * 5

Figure 10-5(a)Sample Bit Histogram Display

64444444444444444444444444444444444HISTOGRAM4444444444444444444444444444444444475Monitor Load Output Format Browse Quit 55Start monitoring transitions of one or more bits 5

5))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))55 Word Address: T004:000.ACC Mask: 11111111 00011111 55 Output: Console 55 Started on: 1/5/92 at 10:26:26 a.m. Status: Running 5

5))))))))))))))))0))))))))))))))))0))))))))))))))))))))))))))))))))))))))))))))55 ELAPSED TIME * DELTA TIME * BIT VALUE 5

5))))))))))))))))3))))))))))))))))3))))))))))))))))))))))))))))))))))))))))))))55 00:00:01.38 * 00:00:01.00 * 00000000 ...11001 55 00:00:02.38 * 00:00:01.00 * 00000000 ...11010 55 00:00:03.38 * 00:00:01.00 * 00000000 ...11011 55 00:00:04.38 * 00:00:01.00 * 00000000 ...11100 55 00:00:05.38 * 00:00:01.00 * 00000000 ...11101 55 * * 5

Figure 10-5(b)Sample Word Histogram Display

(Binary Display with Mask)

When you activate the Contact Histogram function, a menu appears. Each option is described inthis section. To reduce the number of keystrokes and offer you maximum flexibility, some of theTOPDOC Contact Histogram menus can be accessed from multiple points. As always, the Quitoption allows you exit the histogram function and return to the ladder editor.

Page 80: Topdoc Manual

CHAPTER 10 ONLINE OPTION

Pub. No. TDZ-MN1 July 28, 200010-13

64444444444444444444444444444444444HISTOGRAM4444444444444444444444444444444444475Monitor Load Output Format Browse Quit 55Start monitoring transitions of one or more bits 5

5))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))55 Word Address: T004:000.ACC Mask: 11111111 11111111 55 Output: Console 55 Started on: 1/7/90 at 09:44:46 a.m. Status: Running 5

5))))))))))))))))0))))))))))))))))0))))))))))))))))))))))))))))))))))))))))))))55 ELAPSED TIME * DELTA TIME * HEX OCTAL DECIMAL 5

5))))))))))))))))3))))))))))))))))3))))))))))))))))))))))))))))))))))))))))))))55 00:00:00.00 * 00:00:00.00 * 0033 000063 51 55 00:00:00.30 * 00:00:00.30 * 0034 000064 52 55 00:00:01.29 * 00:00:00.99 * 0035 000065 53 55 00:00:02.30 * 00:00:01.01 * 0036 000066 54 55 00:00:03.30 * 00:00:01.00 * 0037 000067 55 55 00:00:04.29 * 00:00:00.99 * 0038 000070 56 55 * * 5

Figure 10-5(c)Sample Word Histogram Display

(Hex, Octal, Decimal Display)

MONITOR OPTION

Select the Monitor option to specify the values you want to track and to start the histogram. Whenyou select Monitor, you will be prompted to select one of two options; Bit or Word.

@ If Bit is selected, you will be prompted to enter a bit address.

@ If Word is selected, you will be prompted to enter a word address and a mask.

A "mask" is a filter. By using a mask, you can select to see changes to only some of the bits ina word. A mask value of "1" means you DO want to monitor changes, while a mask value of "0"means you DO NOT. Refer to Figure 10-5(b) for an example mask and histogram result.

In binary display format, the masked bits are displayed as (.) dots. If you are in hex, octal, ordecimal display format, masked bits are treated as "0" value and the displayed value iscalculated from the binary equivalent. Most times you would want a mask of all "1"s, except incases such as an I/O word or a timer/counter control word where you may want to mask outcertain bits.

After you enter the desired address (and mask), TOPDOC displays the Output Options Menu. Theseoptions are described in the "OUTPUT OPTION" section below.

Once the output selection has been made, the Histogram Menu will be displayed on the screen andthe histogram function will commence. The Histogram menu options are described in the followingsections.

Page 81: Topdoc Manual

CHAPTER 10 ONLINE OPTION

SoftPLC Corp., Inc. 28 July 200010-14

OUTPUT OPTION

The Output option allows you to select, or change the previously selected, destination for thehistogram. This menu includes the Console , File and console , and the Printer and consoleoptions.

THE CONSOLE OPTION

The Console option displays the histogram information on the screen only. The data is not saved,only displayed.

NOTE: If the File and console or Printer and console optionswere previously selected, selecting Console will stopTOPDOC from sending the data to the file or printer.

THE FILE AND CONSOLE OPTION

The File and console option displays the data on the screen and simultaneously saves the datato a <FILE>.HST. All the data currently in the computer memory buffer, along with any further datagathered, will be saved until you stop the histogram or change the Output destination.

When you select File and console , you will be asked to enter a filename in which to store thehistogram on disk. This is an ASCII file that you can later view or print using any text editor.

THE PRINTER AND CONSOLE OPTION

The Printer and console option displays the data on the screen and simultaneously prints anydata currently in the computer memory buffer along with any further data gathered until you stop thehistogram or change the Output destination.

NOTE: Before selecting the Printer and Console option, besure your printer configuration is set up correctly.

If the printer cannot keep up with the data being gathered, the histogram may stop because of anoverflow. An alternative is to run the histogram to the Console alone until you see the desireddata appearing. At that point, you could use the Output option to select to begin printing andviewing instead of just viewing. You could also send the output to a file and then later print the file(see above section).

BROWSE OPTION

If you want to look through the data already collected while the histogram is in progress, selectBrowse from the menu. This option will stop the action on the screen. At this point you can useany of the commands in Table 10-6 to scroll through the contents of the data buffer.

Page 82: Topdoc Manual

CHAPTER 10 ONLINE OPTION

Pub. No. TDZ-MN1 July 28, 200010-15

Although the screen update is stopped, the histogram data will continue to be gathered. To returnto the live display mode, press [Esc].

KEYS DESCRIPTION

[8]/[9] View prior/next line of data

[Home]/[End] Go to beginning/end of data buffer

[PgUp]/[PgDn] Go up/down one page of data display

[Esc] Return to live data display mode

Table 10-6Browse Mode Positioning Commands

HINT: If the data is changing extremely quickly and/or you havea slow computer, the data buffer may get full duringBrowse . If this occurs, you will receive status messages.If you do not want to lose the new incoming data, press[Esc] to return to live display mode and let the computercatch up.

FORMAT OPTION

The Format option does not apply to Bit Addresses. Word data can be viewed in two differentmodes. With the Format option, you can toggle between Binary (Figure 10-5(b)) display or acombination display of Hex, Octal, and Decimal (Figure 10-5(c)). All data can be viewed in eithermode regardless of the mode setting when it was gathered.

LOAD OPTION

With the Load option, you can view a histogram file that has been previously saved. When youselect Load, you will be prompted to enter the histogram filename.

Once you enter the filename, it will be loaded, along with the information regarding the date and timeit was started. You will be automatically put in the Browse mode and can use any of the positioningcommands to view the histogram data. Press [Esc] to bring up the Histogram menu, which will allowyou to change the display format, etc.

NOTE: If you were monitoring another histogram, it will beterminated when you Load a previously saved histogramfile.

Page 83: Topdoc Manual

CHAPTER 10 ONLINE OPTION

SoftPLC Corp., Inc. 28 July 200010-16

PRINT OPTION

Printing a histogram report can be achieved with the Print option. The report indicates if it wasprinted Online or Offline. Refer to Figure 10-6.

The report format is very similar to the histogram screen display, which includes the elapsed time,time between status changes, and the data table values. Word values print in all formats - Binary,Hex, Octal, and Decimal.

VIEW HISTOGRAM

Once a histogram file has been created and saved to disk Online, it can be viewed Offline.

To view a histogram file, select the Utilities option from the TOPDOC Main Menu. Next selectView Histogram from the Utility Manager Menu, and enter/select the histogram filename. Thehistogram file will be loaded to the screen. From this point forward, the View Histogram optionperforms the exact same functions as the Load option performs Online. Refer to the section aboveon the Load option for more information.

Page 84: Topdoc Manual

CHAPTER 10 ONLINE OPTION

Pub. No. TDZ-MN1 July 28, 200010-17

TOPDOC for SoftPLC by SoftPLC Corp. 4.4

source : \TDZ\SPLC\UPLD2 page 1address: T004:140.ACCmask : 11111111 11111111started: 3/9/99 at 03:40:15 p.m.

HISTOGRAM---------

ELAPSED TIME DELTA TIME BIT VALUE HEX OCTAL DECIMAL------------ ------------ -------------------------------- --------- ------------ --------00:00:00.09 00:00:00.00 00000000 00101000 0028 000050 4000:00:00.78 00:00:00.69 00000000 00101001 0029 000051 4100:00:01.77 00:00:00.99 00000000 00101010 002A 000052 4200:00:02.76 00:00:00.99 00000000 00101011 002B 000053 4300:00:03.80 00:00:01.04 00000000 00101100 002C 000054 4400:00:04.79 00:00:00.99 00000000 00101101 002D 000055 4500:00:04.89 00:00:00.10 00000000 00000000 0000 000000 000:00:05.84 00:00:00.95 00000000 00000001 0001 000001 100:00:06.88 00:00:01.04 00000000 00000010 0002 000002 200:00:07.87 00:00:00.99 00000000 00000011 0003 000003 300:00:08.86 00:00:00.99 00000000 00000100 0004 000004 400:00:09.90 00:00:01.04 00000000 00000101 0005 000005 500:00:10.89 00:00:00.99 00000000 00000110 0006 000006 600:00:11.88 00:00:00.99 00000000 00000111 0007 000007 700:00:12.86 00:00:00.98 00000000 00001000 0008 000010 800:00:13.91 00:00:01.05 00000000 00001001 0009 000011 900:00:14.90 00:00:00.99 00000000 00001010 000A 000012 1000:00:15.84 00:00:00.94 00000000 00001011 000B 000013 1100:00:16.88 00:00:01.04 00000000 00001100 000C 000014 1200:00:17.86 00:00:00.98 00000000 00001101 000D 000015 1300:00:18.85 00:00:00.99 00000000 00001110 000E 000016 1400:00:19.84 00:00:00.99 00000000 00001111 000F 000017 1500:00:20.88 00:00:01.04 00000000 00010000 0010 000020 16

Figure 10-6Sample Histogram Report

Page 85: Topdoc Manual

Pub. No. TDZ-MN1 July 28, 200011-1

CHAPTER 11

OFFLINE EDITING

The TOPDOC Offline Editor is accessed from the Main Menu Edit option. All other chapters(except Chapter 10) described information common to both Offline and Online editing. This chapterpertains to features available ONLY with the Offline Editor.

Offline editing allows you to create and document PLC programs without needing the PLCequipment. You can then download completed programs to the PLC.

With the Offline Editor's multi-file editing and other powerful capabilities (such as global search &replace), you can quickly develop new programs complete with documentation and combine sectionsof other existing programs together to create new programs.

When you select Edit from the main menu, the Offline Editor menu appears.

@ The File option is used for file handling and configuration. Each option is described in thischapter.

@ The Dbase option is used for editing the address label database. This option is described inChapter 16.

@ The Ladder option loads the Offline Ladder Editor. Most Ladder Editor functions are describedelsewhere in this manual, but the Offline specific commands are described in this Chapter.These include file handling commands (Save/Write, Verify, rename), the Interchange command(global search & replace), and multi-file editing.

@ The SoftWIRES option describes PLC simulation functions and is described in Part VII. PartVII of the manual also describes the Emulation commands available within the offline LadderEditor.

THE LADDER OPTION

You use the Ladder option to maintain your ladder logic, rung comments, data table values andconfiguration, and address labels. You can also use it to create a new program, by entering a newprogram name at the <PATH>/<FILE> prompt.

After you select Ladder and enter the <PATH> and <FILE> of your program, the ladder editingwindow is displayed. If you entered a new program name, the cursor is on the END OF PROGRAMstatement and the program header configuration window will be displayed. If you select an existingprogram, the cursor is on the first rung. In either case you are in operate mode.

Page 86: Topdoc Manual

CHAPTER 11 OFFLINE EDITING

SoftPLC Corp., Inc. 28 July 200011-2

THE PROGRAM HEADER

The Program Header contains information about the program file and is a part of the TOPDOC*.LOB file. When you upload a program from the PLC to the computer, the Program Header isautomatically created/updated. When you create a new program Offline, you must enter theProgram Header information to begin.

Offline, you can edit/view the Program Header using the Header option found under the File menu.You can view the complete Program Header using the Xfer menu option Header . See Chapter 4for more information.

EDITING THE PROGRAM HEADER OFFLINE

When you create a new program offline, by selecting Ladder and entering a new program name,TOPDOC automatically brings up the Program Header configuration window. After you configurethe Program Header, the Ladder Editor is displayed.

You can also use the Header option from the offline editor File menu to modify a Program Headerfor an existing program. You cannot use the Header option until the program has been createdwith the Editor.

To configure the Program header, you are asked to provide the following:

1) CHANNEL: The O@N@E Channel Number this PLC will be connected to. This will normally be0.

2) STATION NUMBER: The octal PLC station ID number this program will be downloaded to.Normally, use 0 for the Station Number (unless you are on a Data Highway Plus network).

3) PLC PROCESSOR TYPE: This field is used to identify the size of SoftPLC kernel module youare using. Press [Enter] at this field to get a menu listing of the available choices, then enterthe letter corresponding to your choice (or use the [9] and [8] keys, then press [Enter]). Thisshould match the PLC type of the actual kernel when you try to download the program.

4) NUMBER OF I/O RACKS: This is to indicate the number of logical I/O racks (not physicalchassis) you are using. This determines the size of the I/O image tables.

5) PROGRAM HEADER DESCRIPTION: This is a 78 character description of your program. Thisdescription is printed on the top of each report.

If you do not know all the required information, you can enter what you know, then later use theHeader option to correct the Program Header before downloading. If you do change the ProgramHeader, be sure to save the program to disk before exiting the Editor.

Page 87: Topdoc Manual

CHAPTER 11 OFFLINE EDITING

Pub. No. TDZ-MN1 July 28, 200011-3

SAVING YOUR PROGRAM

COMMAND: Save/Write Program to DiskHOTKEY: [Alt][W]MENU: File ; Save/Write to Disk OR from the File menu, select Save

Unlike Online programming, where the program changes are made in the PLC RAM immediately,Offline programming is done in computer memory. To save your changes, you need to save thecopy in memory to disk. There are 3 ways you can do this with TOPDOC, each is described in thissection.

HINT: If you Save before Verify , you will need to Saveagain. Otherwise the file will not be marked as "VerifiedOK", and you will get a message when you download it.

NOTE: You cannot save a program to a new name includingsaving it to a floppy disk, using either of the abovemethods. To save to a new name, you must use theEditor "Rename" command.

SAVING FROM WITHIN THE LADDER EDITOR

To save from within the Editor, use the Save/Write to disk command. The current program will besaved to disk under the <PATH> and <FILE> displayed on line 2.

HINT: When editing large programs or making a large number ofchanges in a program, you should frequently save yourwork to disk. Otherwise, a power failure or other eventcould cause you to lose your work. Make [Alt][W] yourfavorite Hot Key command!

SAVING FROM THE EDITOR MENU

To save from the Editor menu, select the Save option from the File menu, and enter the <PATH>and <FILE> of the program. Normally, the defaults will be correct so you can just press [Enter]twice.

AUTOMATIC SAVE ON EXIT

If you Quit the Editor, press [Esc] from the Editor menu, or Close a program without first savingany changes made, a window is displayed that asks if you want to save before continuing. If youwere editing multiple files, you are asked if you want to save each file in turn.

Page 88: Topdoc Manual

CHAPTER 11 OFFLINE EDITING

SoftPLC Corp., Inc. 28 July 200011-4

PROGRAM VERIFICATION

COMMAND: VerifyHOTKEY: [Alt][V]MENU: File ; Verify Program OR, from the File menu, select Verify

This section describes the program verification process. Verifying a program checks it for errors.

After you verify and get no errors, you should save the program to disk. Otherwise, when you exitand then later try to download, you will get a "Program must be verified" message.

Verify checks the critical aspects of the program file - the ladder logic, the data table, and theprogram header. Examples of checked items are:

@ data table addresses exist for all referenced addresses in the ladder logic@ no incomplete rungs (without output instructions)@ no open or incomplete branches@ instructions are used properly (ie: no RETURN instructions in main program, using the same

label in more than one rung, etc.)@ same SoftPLC data table file number used for different data types

There are three ways to verify a program:

(1) From the Ladder Editor you can use the Verify Command.

(2) You can select the Verify option from the File menu. In this case, you need to enter the<PATH> and <FILE> of the program you want to check.

(3) If you exit the Editor without verifying a program you have changed, TOPDOC automaticallyasks if you want to verify before exiting.

HOW VERIFY WORKS

As TOPDOC checks the program the current rung number being checked is displayed. If an erroris encountered, TOPDOC takes you to the Ladder Editor and positions the cursor on the instructioncausing the error.

A window describing the problem is displayed. If instructed, press [F1] to get a help messagedescribing the error. Press any other key to clear the message. You can now use any of the Ladderor Data Table Editor commands to correct the problem or press [Esc] to go to the menu to correctProgram Header problems.

CAUTION: You should not rely on the verification step to ensure thatyour program will produce desired results for yourapplication. You are the only one who can determinewhether your PLC program will meet your applicationneeds.

Page 89: Topdoc Manual

CHAPTER 11 OFFLINE EDITING

Pub. No. TDZ-MN1 July 28, 200011-5

CORRECTING ERRORS

This section contains hints on correcting certain types of errors. Programming errors, such asduplicate jump labels, require programming logic changes and are not addressed in this section.

PROGRAM HEADER ERRORS

If an error is due to a problem with the program header, such the I/O address being to large for theselected PLC type, you should return to the Editor Menu, then select Header from the File menuto correct the problem. You now must verify the program again.

MISSING DATA TABLE ERRORS

If an error is due to an instruction referencing Data Table addresses that do not exist, the easiestway to create the necessary Data Table address(es) is to use the instruction exchange command(Chapter 7) on the instruction. Enter the exchange command, press [End] to move the cursor to theend of the command buffer, then [Enter] to accept as is.

CAUTION: Ensure that the instruction addresses are correct beforedoing this so you don't create an unnecessarily large DataTable.

INVALID INSTRUCTION OR ADDRESS

This type of error is most likely caused by running a conversion on an old Allen-Bradley PLC-2, PLC-5, or SLC-500 program. Refer to the conversion utility documentation for more details.

CHANGING THE NAME OF A PROGRAM FILE

COMMAND: ReNameHOTKEY: [Alt][N]MENU: File ; Rename Program

From within the Offline Ladder Editor, you can use the rename command at any time to change thename of the currently displayed program file in memory.

After you enter/select the rename command, you must enter the desired new <PATH> and <FILE>.The copy of the program in memory is changed to the new name. The new program file will containany changes you make during this editing session. The copy of the program file with the old nameremains on disk but is not updated with changes.

When you reName a program file, the rung comment and database files for the old program nameare closed and saved to disk. A new rung comment file is created with the new name.

If you want to reuse an old database file for the newly named file, use Windows Explorer or the DOScopy or rename commands (as appropriate for your situation).

Page 90: Topdoc Manual

CHAPTER 11 OFFLINE EDITING

SoftPLC Corp., Inc. 28 July 200011-6

For example; To copy a database and its index files, at the prompt, enter:

copy \TDZ\splc\<oldfile>.DB* \TDZ\splc\<newfile>.DB*

then, enter

copy \TDZ\splc\<oldfile>.?N5 \TDZ\splc\<newfile>.?N5

GLOBAL SEARCH & REPLACE - THE INTERCHANGE COMMAND

COMMAND: Interchange (Global Search/Replace)HOTKEY: [Alt][I]MENU: Special ; Search/Replace

You can use the TOPDOC interchange command to replace one parameter (address, jump labelor constant) with another. When you enter/select the Interchange command, a menu windowappears with the options All , Range , and Quit . The first two options are described below. TheQuit option returns you to operate mode.

THE ALL OPTION

When you want to globally replace all occurrences of a parameter with another parameter you usethe All option. Even addresses used to indicate the beginning of a file can be replaced. After youselect All , the parameter entry window is displayed.

THE RANGE OPTION

The Range option allows you to replace all occurrences of a parameter with another parameterwithin a selected range of rung numbers. When you select Range , you must enter the starting andending numbers of the rungs in which you want to replace the address. You can specify any sizerange, even if it crosses program boundaries (END OF PROGRAM).

If you had marked a range (using the mark command) prior to invoking the Interchange command,TOPDOC will ask if you want to use the marked range as the default range. If you say Yes , theparameter entry window is displayed. If you say No , do not use the marked range, you can enterthe starting and ending rung numbers of the range, just as if you had not marked a range in theladder diagram.

After you select the range, the parameter entry window is displayed.

PARAMETER (ADDRESS) ENTRY

The parameter entry window requests (a) the specification of the parameter(s) you want to replaceand (b) the specification of the desired new parameter(s).

Page 91: Topdoc Manual

CHAPTER 11 OFFLINE EDITING

Pub. No. TDZ-MN1 July 28, 200011-7

The Interchange command uses "object types". This means that Bits are different than words. Youcannot replace a Bit address with a word address, nor can you replace Timer Bits, Timers, TimerWords, and/or Timer Files with one command. You need to invoke the Interchange command oncefor each "object type". Chapter 14 describes TOPDOC "object types".

Each entry field is a small command buffer and all the normal editing commands can be used tosave keystrokes. You can also use wildcards in the parameter specification, like in the Findcommand (Chapter 6).

USING WILDCARDS

You can use an * (asterisk) as a Wildcard in your parameter specification. In the Parameter Searchspecification, the * indicates you want all values to match that particular part of the parameter value.For example, */2 means all words using bit 2. T* means all timers.

In the Replacement Parameter specification, the * indicates that TOPDOC should not change thevalue in that particular part of the parameter value. For example, N:400/* would mean to leave thebit part of the address alone and replace the word part of the address with N:400.

SEARCH REPLACE DESCRIPTION

T4:* T10:* Replace all Timers in file 4 with timer in File 10, leaving timer # unchanged

O:30/* I:30/* Replace all bit occurrences of output word 30 with input word 30, leaving bit #unchanged

I:30/* I:2/12 Replace usages of all bits in word 30 with bit 12 of word 2

T4:*/* T18:*/* Replace bit usages of all elements in T4 with T18 - only file # is changed

#N*:* #N7:* Replace integer file references with file 7, same element

#N*:* N7:* Replace integer file references with word references to file 7, same element

B3/* B19/32 Replace usages of all bits in B3 with Binary File 19, bit 32

254 82 Replace all constants with value of 254 with 82

N[**:*]:2 N[N7:*]:* Replace indirect references within integer files, element 2 with N7,leaving bothindirect and direct elements unchanged

Table 11-1(a)Wildcard Replace Examples

REPLACING THE PARAMETERS (ADDRESSES)

After you enter all the required information, you must specify whether you want to individuallyconfirm each parameter replacement or to globally perform the replace without confirmation.

1) If you select Yes , as each matching occurrence of the parameter specification is found, amenu with options Yes , No and Quit is displayed on line 1. You select whether you want

Page 92: Topdoc Manual

CHAPTER 11 OFFLINE EDITING

SoftPLC Corp., Inc. 28 July 200011-8

to exchange this parameter ( Yes ), skip this occurrence ( No ), or abort the replacementprocess ( Quit ).

2) If you select No , each matching occurrence of the parameter is replaced automaticallywithout prompting.

Once the end of program is reached, TOPDOC goes back to the beginning of the program andreplaces from that point forward to where you initially started.

MULTI-FILE EDITING

Multi-file editing is the ability to load more than one PLC program file into memory andsimultaneously edit them. You can move and copy ranges of rungs between files and switchbetween files at random.

Up to 16 program files, which can be entire programs or program sections/templates, can beloaded into memory at one time. When you select the Ladder option, you are loading one file. If you exit the Ladder Editor, then select Ladder again, you are loading another file, etc.

HINT: You should use the Open option to bring into memoryall the files you want to use before you begin editing. This is easier than loading each into the Ladder Editor. Simply select the Open option once for each file.

NOTE: A program remains in memory until you Close it or Quit the Editor back to the Main Menu. Saving a file todisk does NOT unload it from memory.

SWITCHING BETWEEN LOADED FILES

COMMAND: Load Previous File Load Next FileHOTKEY: [F7] [F8]MENU: File ; Previous Workfile File ; Next Workfile

The above commands are used to cycle the Ladder Editor display between the various loadedfiles. The current filename is displayed on line 2. TOPDOC maintains a list of loaded files, inthe order they were loaded. The list is treated as a circle. For example, if you are on the last fileand press [F8], the first file is brought up.

HINT: You can also use the [F7] and [F8] keys on the <FILE>prompt to cycle between the loaded files for any offlineeditor menu option.

Page 93: Topdoc Manual

CHAPTER 11 OFFLINE EDITING

Pub. No. TDZ-MN1 July 28, 200011-9

MULTIPLE FILE HANDLING

Under the Editor File option are three options which make using the multi-file editing featureseasier. These are the Files , Open , and Close options.

THE FILES OPTION

The Files option gives you a list of the currently loaded files. When you select Files , a list ofall the files you have loaded, in the order they were loaded, is displayed. When you are finishedviewing the list, just press any key to return to the File menu.

If any of the files in the list have an asterisk (*) prior to the filename, this means the program hasbeen edited but not saved to disk since it was changed.

THE OPEN OPTION

The Open option brings a program from disk into memory. After you select a program to beloaded, you are returned to the File menu. Open can not be used to create a new program. Youmust use the Ladder option to create new program files.

NOTE: If you plan on editing only a single program, you do notneed to use the Open option. When you select Ladder , the program you select is automatically loadedinto memory.

THE CLOSE OPTION

You use the Close option to remove a program file from memory without exiting the Editor. When you select Close and enter the program <PATH> and <FILE>, TOPDOC removes theprogram file from memory. You should Close files to free computer memory when you arefinished with them in your editing session.

If you attempt to Close a program file you have changed, you are asked if you want to verifythe program and/or save the changes before taking the file from memory. Unless you select Yes , the changes are not saved.

USING RANGE COMMANDS FOR MULTI-FILE EDITING

In multi-file editing, the Range commands work identically as during single file editing. Thedifference is that you can move and copy marked ranges of rungs between different files. Thisway, you can quickly build a new file from common control sequences you have developedpreviously.

DATA TABLE: If rungs are moved or copied across files, the data table values are NOTautomatically copied UNLESS you specified this in the Editor configuration(Chapter 5). You must use the multi-file capabilities of the Data Table Editor

Page 94: Topdoc Manual

CHAPTER 11 OFFLINE EDITING

SoftPLC Corp., Inc. 28 July 200011-10

to copy groups of values. In addition, Data Table is not created nor is filetype checking done. The Verify will identify any problems of this type.

COMMENTS: Rung comments ARE copied or moved with their associated rungs to thetarget file.

LABELS: Address labels are NOT copied or moved across when multi-file editingUNLESS you specified this in the Editor configuration (Chapter 5). To easilycopy address labels, you can use the Database utility program (Chapter 27).

UNMARK: You can Unmark a range at any time, from any position, within any file -regardless of where the range was marked.

RANGE DELETE: You can only delete a range of rungs if you are in the program whichcontains the marked range.

MULTI-FILE DATA TABLE EDITING

You can edit the data table of any loaded program. Once you are in the Data Table Editor, youcan use the [F7] and [F8] keys to switch between the various data tables, just as in switchingbetween programs in the Ladder Editor.

You can also use the Copy Range command to copy data table values from one program toanother. First select the range, switch to the desired program and data table location, and press[Alt][C] to copy the values (Chapter 12).

Page 95: Topdoc Manual

Pub. No. TDZ-MN1 July 28, 200012-1

CHAPTER 12

DATA TABLE EDITING

This chapter describes the SoftPLC Data Table and Data Watch Window Editors which you useto set, edit, and monitor values in the PLC data table. With the Data Table Editor you can alsoview/edit the PLC Status File, configure the data table, and other related functions.

If you set data table values or forced conditions offline, when you download your finished PLCprogram, the data table in the PLC memory is configured and values are stored as you specifiedin TOPDOC.

NOTE: Certain data table values can be set during ladderinstruction entry and do not need to be re-entered in theData Table Editor. You can initialize word values usingthe equal sign. For more information on enteringconstants in the Ladder Editor command buffer, refer to"SET DATA TABLE VALUES" in Chapter 7.

The data table is automatically expanded as you enter instructions in the Ladder Editor offline, oronline when the PLC is in program mode. That is, whenever you use an address in aninstruction the data table is automatically expanded to include the addresses used. You do notneed to separately create data table files.

NOTE: If you are Online to the PLC, the data table size canonly be changed if the PLC is in PROGRAM orREMOTE PROGRAM mode.

LOADING THE DATA TABLE EDITOR

COMMAND: Data Table Editor Data Table ZoomHOTKEY: [Alt][D] [Alt][Z]MENU: Data ; Data Table Editor Data ; Zoom to Data Table

The Data Table Editor is loaded from the Ladder Editor. When you invoke either command, theData Table Editor is loaded.

@ If you use the Data Table Editor command ([Alt][D]), the cursor will be positioned at eitherthe beginning of the Output section, or at the last cursor location (if you had loaded the DataTable Editor previously in this editing session).

@ If you use the Data Table Zoom command ([Alt][Z]), the cursor will be located at the currentinstruction's address. If you are positioned on a multi-address instruction, a parameterselection menu will appear, allowing you to select the desired address to position on in theData Table Editor.

Page 96: Topdoc Manual

CHAPTER 12 DATA TABLE EDITING

SoftPLC Corp., Inc. 28 July 200012-2

Once the Data Table Editor is loaded, you can use any of the Hot-Key commands (Table 23-1)or display the Data Table Editor menu by pressing [F10].

To exit the Data Table Editor and return to the Ladder Editor, press [Esc]. You will be positionedon the instruction you were on when you loaded the Data Table Editor.

KEYS DESCRIPTION

CURSOR MOVEMENT/POSITION

[8]/[9] Go to prior/next line of display

[6]/[7] Go to next/prior position

[Ctrl][6] Go to next element

[Ctrl][7] Go to previous element

[Home]/[End] Go to first/last word on current line

[PgUp]/[PgDn] Display the prior/next page of data

[Ctrl][Home] Go to first element in current file

[Ctrl][End] Go to last element in current file

[Ctrl][PgUp] Go to first field on current page

[Ctrl][PgDn] Go to last field on current page

[F3]/[F4] Go to prior/next data table file

[F7]/[F8] Go to prior/next Workfile's data table

[Alt][P] Position cursor at specified address

DATA TABLE VALUE EDITING

[Alt][X] Change current value

[Alt][K] mark a range of word addresses

[Alt][U] Unmark a range of word addresses

[Alt][C] Copy a range of values at current word

[Alt][V] set a range of words to a specified Value

OTHER FUNCTIONS/EDITORS

[Alt][F] Change data format

[Ctrl][E] Editor configuration

[Alt][M] Map Control Editor (and Reclaim function)

[Ctrl][D] Data Watch Window

[Alt][T] Force Table (from I/O files only)

[Alt][L] Label Database Editor

[Alt][S] On-screen Cross Reference Display

[Alt][J] Clear faults menu (from Status File only)

[Alt][O] I/O Status/Rack Cfg (from status file only)

[Alt][A] PID Autotune (from PD files only)

[Enter] PID configuration (from PD Template only)

[Alt][W] Save/Write to disk

[Esc] Quit editing and return to menu

Table 12-1

Page 97: Topdoc Manual

CHAPTER 12 DATA TABLE EDITING

Pub. No. TDZ-MN1 July 28, 200012-3

Data Table Editor Commands

EDITOR CONFIGURATION

COMMAND: Editor ConfigurationHOTKEY: [Alt][E]MENU: View ; Configure Editor

There are a number of Data Table Editor configuration options which are set through the Editorconfiguration window (Figure 12-1).

Datatable Editor Configuration

<F9>:accept all <ESC>:abort changes

Cursor Auto-advance: RIGHT

Database Information: ON

Format Columns

OUTPUT BINARY 4

INPUT BINARY 4

BINARY BINARY 4

TIMER N/A 2

COUNTER N/A 2

CONTROL N/A 1

INTEGER DECIMAL 10

FLOAT N/A 5

ASCII ASCII 10

BCD BCD 10

BLOCK TRANSFER N/A 1

PID N/A 5

Figure 12-1Data Table Editor Configuration Window

AUTO ADVANCE

The Auto Advance feature lets you configure the Data Table Editor to edit a single value at a timeor automatically allow edits to multiple consecutive values by moving the cursor to the right or down.After you insert a value, the current Auto Advance setting determines what happens next to thecursor. After the edit, you can enter any valid command.

Page 98: Topdoc Manual

CHAPTER 12 DATA TABLE EDITING

SoftPLC Corp., Inc. 28 July 200012-4

AUTO ADVANCE DESCRIPTION

Right Cursor moves to next field to the right of current location

Down Cursor moves to next field below the current cursor location

Off After you insert a value, you will be positioned on the same word

Table 12-2Auto Advance Action

DATABASE INFORMATION

You can select to have Address Labels displayed in the Data Table Editor and/or WatchWindows. If this feature is turned ON, the tagname and address label text for the currentaddress element is displayed at the upper right corner of the Data Table Editor screen (Figure12-2). Note the following:

1) The selection of database display ON or OFF in the Data Table Editor will change thecurrent Ladder Editor database display setting (set with the Label Toggle option--[Alt][L]),and vice versa.

2) If the current address element does not have a label, the Ladder Editor setting for "Displaynext higher address label" will determine whether a label is displayed or not. You can usethe Label Editor to find whether a displayed label is for the current address element or ahigher level address of which the element is a part. This feature is described further inChapters 5 and 19.

3) Choosing to display the database information may cause the Editor to seem slower onlinewith a slower computer because the information in the database file must be retrieved fromdisk before it can be displayed on the screen. If this is occurring, you can use thePositioning commands to move throughout the Data Table rather than scrolling, or you canturn the database display off until you reach the desired location.

Page 99: Topdoc Manual

CHAPTER 12 DATA TABLE EDITING

Pub. No. TDZ-MN1 July 28, 200012-5

Datatable Editor: F1 for Help, F10 for Menu

Program: \TDZ\SPLC\DEMO Desc. text: this timer is

Section: TIMER File: 4 Tagname: to time how

BATCH_TIMER long machine

Address: T004:000.PRE is on during

batch proc

ELEM PRE ACC EN TT DN BASE PRE ACC EN TT DN BASE

0 60 0 0 0 0 1.0 180 0 0 0 0 1.0

2 120 0 0 0 0 1.0 180 0 0 0 0 1.0

4 120 0 0 0 0 1.0 180 0 0 0 0 1.0

6 120 0 0 0 0 1.0 120 0 0 0 0 1.0

Figure 12-2Data Table Label Display

DEFAULT DATA FORMATS

For most SoftPLC data file types, you can set the default data format and number of displayedcolumns. This default will be used the first time you load the data table, or when a format hasnot been selected in the current session. These can be changed temporarily with the Format option, found under the [F10] menu View option, or by pressing [Alt][F].

The available format and maximum number of columns will vary based on the data type. A listof available formats will appear in a selection window when you press [Ins] on any field.

NOTE: Because TOPDOC supports enhanced displays ofgreater than 80 columns width, you are not preventedfrom entering a number of columns greater than whatcould be displayed for the current display. If you do this,the display will automatically adjust to display thenumber of columns possible.

EDITOR DISPLAY

The Data Table Editing window is displayed after you select to load the Data Table Editor fromthe Ladder Editor. Figure 12-3 shows the Data Table Editor display for the Output file.

The top of the screen contains a standard "header" which displays the current mode of operation,messages, and other status information. The header also displays the program's<PATH>\<FILE>, the file data type, file number, current data display format, and the elementaddress of the cursor.

Page 100: Topdoc Manual

CHAPTER 12 DATA TABLE EDITING

SoftPLC Corp., Inc. 28 July 200012-6

The lower part of the screen contains the data values. The format of the data will vary based onthe Editor Configuration and the type of file being displayed.

F3=Prev, F4=Next Datatable Editor F1 for Help, F10 for Menu

Program: \TDZ\SPLC\DEMO Desc. text: motor output

Section: OUTPUT File: 0 Tagname:

Format: BINARY Force: NO FORCE MOTOR

Address: O:011/00

ELEM 0 1 2 3

0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

4 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

10 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

14 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

20 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

24 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

30 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

34 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

Figure 12-3Data Table Editing Window

MENU DISPLAY [F10]

A number of "HotKey" commands are available from within the Data Table Editor to allow you toquickly perform different editing functions without having to use a lot of keystrokes. By pressing[F1], you can get a list of these commands (Table 12-1).

Alternatively, as in the Ladder Editor, you can use a set of pull-down menus to perform the editingfunctions. By pressing [F10] when TOPDOC is waiting for a command, you will display a set of pull-down menus on the top line of the screen (Figure 12-4). Use of these menus is identical to theLadder Editor menus (see Chapter 5 for details).

Page 101: Topdoc Manual

CHAPTER 12 DATA TABLE EDITING

Pub. No. TDZ-MN1 July 28, 200012-7

Datatable Editor

File Position Data View Special

Format: BINARY Format Alt+F OTOR

Address: O:011/00 Editor Configuration Ctrl+E

ELEM 0 Watch Window Ctrl+D 3

0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

4 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

10 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

14 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

20 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

24 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

Figure 12-4 Data Table Pull-down Menus

READING THE DATA TABLE VALUES DISPLAY

For most data types, the Data Table Editor displays values in a matrix as shown in Figure 23-5. Thefirst column shows the word address corresponding to the value in the second column. By addingthe number at the top of the columns to the value in the first column, you can determine the wordaddress corresponding to the value at any location on the screen. In Binary displays, the rightmostdigit is bit 00.

For example, in Figure 12-5 the value "11111111 11011111" in the third column and fourth line ofthe display would correspond to word O014 + 2 or O016, and the 0 is bit 05.

F3=Prev,F4=Next, Datatable Editor F1 for Help, F10 for Menu

Program: \TDZ\SPLC\DEMO

Section: OUTPUT File: 0 Desc. text: When ON, oil

Format: BINARY Force: Tagname: pressure is

Address: O:016/05 WARNING_LAMP low

ELEM 0 1 2 3

0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

4 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

10 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

14 00000000 00000000 00000000 00000000 11111111 11011111 00000000 00000000

20 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

24 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

30 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

Figure 12-5Reading Data Table Values

Page 102: Topdoc Manual

CHAPTER 12 DATA TABLE EDITING

SoftPLC Corp., Inc. 28 July 200012-8

For complex data types, such as the SoftPLC status file or structures (Controls, Timers/Counters,ST, PD, MG, BT, etc.), specially formatted displays are provided for each section. (See figures 12-8.)

THE FORMAT OPTION - CHANGING DISPLAY MODES

COMMAND: FormatHOTKEY: [Alt][F]MENU: View ; Format

You can change the format of the data values for a single file type using the Format command.When you enter this command for a file whose data type has more than one display format, aselection box appears with the options as per Table 12-3. Each option corresponds to a data displayformat. Select the display format you want to see, or press [Esc] to retain the current display format.

If the current file's data type has no other display formats, TOPDOC displays a message informingyou of that when you enter the command.

NOTE: In the ASCII display mode, any word values thatcorrespond to a nondisplayable ASCII character aredisplayed as the hexadecimal code for the value precededby a backslash.

If you change the display format of a file, the new setting is saved so long as you do not exit theLadder Editor. You can load/unload the Data Table Editor multiple times, move around or editLadder Logic, etc. without losing your format settings. All files of the same data type are affectedby this command.

Page 103: Topdoc Manual

CHAPTER 12 DATA TABLE EDITING

Pub. No. TDZ-MN1 July 28, 200012-9

FILE TYPE DATA TABLE DEFAULT OPTIONAL

IDENTIFIER FILE TYPE FORMAT FORMATS

O output binary ASCII, hex, integer, octal

I input binary ASCII, hex, integer, octal

S status status N/A

B binary binary ASCII, hex, integer, octal

T timer timer N/A

C counter counter N/A

R control control N/A

N integer integer ASCII, binary, hex, octal

F floating point floating pt N/A

A ASCII ASCII binary, hex, integer, octal

D BCD hex ASCII, binary, int, octal

BT block transfer block transfer N/A

ST string string N/A

PD PID PID template PID configuration detail

MG message message N/A

Table 12-3Data Value Display Formats

NON-SEQUENTIAL DATA DISPLAY/DATA WATCH WINDOWS

COMMAND: Data Watch WindowHOTKEY: [Ctrl][D]MENU: View ; Watch Window

This section describes TOPDOC's Watch Window feature, used to display Non-Sequential datavalues. With this feature you can display lists containing non-consecutive data table addresseseither within the Data Table Editor, or in a window within the Ladder Editor. This is an extremelyuseful troubleshooting and monitoring tool.

Each Watch Window can contain any number of data table bit or word addresses. The contents ofa Watch Window list can be named and saved to disk for later retrieval.

Page 104: Topdoc Manual

CHAPTER 12 DATA TABLE EDITING

SoftPLC Corp., Inc. 28 July 200012-10

In the Data Table Editor, the Watch Window is a full screen display. In the Ladder Editor, the WatchWindow size is determined by the setting in the Ladder Editor Configuration (Chapter 5). In eithercase, when you select to bring up the Watch Window function, you will see a display such as thatshown in Figure 12-7(b).

NOTE: Watch Windows are automatically created when you usethe Insert Data function ([Ins][D]) from the Ladder Editorwhen positioned on most instructions. The Watch Windowwill contain all the addresses used in the instruction,except for control and status bits. In this case, the menuin Figure 12-7 is not displayed unless you press [Esc] toexit the window, because TOPDOC automatically puts youinto the Edit mode when the window is opened.

Datatable Editor: F1 for Help, F10 for Menu

Edit Load Unload Save Delete Quit

Insert or delete to/from current list

Address:

ELEM Address/Tagname Value Fmt Descriptor

001 CNTRL OUT 1950 DEC

002 PV 2049 DEC

003 K 990.000 N/A O<=K<=100 Constant used to s

004 SETPOINT 50.0000 N/A

005 N707:000 100 DEC

Figure 12-7(a)Data Watch Window Display for Data Editor

Page 105: Topdoc Manual

CHAPTER 12 DATA TABLE EDITING

Pub. No. TDZ-MN1 July 28, 200012-11

6444444444444444444444444444444444444444444444444444444444444444444444444444444444475 Mode:operate F10=Menu P2/0 55 > C:\TDZ\SPLC\PIDTEST 5

K))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))M5 Enable the PID instruction every 0.25 second. 55 * * 55 * T004:000 +) TON )))), * 5

5 /))))]/[)))))))))))))))))))))))))))))))))))))))))))))))))))))))1 T004:000 /(EN)1 55 * DN * Base .01 * * 55 * * PR 10 /(DN)* 55 * * AC 5 * * 55 * .))))))))))- * 55 * * 55 * N007:000 T004:000 +) PID )))))))))))))),* 55 /))))] [)))))))))))] [)))))))))))))))))))))))))))))))))))1 PID /1 5

5 * 01 DN * CTRL: PD013:001 ** 55 * * PROC VAR: N007:001 ** 55 64444444444444444Data Watch Window: F1 for Help, F10 for Menu4444444444444444447 5

5 5Edit Load Unload Save Delete Quit 5 55 5Insert or delete to/from current list 5 5

5 5))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))5 55 5CNTRL OUT 1950 DEC 5 55 5PV 2049 DEC 5 55 5K 990.000 N/A 0<=K<=100 Constant used to simulat5 55 5SETPOINT 50.0000 N/A 5 55 5N707:000 100 DEC 5 55 5 5 5

5 94444444444444444444444444444444444444444444444444444444444444444444444444444448 5944444444444444444444444444444444444444444444444444444444444444444444444444444444448

Figure 12-7(b)Data Watch Window Display for Ladder Editor

WATCH WINDOW DISPLAY

Each address element in the display is shown on one line. The first column displays either theaddress or a Tagname according to the following rules below. The 2nd column displays the currentvalue in the format displayed in the 3rd column. The rest of the display contains the address labeltext, according to the following rules.

Display "Rules":

1) If Database display is OFF, the first column displays the address and the 4th column is blank.

2) If Database display is ON, but the Ladder Configuration has "Display Next Higher AddressLabel" set to NO, the first column displays the tagname for the address and label text if theyexist. Otherwise, the first column displays the address.

3) If Database display is ON, and the Ladder Configuration has "Display Next Higher AddressLabel" set to YES, the first column displays the tagname for the address and label text if theyexist. Otherwise, the tagname and label for the next highest level address of which the currentaddress is a part will be displayed. If no database records exist for any related address, theaddress will be displayed in the first column.

EDIT OPTION

Page 106: Topdoc Manual

CHAPTER 12 DATA TABLE EDITING

SoftPLC Corp., Inc. 28 July 200012-12

The Edit option allows you to select addresses for the list, change values, and perform most of thefunctions available from within the sequential Data Table Editor. Table 12-4 lists the Watch WindowEditor commands. The Data Change, Position, View, and Special commands operate identicallyto the Data Table Editor. Refer to the appropriate sections for details on these commands.

KEYS DESCRIPTION

[Ins][9] Add address below current line

[Ins][8] Add address above current line

[Del] Remove address from current line

[Alt][X] Change current value

[Alt][F] Change data format

[Alt][Z] Zoom to address in Data Table

[Ctrl][E] Editor configuration

[Alt][L] Label Database Editor

[Alt][S] On-screen Cross Reference Display

Table 12-4Data Watch Window Commands

Selecting Addresses

Press [Ins][9] or [Ins][8] to add an address to the list below or above the cursor location,respectively. Any word or bit address can be selected, except for indirect addresses.

Press [Del] to remove the address at the current cursor location from the list.

SAVE OPTION

The Save option allows you to save the currently displayed list of values to the Watch Windowlist file on disk. All the lists are stored in a single file, whose name is <FILE>.WLS, where<FILE> is the name of the program.

HINT: If you Save a previously saved list under another name,you can retain both the original list and a new list whichcontains any changes you have made since you Loadedthe original.

Page 107: Topdoc Manual

CHAPTER 12 DATA TABLE EDITING

Pub. No. TDZ-MN1 July 28, 200012-13

LOAD OPTION

The Load option allows you to select a list stored on disk. TOPDOC will display a list boxwhich contains all the previously created address lists, cursor to the desired name and press[Enter] to select it.

UNLOAD OPTION

The Unload option clears the Watch Window so you can Load another or create a new list. The Window will be cleared, but no changes will be saved unless you Save the list to disk.

DELETE OPTION

The Delete option removes a list from the diskfile <FILE>.WLS. You can only delete a list if itis the currently loaded list.

DATA TABLE EDITOR POSITIONING COMMANDS

You can use the commands in Table 12-5 to move the cursor from value to value within the datatable. These commands are also all available from the [F10] menu option Position . For fastersearching in large data table files, the [PgUp], [PgDn], [Ctrl][Home], and [Ctrl][End] keysequences and the Position command, [Alt][P], can be used to quickly locate the desired wordaddress.

When you reach a boundary of the display window, you can scroll the display with the [9] and [8]keys.

You can use the [F3] and [F4] keys to display the previous and next files (respectively) in thedata table. When you reach the first or last file, continuing to press the function key wrapsaround to the last or first file (respectively).

KEYS DESCRIPTION

[8]/[9] Go to prior/next line of display

[7]/[6] Go to prior/next word address

[Home] Go to first word on current line of display

[End] Go to last word on current line of display

[PgUp]/[PgDn] Display the prior/next 64 words

[Ctrl][Home] Go to first word in current data table file

[Ctrl][End] Go to last word in current data table file

[Alt][P] Position cursor on a specific word address

[F3]/[F4] Go to prior/next data table file

Table 12-5

Page 108: Topdoc Manual

CHAPTER 12 DATA TABLE EDITING

SoftPLC Corp., Inc. 28 July 200012-14

Data Table Editor Positioning Commands

MOVING BETWEEN LADDER/DATA TABLE

There are a number of ways you can quickly move to related areas of ladder rungs and data tableaddresses. This section describes them.

LADDER TO DATA TABLE

COMMAND: Data Table ZoomHOTKEY: [Alt][Z]MENU: Data ; Zoom to Data Table

The Data Table Zoom command takes you from a ladder instruction to a selected instruction addressin the Data Table Editor. If the instruction has multiple addresses, a selection list box appears.Cursor to the desired address, then press [Enter]. When you exit the Data Table Editor (by pressing[Esc]) you will be positioned on the same instruction.

COMMAND: Insert DataHOTKEY: [Ins][D]MENU: Data ; Edit Instruction Data

If you are positioned on a MSG instruction, or if you are positioned on a PID instruction which usesa PD control block, this command will take you into the Data Table Editor, positioned on the MG orPD element referenced in the instruction. In the PID case, you will be on the faceplate display.Press [Enter] to access the PID configuration display for the PD element.

If you are on a PID instruction that uses an integer control block, this command will bring up aspecial configuration editor for the instruction.

DATA TABLE TO LADDER

COMMAND: On-Screen Cross Reference DisplayHOTKEY: [Alt][S]MENU: Special ; On-Screen CrossRef

If you access the On-Screen Cross Reference Display from within the Data Table Editor, then selectShow Xref to display the cross reference for the currently selected address, you will see a list ofrungs using that address. Position the cursor on the desired rung, then press [Alt][P]. You will bepositioned on the selected rung in the Ladder Editor. Refer to Chapter 13 for more details on thisfeature.

CHANGING VALUES ONE AT A TIME

Page 109: Topdoc Manual

CHAPTER 12 DATA TABLE EDITING

Pub. No. TDZ-MN1 July 28, 200012-15

COMMAND: Change a valueHOTKEY: [Alt][X] (or [Ins] or a valid data value)MENU: Data ; Change a Value

For most values, when you select this command, a command buffer is displayed on line 5. Enterthe desired new value, then press [Enter] to accept it or [Esc] to abort any changes. The commandbuffer operates like the one in the Ladder Editor, the same editing commands can be used (Table7-1).

For complex data structures, such as the Status File, MG and PD data types, some values areselected from a list box rather than entered into the command buffer. Normally these are indicatedby a "9" displayed after the entry field. When you select to change any of these fields, the list ofoptions will be displayed. Cursor to the desired choice and press [Enter] to select it. TOPDOC willmodify the appropriate data table values based on your selection. See the next section for moredetails.

NOTE: The value you enter will be in the same format as thecurrent display mode. If you are in the ASCII displaymode and any word values correspond to a nondisplayableASCII character, TOPDOC will display the hexadecimalcode for the value preceded by a backslash (\). You canchange the value to a displayable ASCII character, butyou cannot enter a nondisplayable character. To enter ahexadecimal value, use the Format command to changethe current display mode.

After you insert the value(s), the current Auto Advance setting in the Editor Configurationdetermines what happens next. See the "AUTO ADVANCE" section earlier in this chapter for moredetails.

WARNING: If you are Online to a running PLC, the data table valuesare continually being updated. However, values in thecommand buffer/entry window are not. Do not use thecommand buffer values to make process decisions as thevalues may have changed between when you brought upthe values and when you view/change them.

EDITING STATUS AND STRUCTURE DATA TYPE FILES

The TOPDOC Data Table Editor has special displays for SoftPLC data table file 2, the status file andfor data types that are structures, such as Timers, Counters, Strings, PID (PD) and Message (MG).

Within these displays, the arrow keys can be used to move the cursor through the elements in thestructure. Line 4 displays the actual file/word/bit address associated with the cursor location. A shortdescription of how the address is used by the PLC is also sometimes provided in the header.

Figures 12-8 show the display for the simpler structures. Pressing [F1] on any element providesdetails about that element and how the data should be entered and used.

Page 110: Topdoc Manual

CHAPTER 12 DATA TABLE EDITING

SoftPLC Corp., Inc. 28 July 200012-16

F3=Prev,F4=Next, Datafile Editor=F1 for Help, F10 for Menu

Program: C:\TDZ\SPLC\SAMPLE Desc. text:

Section: TIMER File: 4 Tagname:

Address: T004:000.PRE

ELEM PRE ACC EN TT DN BASE PRE ACC EN TT DN BASE

0 300 0 0 0 0 1.0 100 39 1 1 0 .01

2 1800 1800 1 0 1 1.0 300 300 0 0 0 .01

4 60 0 0 0 0 1.0 45 0 0 0 0 1.0

6 90 0 0 0 0 1.0 3000 0 0 0 0 .01

8 10 0 0 0 0 1.0 60 60 1 0 1 1.0

10 1200 0 0 0 0 1.0 120 120 1 0 1 1.0

12 30 0 0 0 0 1.0 15 0 0 0 0 1.0

14 10 0 0 0 0 1.0 60 60 1 0 1 1.0

Figure 12-8(a)Timers Display

F3=Prev,F4=Next, Datafile Editor=F1 for Help, F10 for Menu

Program: C:\TDZ\SPLC\SAMPLE Desc. text:

Section: COUNTER File: 5 Tagname:

Address: C005:000.PRE

ELEM PRE ACC CU CD DN OV UN PRE ACC CU CD DN OV UN

0 11 0 0 0 0 0 0 2 0 0 0 0 0 0

2 8 1 0 0 0 0 0 0 0 0 0 0 0 0

4 60 0 0 0 0 0 0 60 0 0 0 0 0 0

6 60 0 0 0 0 0 0 60 0 0 0 0 0 0

8 60 0 0 0 0 0 0 60 0 0 0 0 0 0

10 60 0 0 0 0 0 0 60 0 0 0 0 0 0

12 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Figure 12-8(b)Counters Display

Page 111: Topdoc Manual

CHAPTER 12 DATA TABLE EDITING

Pub. No. TDZ-MN1 July 28, 200012-17

6444444444F3=Prev,F4=Next, Datafile Editor=F1 for Help, F10 for Menu444444444475 Program: C:\TDZ\SPLC\SAMPLE Desc. text: 55 Section: CONTROL File: 6 Tagname: 55 55 Address: R006:000.LEN 55 > 5

5+))))0))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))),55*ELEM* LEN POS EN EU DN EM ER UL IN FD *5

5/))))3)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))155* 0* 20 0 0 0 0 0 0 0 0 0 *55* 1* 0 0 0 0 0 0 0 0 0 0 *55* 2* 272 141 1 0 0 0 0 0 0 1 *55* 3* 2 2 0 0 1 0 0 0 0 0 *55* 4* 3 0 0 0 0 0 0 0 0 0 *55* 5* 3 0 0 0 0 0 0 0 0 0 *55* 6* 45 44 1 0 1 0 0 0 0 0 *55* 7* 45 44 1 0 1 0 0 1 0 0 *5

Figure 12-8(c)Controls Display

6444444444F3=Prev,F4=Next, Datafile Editor=F1 for Help, F10 for Menu444444444475 Program: C:\TDZ\SPLC\SAMPLE Desc. text: 55 Section: STRING File: 11 Tagname: 55 55 Address: ST011:002 55 > 5

5+))))0))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))),55*ELEM*LEN STRING *5

5/))))3)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))155* 0* 24 this is a string of text *55* 1* 58 This is also a string of text with a bit more words in it. *55* 2* 0 *55* 3* 0 *55* 4* 0 *5

Figure 12-8(d)Strings

The Status File, and Message (MG) and PID (PD) files contain more than 1 page of elements.Pressing [F1] on any element provides detailed information about that element. Appendix F containsdetailed information on the PID display and Auto-Tuning features of TOPDOC.

STATUS FILE EDITING FUNCTIONS

In the Status File, additional commands are available. These are described below.

Clearing Processor Faults

COMMAND: Clear FaultsHOTKEY: [Alt][J]MENU: Special ; Clear Faults

Page 112: Topdoc Manual

CHAPTER 12 DATA TABLE EDITING

SoftPLC Corp., Inc. 28 July 200012-18

Selecting this option brings up a menu with the options All Faults , Minor Faults , and MajorFaults . The first option clears all fault bits in both the minor and major fault words. The next twooptions clear all fault bits in the corresponding fault words, minor or major. You can also clearindividual faults by changing the bit from a 1 to a 0. The TOPDOC help messages provide detailson the cause of the fault.

I/O Status (Partial Rack Configuration)

COMMAND: I/O StatusHOTKEY: [Alt][O]MENU: Special ; I/O Status

This command is used only with Allen-Bradley Remote I/O.

Use of this command can be found in a separate Application Note.

FORCED I/O

From the Output and Input data table files you can monitor/change the Forced I/O status of bits.Chapter 10 contains detailed information about Forcing I/O with TOPDOC. This section onlycontains information not already described in Chapter 10.

The Forced Status of a I/O bit is displayed in the Data Table Editor header. The value in the datadisplay is the actual value without the force for Output bits (ie: the value it will be when the force isremoved) and the forced state for Input bits. If the display format is anything other than Binary, theForced status is not displayed.

COMMAND: Force TableHOTKEY: [Alt][T]MENU: Special ; Force Table

You can load the Force Table from within the Data Table Editor for the current section (Output orInput) only. This force table is similar to the one loaded from the Ladder Editor (Chapter 10).However, [F10] will bring up the pull-down menus to access Force Table commands.

DATA TABLE EDITING - RANGE COMMANDS

Table 12-6 lists the Data Table Editor range commands. You can set/change data table valuesusing the range copy and set value commands. A range is any group of contiguous data table wordsin a single data table file. (The range does not need to be a rectangular area on the screen.) Rangecommands are not available for files with large structure types (ie: Status, PD, and MG).

Page 113: Topdoc Manual

CHAPTER 12 DATA TABLE EDITING

Pub. No. TDZ-MN1 July 28, 200012-19

Table 12-6Data Table Editor Range Commands

?444444444444;4444444444444444444444444444444444444444444444@* KEYS 5 DESCRIPTION *

G444444444444>4444444444444444444444444444444444444444444444I* [Alt][K] 5 marK a range of word addresses ** [Alt][U] 5 Unmark a range of word addresses ** [Alt][C] 5 Copy a range of values at current word ** [Alt][V] 5 set a range of words to a specified Value *

.))))))))))))J))))))))))))))))))))))))))))))))))))))))))))))-

MARKING AND UNMARKING A RANGE

COMMAND: Mark a Range Unmark a RangeHOTKEY: [Alt][K] [Alt][U]MENU: Data ; Range Mark Data ; Unmark Range

You define a range using the same procedure as in Ladder Diagram Editing. First, position thecursor on the first word value in the range and press [Alt][K] or select the command from the menu.Then, using the positioning commands, position the cursor on the last word value in the range andenter the command again. The range is displayed in a different color on the screen.

To unmark the range, you use the Unmark command.

THE COPY RANGE COMMAND

COMMAND: Copy RangeHOTKEY: [Alt][C]MENU: Data ; Copy Range

You use the copy range command to duplicate a set of word values in one location of the data tableto another location. The same command is used for Data Table Editing as in Ladder DiagramEditing.

After you have selected the range, position the cursor on the first word where the values are to becopied and enter the command.

CAUTION: TOPDOC does not restrict you from copying values acrossdata table files with different data types. You areresponsible for ensuring that the values you are copyingare in a format that makes sense in the target file.

For example, copying floating point values (which take 2 words each) intothe I/O image tables will normally not make sense, but is allowed byTOPDOC. You have the power to copy values across files with differentdata types, if you know what you want to do, but you must be careful.When you copy multi-word type data such as floating point numbers to a

Page 114: Topdoc Manual

CHAPTER 12 DATA TABLE EDITING

SoftPLC Corp., Inc. 28 July 200012-20

single word type data file such as integer, each multi-word value replacesseveral values in the single word data type file.

THE SET VALUE COMMAND

COMMAND: Set Range to a ValueHOTKEY: [Alt][V]MENU: Data ; Initialize Range

You use the set value command to set a group of data table words to a single numerical value.

After you have selected the range of words to be set, enter the command. You then need to enterthe desired value into the command buffer on line two. Enter the value and press [Enter]. All of thewords in the defined range are set to the entered value. Set Value operates in any of the displaymodes. The value you enter must be in the same format as the current display mode.

THE MAP CONTROL OPTION

COMMAND: Map ControlHOTKEY: [Alt][M]MENU: Special ; Map Control

You use the Map Control function to manually control/view the data table size. You can add anddelete data table files and change the number of words in a data table file.

When you enter the Map Control command, all the data table files are displayed in a table innumerical order. File numbers which have not been assigned a type are displayed as "unused".Data table files are in the format DDFFF:HHH where "DD" is the data type specifier, "FFF" is the filenumber, and "HHH" is the highest used element in the data table file (Figure 12-9).

Tables 12-7 and 12-8 lists the available Map Control Editing Commands. Press [Esc] to exit mapcontrol mode and return to the Data Table Editor.

6444444444F3=Prev,F4=Next, Datafile Editor=F1 for Help, F10 for Menu444444444475 Program: G:\TDZ\SPLC\OSCLJP2 55 Section: OUTPUT File: 0 Words In File: 128 55 Memory: 796 words used in 178 datatable files 55 55 MAP CONTROL 5

5+))))0)))))))))))0)))))))))))0)))))))))))0)))))))))))0)))))))))))0))))))))))),55*FILE* 0 * 1 * 2 * 3 * 4 * 5 *5

5/))))3)))))))))))3)))))))))))3)))))))))))3)))))))))))3)))))))))))3)))))))))))155* 0* O:177 * I:177 * S:127 * B003:000 * T004:000 * C005:000 *55* 6* R006:000 * N007:116 * F008:000 * N009:039 * BT010:000 * N011:000 *55* 12* unused * unused * unused * unused * unused * N017:046 *55* 18* unused * unused * unused * unused * unused * unused *55* 24* unused * unused * unused * unused * unused * unused *55* 30* unused * unused * unused * unused * unused * unused *55* 36* unused * unused * unused * unused * unused * unused *55* 42* unused * unused * unused * unused * unused * unused *5

Page 115: Topdoc Manual

CHAPTER 12 DATA TABLE EDITING

Pub. No. TDZ-MN1 July 28, 200012-21

5* 48* unused * unused * unused * unused * unused * unused *55* 54* unused * unused * unused * unused * unused * unused *55* 60* unused * unused * unused * unused * N064:039 * unused *55* 66* unused * unused * N068:039 * unused * unused * unused *55* 72* unused * unused * unused * unused * unused * N077:061 *55* 78* unused * unused * unused * unused * unused * unused *5

5.))))2)))))))))))2)))))))))))2)))))))))))2)))))))))))2)))))))))))2)))))))))))-594444444444444444444444444444444444444444444444444444444444444444444444444444448

Figure 12-9Map Control Display

After using Map Control to change the data table size offline, you should use the Ladder EditorVerify command to ensure all the file instructions reference existing addresses in the new data tablesetup.

HINT: The Ladder Editor exchange command, followed by[Enter], can also be used to re-enter the same addressinformation, and create the necessary data table area(s)since data table memory is automatically allocated duringinstruction entry.

MAP CONTROL POSITIONING COMMANDS

Table 12-7 lists the commands you can use to position the cursor on different data table sectionsand files in map control mode.

Table 12-7Map Control Positioning Commands

?44444444444444;444444444444444444444444444444444444444444444444@* KEYS 5 DESCRIPTION *

G44444444444444>444444444444444444444444444444444444444444444444I* [8] 5 Move cursor up one row in the display ** [9] 5 Move cursor down one row in the display ** [6] 5 Move cursor right one column in the display ** [7] 5 Move cursor left one column in the display ** [Ctrl][6] 5 Move cursor to next defined file ** [Ctrl][7] 5 Move cursor to previous defined file ** [Home] 5 Move cursor to beginning of line ** [End] 5 Move cursor to end of line ** [PgUp] 5 Go up one page ** [PgDn] 5 Go down one page ** [Ctrl][PgUp] 5 Go to first file ** [Ctrl][PgDn] 5 Go to last file ** [Alt][P] 5 Position on specified file number ** [Alt][Z] 5 Zoom to current data file *

.))))))))))))))J))))))))))))))))))))))))))))))))))))))))))))))))-

CHANGING THE DATA TABLE SIZE

Page 116: Topdoc Manual

CHAPTER 12 DATA TABLE EDITING

SoftPLC Corp., Inc. 28 July 200012-22

Table 12-8 lists the commands you can use to change the data table size. Each command isdescribed in this section.

Page 117: Topdoc Manual

CHAPTER 12 DATA TABLE EDITING

Pub. No. TDZ-MN1 July 28, 200012-23

Table 12-8Map Control Editing Commands

?44444444444444;4444444444444444444444444444444444444444@* KEYS 5 DESCRIPTION *

G44444444444444>4444444444444444444444444444444444444444I* [Ins] 5 Insert a data table file ** [Alt][X] 5 eXchange size of a data table file ** [Del] 5 Delete current data table file *

.))))))))))))))J))))))))))))))))))))))))))))))))))))))))-

DELETING A DATA TABLE FILE

COMMAND: Delete FileHOTKEY: [Del]MENU: Data ; Delete File

To delete a data table file, position the cursor on the unwanted data table file and press [Del]. Youare asked to confirm that you want to delete the data table file. Select Yes or No . Yes deletesthe data table file. No retains the data table file.

INSERTING A DATA TABLE FILE

COMMAND: Insert FileHOTKEY: [Ins]MENU: Data ; Insert File

To insert a data table file, press [Ins]. After you press [Ins], you are prompted for entry of the newaddress. Enter the new data table file type and number and the largest address you want to allow.The new data table file is created. You will see it added to the displayed list of data table files.

CHANGING THE SIZE OF A FILE

COMMAND: Change File SizeHOTKEY: [Alt][X]MENU: Data ; Change File Size

To change the size of an existing data table file, position the cursor on the data table file whose sizeis to be changed and enter the command. You are prompted for entry of the HIGHEST USEDELEMENT. Enter the new largest address you want to allow.

THE RECLAIM OPTION

COMMAND: ReclaimHOTKEY: [Alt][R]MENU: Special ; Reclaim

The Reclaim function can be used to delete areas of the data table that are not referenced byinstructions in the program and to create data table areas referenced but not yet created.

Page 118: Topdoc Manual

CHAPTER 12 DATA TABLE EDITING

SoftPLC Corp., Inc. 28 July 200012-24

After you enter the Reclaim command, a caution window is displayed. You can select Yes tocontinue or No to abort. After the reclaim process is complete, you are returned to the Data TableEditor Menu.

CAUTION: You need to be aware of two potential problems beforeusing Reclaim. You may want to make a backup copy ofthe program before using Reclaim.

1) There is no way of knowing what elements SoftPLC indirect addresses(es) will be eventuallypointing to.

2) If you change a SoftPLC control file length which is used to specify the length of an instructionfile then the new value, if greater than the old value, could require a larger data table file thanwhat had been previously created. In either case, you can use the Map Control function tooverride the reclaimed areas.

HINT: Offline (or Online if the PLC is in PROGRAM mode), theLadder Editor eXchange command ([Alt][X]) can also beused to create the necessary data table area(s) since datatable memory is automatically allocated during instructionentry. Simply press [Alt][X], then [Enter] to re-enter thesame instruction, addresses, and parameters.

Page 119: Topdoc Manual

PART IV

DOCUMENTATIONLABELS/COMMENTS

Page 120: Topdoc Manual

Pub. No. TDZ-MN1 July 28, 200013-1

CHAPTER 13

CROSS REFERENCING

Before you use the Ladder Diagram, Usage, or Address Reports, or use the On-Screen CrossReference display feature, you need to generate the address usage cross references for theprogram. You can use the Cross Ref option found under the main menu Utilities option togenerate the cross reference files. These functions also provide a way for you to generate the CrossReference if the file does not exist, or is older than the current program workfile - without having togo to the menu.

The cross reference information includes a list of how and where (by rung number) each data tableaddress is used in the PLC program. Multi-word instructions list references for all addresses usedin the instruction (eg: the control, File A, and File R addresses in a File to File Move instruction).

GENERATING THE CROSS REFERENCE FILES

To generate the cross reference files:

1) Select Cross Ref from the Utilities menu.2) Enter the <PATH> and <FILE> of the program to be cross referenced.3) A cross reference status window is displayed. When generating the cross reference files,

TOPDOC makes 3 complete passes through the program. The current pass and the percentcomplete is displayed in the status window during cross reference generation. When theprocess is complete, you are returned to the Utilities menu.

NOTE: If you have made any changes to the ladder diagramprogram since the last time you generated the crossreference files, you need to generate the references againbefore printing the Ladder Diagram, Usage, or AddressReports or using the on-screen cross reference displayfeature. Otherwise the reports/display may not beaccurate. A message will be displayed to warn you of thisif the program .LOB file is more recent than the crossreference file. You will have the option to continue, ifdesired.

READING THE CROSS REFERENCES

The cross references are generated for the data objects defined in Table 13-1. These data objectsare printed in the order listed in Table 13-1 on the Ladder Diagram, Usage, and Address Reports.

This concept of cross referenced objects is what makes TOPDOC's cross reference scheme socomprehensive. In addition to exact matches in the ladder logic where an address is used,

Page 121: Topdoc Manual

CHAPTER 13 CROSS REFERENCING

SoftPLC Corp., Inc. 28 July 200013-2

TOPDOC knows that there is an inter-relationship between different addresses. For example, aTimer is made up of 3 words, each of which is made up of 16 bits, and the Timer itself may be partof a Timer File. Whenever any bit, word, timer, or the timer file is used in the program it could affectthe other related objects. The "See Also" references generated by TOPDOC provide informationon these related data objects.

Table 13-1Cross Referenced Objects

?444444444;444444444444444444444444444444444444444444@* OBJECT 5 DESCRIPTION *

G444444444>444444444444444444444444444444444444444444I* BIT 5 Addresses used in instructions which ** 5 reference a single bit, such as XIC or ** 5 OTE instructions. *

/)))))))))O))))))))))))))))))))))))))))))))))))))))))1* WORD 5 Addresses used in instructions which ** 5 reference a single word, such as ** 5 arithmetic instructions. *

/)))))))))O))))))))))))))))))))))))))))))))))))))))))1* FILE 5 Addresses used in instructions which ** 5 reference a range of words, such as shift** 5 register or logical instructions. *

/)))))))))O))))))))))))))))))))))))))))))))))))))))))1* TIMER 5 References to rungs which manipulate a ** 5 timer as a whole. *

/)))))))))O))))))))))))))))))))))))))))))))))))))))))1* COUNTER 5 References to rungs which manipulate a ** 5 counter as a whole. *

/)))))))))O))))))))))))))))))))))))))))))))))))))))))1* CONTROL 5 References to rungs which manipulate a ** 5 control as a whole. *

/)))))))))O))))))))))))))))))))))))))))))))))))))))))1* STRUCT 5 References to rungs with instructions ** 5 that manipulate a structure (BT,PD,etc.) ** 5 as a whole. *

/)))))))))O))))))))))))))))))))))))))))))))))))))))))1* PROGRAM 5 References to subprograms via the JSR ** 5 instruction. *

/)))))))))O))))))))))))))))))))))))))))))))))))))))))1* LABEL 5 References to rungs containing jump or ** 5 label instructions. *

/)))))))))O))))))))))))))))))))))))))))))))))))))))))1* CONSTANT5 References to rung with instructions ** 5 with constant parameters. *

.)))))))))J))))))))))))))))))))))))))))))))))))))))))-

On the reports, within each object type, the addresses are printed in ascending order, starting withthe first data table file and ending with the last data table file in the selected range.

The cross references for each object are segregated into categories which identify how an addressis used on a particular rung. These categories are defined in Tables 13-2.

In general, read references ("RD") signify that data at an address is "looked at" in the program butnot altered, such as an XIC instruction bit. The write references ("WR") signify that data at anaddress could be altered by the program, such as an OTE instruction bit.

Page 122: Topdoc Manual

CHAPTER 13 CROSS REFERENCING

Pub. No. TDZ-MN1 July 28, 200013-3

Table 13-2(a)Cross Reference Categories

?4444444444444;444444444444444444444444444444444444444@* CATEGORY 5 DESCRIPTION *

G4444444444444>444444444444444444444444444444444444444I* RD BIT 5 Rungs where bit states are examined ** (READ BIT) 5 but not changed. *

/)))))))))))))O)))))))))))))))))))))))))))))))))))))))1* WR BIT 5 Rungs where bit states could be set ** (WRITE BIT) 5 or reset. *

/)))))))))))))O)))))))))))))))))))))))))))))))))))))))1* RD WRD 5 Rungs where word values are examined ** (READ WORD) 5 but not changed. *

/)))))))))))))O)))))))))))))))))))))))))))))))))))))))1* WR WRD 5 Rungs where word values could be ** (WRITE WORD)5 changed *

/)))))))))))))O)))))))))))))))))))))))))))))))))))))))1* RD FIL 5 Rungs where file's contents are ** (READ FILE) 5 examined, but not changed. *

/)))))))))))))O)))))))))))))))))))))))))))))))))))))))1* WR FIL 5 Rungs where files's contents could be ** (WRITE FILE)5 changed. *

/)))))))))))))O)))))))))))))))))))))))))))))))))))))))1* CALL FROM 5 Rungs where SBR instruction exists ** 5 or JSR. *

/)))))))))))))O)))))))))))))))))))))))))))))))))))))))1* TARGET 5 Rungs where LBL instruction exists. *

/)))))))))))))O)))))))))))))))))))))))))))))))))))))))1* BRANCH 5 Rungs where JMP or JSR exist. *

/)))))))))))))O)))))))))))))))))))))))))))))))))))))))1* JMP FROM 5 Rungs where JMP or JSR exist. *

/)))))))))))))O)))))))))))))))))))))))))))))))))))))))1* USED AT 5 Rungs where a constant is used. *

.)))))))))))))J)))))))))))))))))))))))))))))))))))))))-

The "SEE ALSO" references (Table 13-2(b)) list additional addresses you should reference on theAddress Report to see where the address is used. The "OVERLAPS" references list files used ininstructions whose addresses are also in the current file address.

Table 13-2(b)"SEE ALSO" Cross Reference Categories

?444444444;444444444444444444444444444444444444444444@* CATEGORY5 DESCRIPTION *

G444444444>444444444444444444444444444444444444444444I* BITS 5 See the addresses listed for other rungs ** 5 where the word or file address is used ** 5 as a bit. *

/)))))))))O))))))) ))))))))))))))))))))))))))))))))))1* WORDS 5 See the addresses listed for other rungs ** 5 where the bit or file address is used as ** 5 a word. *

/)))))))))O))))))))))))))))))))))))))))))))))))))))))1* FILES 5 See the addresses listed for other rungs ** 5 where the bit or word address is used in ** 5 a file. *

/)))))))))O))))))))))))))))))))))))))))))))))))))))))1* TIMERS 5 See the addresses listed for other rungs *

Page 123: Topdoc Manual

CHAPTER 13 CROSS REFERENCING

SoftPLC Corp., Inc. 28 July 200013-4

* 5 where the address is used as a timer. */)))))))))O))))))))))))))))))))))))))))))))))))))))))1

* COUNTERS5 See the addresses listed for other rungs ** 5 where the address is used as a counter. *

/)))))))))O))))))))))))))))))))))))))))))))))))))))))1* CONTROLS5 See the addresses listed for other rungs ** 5 where the address is used as a control. *

/)))))))))O))))))))))))))))))))))))))))))))))))))))))1* STRUCTS 5 See the addresses listed for other rungs ** 5 where the address is used as a struct. *

/)))))))))O))))))))))))))))))))))))))))))))))))))))))1* OVERLAPS5 Files listed are used in instructions ** 5 whose addresses are also used in the ** 5 current file address. *

.)))))))))J))))))))))))))))))))))))))))))))))))))))))-

ON-SCREEN CROSS REFERENCE DISPLAY

TOPDOC's On-Screen Cross Reference Display feature enables you to view the cross referencesin the Ladder and Data Table Editors and to quickly locate areas where an address is used in aprogram. This feature reads information from the Cross Reference files generated by the Cross Refoption.

ACCESSING THE DISPLAY

COMMAND: On-Screen Cross ReferenceHOTKEY: [Alt][S]MENU: Special ; On-Screen CrossRef

When you enter this command, TOPDOC displays the Cross Reference display window for thecurrent address at the cursor position (Figure 13-1). In the Ladder Editor, if the cursor is positionedon an instruction that uses more than one address, TOPDOC brings up the Parameter Select Screenand allows you to choose the address to be displayed.

64444444444444444444444444444444444444444444444444444444444444475 BIT WRD TMR Quit 55 Find bit references 5

K))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))M5 PARAMETER: T004:000 5

K)))))))))))))))))))))))))))))))))))))))))0))))))))))))))))))))M5 T004:000/12 * T004:000/DN 55 T004:000/DN * TIMER DONE? 55 T004:000/TT * 55 T004:000/EN * When timer 55 T004:000.ACC/00 * times out 55 T004:000.ACC/01 * bit goes from 55 T004:000.ACC/02 * '0' to a '1' 55 T004:000.ACC/03 * 55 T004:000.ACC/04 * 5

944444444444444444444444444444444444444444N444444444444444444448

Figure 13-1On-Screen Cross Reference Display Window

Page 124: Topdoc Manual

CHAPTER 13 CROSS REFERENCING

Pub. No. TDZ-MN1 July 28, 200013-5

ON-SCREEN CROSS REFERENCE MENU

The On-Screen Cross Reference menu has two or three choices. The first, Show XRef , allows youto examine the cross reference information for the current instruction address. The second, NewParameter , allows you to enter a new address. If the cross reference information is older than theprogram logic or data, a third option Xref displays, which allows you to regenerate the crossreference files.

SHOW XREF MENU OPTION

The Show XRef option checks the Cross Reference file and generates a menu based on theavailable reference information. You can then select the type of information you want displayed.The possible menu options are listed in Table 13-3. This information can be Bit, Word, File, Timer,Counter, or T/C Control References. The menu dynamically changes based on the type of addressselected and the information in the Cross Reference Files. Refer to Table 13-2 for additionalreference types.

Table 13-3Address Type Menu Abbreviations

?444444444444444444444444444444444;44444444444444444444444@* ADDRESS TYPE 5 MENU ABBREVIATION *

G444444444444444444444444444444444>44444444444444444444444I* Bit 5 BIT ** Word 5 WRD ** File 5 FLE ** File Overlaps 5 FFL ** Counter 5 CTR ** Timer 5 TMR ** Control 5 CTL ** Structure (BT, PD, MG, ST, SC) 5 STRUCT ** Timer/Counter/Control/Structure 5 TCC ** Label 5 LBL ** Program 5 PRG ** Constant 5 CON *

.)))))))))))))))))))))))))))))))))J)))))))))))))))))))))))-

If the selected menu option type matches the currently displayed address, TOPDOC will display thecross reference information for the address.

If the selected menu option object is of a different type than the address, TOPDOC will display a listof addresses that match both the object type and the address selected. You can then scroll throughthe list using the [8] and [9] keys. The address label for each address is displayed in the window,if it exists.

You can select an address by pressing [Enter] when it is highlighted. Additional available keystrokesare shown in Table 13-4. After you select an address, TOPDOC displays a new menu containingthe object type selections for the new address.

When positioned on any cross reference item in the list, you can "zoom" to that rung or nextoccurrence of that address with the Position command, [Alt][P].

Page 125: Topdoc Manual

CHAPTER 13 CROSS REFERENCING

SoftPLC Corp., Inc. 28 July 200013-6

Table 13-4On-Screen Cross Reference Key Sequences

?444444444444444;4444444444444444444444444444444444444444444444@* KEYS 5 DESCRIPTION *

G444444444444444>4444444444444444444444444444444444444444444444I* [8]/[9] 5 Go to previous/next address or rung number ** [Ctrl][Home] 5 Go to first line in cross reference ** [Ctrl][End] 5 Go to last line in cross reference ** [PgUp]/[PgDn] 5 Go 1 page up/down ** [Alt][P] 5 Position cursor at current rung number ** 5 or next occurrence of current address. ** [Enter] 5 Show cross reference of this address. ** 5 If cursor is on a rung number, [Enter] ** 5 does nothing. *

.)))))))))))))))J))))))))))))))))))))))))))))))))))))))))))))))-

NEW PARAMETER OPTION

The New Parameter option brings up an address entry buffer on the second line of the screen withthe previous address displayed. You can enter a new address or edit the existing entry using anyof the Command Buffer Editing commands in Table 7-1.

Once the new address is entered, you are returned to the menu.

Page 126: Topdoc Manual

Pub. No. TDZ-MN1 July 28, 200014-1

CHAPTER 14

THE TOPDOC DATABASE

A TOPDOC database is a dBaseIV format file (.dbf) that contains address labels for data tableaddresses. Each address label is used to describe a PLC data table address.

This chapter defines each field in an address label, describes some advanced uses of your databasefiles, and describes how to maintain your database files.

There are two ways to enter address labels in TOPDOC. The first is the Editor Menu option Dbase.This method is described in Chapter 16 and is usually used to enter a large number of address labelsat a time.

Alternatively, you can enter address labels one at a time in the Ladder Editor using the Label Editorcommand described in Chapter 15.

Address labels can be viewed in the Ladder Editor and are printed on the Ladder Diagram, Address,Database, and Usage Reports.

Each database file has associated index files. It is good practice to periodically reindex thedatabase files. This chapter also describes how to maintain and reindex your database files.

TOPDOC database files are stored in dBaseIV compatible format. (dBaseIV is a standard off-the-shelf database management program.) Once you have created your database in TOPDOC you canuse dBaseIV (or any other program that can read dBaseIV files) to create other reports, wiring labels,or for other database functions. See "OTHER USES OF A DATABASE" for more information.

DEFINITIONS OF ADDRESS LABEL FIELDS

This section contains the definitions of and entry guidelines for each address label field. Figure 14-1shows the Database Editor. Chapters 15 and 16 describe how to enter and edit address labels.

6444444444Entry Window44444444475 5K))))))))))))))))))))))))))))))M

5 O:000/00 PARAMETER 55 MS1 SYMBOL 5K))))))))))))))))))))))))))))))M

5 Motor XREF O/R 55 Starter <Y/N> N 55 55 FLD DWG # 55 DWG-1 594444444444444444444444444444448

Figure 14-1Database Manager Window

Page 127: Topdoc Manual

CHAPTER 14 THE TOPDOC DATABASE

SoftPLC Corp., Inc. 28 July 200014-2

PARAMETER

The 15 character PARAMETER field is used for the data table address, program, or jump labelwhich owns the database label. You enter the data table address you want to be described as youwould when entering an instruction address.

The Database recognizes different types of addresses as shown in Table 14-1. The format of theaddress you enter implies the address type, as shown in Table 14-1.

Table 14-1SoftPLC Database Address Types

?444444444;44444444444444444;44444444444444444444444444444444444@* TYPE 5 EXAMPLES 5 DESCRIPTION *

G444444444>44444444444444444>44444444444444444444444444444444444I* BIT 5 B3:15/2 5 Has a slash (/) character ** 5 I2/13 5 ** 5 B3/242 5 ** 5 T4:5.DN 5 Control bit of Timer ** 5 C5:6.OV 5 Control bit of Counter ** 5 T4:7.ACC/00 5 Bit 00 of Timer Accumulator word ** 5 #A20:19/12 5 Bit within a file word *

/)))))))))O)))))))))))))))))O)))))))))))))))))))))))))))))))))))1* WORD 5 N7:3 5 No slash (/) ** 5 F8:10 5 ** 5 T4:7.PRE 5 Preset word of Timer ** 5 #B3:8 5 Word within a File ** 5 I:[N25:01] 5 ** 5D[N7:5]: [N14:8] 5 *

/)))))))))O)))))))))))))))))O)))))))))))))))))))))))))))))))))))1* FILE 5 #F8 5 Starts with # and has no : or / ** 5 #D[N17:10] 5 ** 5 #T[T4:5][T4:4] 5 *

/)))))))))O)))))))))))))))))O)))))))))))))))))))))))))))))))))))1* TIMER 5 T4:15 5 Addresses Timer as a whole object ** 5 T28:[N7:2] 5 ** 5 T4:[T4:65.ACC] 5 *

/)))))))))O)))))))))))))))))O)))))))))))))))))))))))))))))))))))1* COUNTER 5 C5:13 5 Addresses Counter as a whole ** 5 C[N7:2]:3 5 *

/)))))))))O)))))))))))))))))O)))))))))))))))))))))))))))))))))))1* CONTROL 5 R6:21 5 Address Control as a whole ** 5 R38:[N7:4] 5 *

/)))))))))O)))))))))))))))))O)))))))))))))))))))))))))))))))))))1* STRUCT 5 MG18:3 5 File type is structured data type ** 5 ST62:81 5 ** 5 PD44:1 5 ** 5 BT11:14 5 *

/)))))))))O)))))))))))))))))O)))))))))))))))))))))))))))))))))))1* PROGRAM 5 P3 5 Starts with P ** 5 P23 5 *

/)))))))))O)))))))))))))))))O)))))))))))))))))))))))))))))))))))1* LABEL 5 L00 5 Starts with L ** 5 L14 5 *

/)))))))))O)))))))))))))))))O)))))))))))))))))))))))))))))))))))1* CONSTANT5 234 5 Is a number *

.)))))))))J)))))))))))))))))J)))))))))))))))))))))))))))))))))))-

Page 128: Topdoc Manual

CHAPTER 14 THE TOPDOC DATABASE

Pub. No. TDZ-MN1 July 28, 200014-3

NOTE: You do not have to enter labels for every data tableaddress. If no label is found for a specific address duringLadder Diagram printing, the label for the next higher leveladdress type is used in the order shown in Table 14-1.

For example, if a bit address (such as T4:003.EN) has no address label, the address label forthe word part of the bit address (T4:003) is printed on the Ladder Diagram Report.

Similarly, if a word address (such as N12:003) has no address label, the address label for a datatable file beginning with the word (#N12:003) is printed, if it exists.

TAGNAME/SYMBOL

This 13 character field can be displayed in the Ladder Editor and printed on the Ladder Report. Youcan display/print the address and tagname, or just the tagname in place of the address.

For real I/O devices, this field is intended to be a place holder for ISA tagnames, ie: TS1022. Forstorage points, you may want to enter nicknames that shed particular meaning on a point. Tagnames can consist only of letters, numbers, or underscores( _ ). Tag names must also be unique.

LABEL TEXT

Label text is the description of the address, normally a description of the actual device or the actionthe address causes in the ladder logic. The label text consists of five 13 character fields.

This description may be displayed in the Ladder Editor and printed on the Ladder Diagram Reportabove each instruction. The text is centered and is automatically bottom justified on the display.The text may be centered and is automatically bottom justified on the ladder report.

CROSSREF OVERRIDE (XREF O/R)

The XREF O/R field is used to specify whether you want to print or omit the cross referencinginformation on the Ladder Diagram Report for the current address. Enter [Y] to override the crossreference information or [N] to include cross referencing.

This field is provided because sometimes an address is used over and over. For example, acontrol/counter may be re-used many times in a series of file operations. To avoid all the referencesto that control/counter from cluttering up your Ladder Diagram Report, you can enter [Y] in this field.

Most of the time, you will enter [N] to indicate that you do not wish to override, but rather includecross referencing for the address.

FIELD DRAWING NUMBER (FLD DWG #)

Page 129: Topdoc Manual

CHAPTER 14 THE TOPDOC DATABASE

SoftPLC Corp., Inc. 28 July 200014-4

The 11 character Field Drawing Number field (Fld Dwg #) normally pertains to real I/O only.Addresses in the output and input sections of the data table are normally associated with real I/Opoints, which are sometimes documented on separate field wiring drawings. This field can be usedfor the name of the field drawing on which the device associated with a real I/O address can befound.

On the Ladder Diagram Report, the value in this field is output below instructions with input or outputsection addresses. Use of this field can make for better troubleshooting of a total system.

However, even if an address in the input or output sections has a Field Drawing Number entered,the number of the last rung that could have affected the address' status/value is printed below inputinstructions using the address. The Field Drawing Number is only printed if the address is not usedas an output on another rung.

REINDEXING DATABASE FILES

The Database index files allow address labels to be located quickly without forcing TOPDOC tosearch through the entire Database to find a specific record.

To ensure the fastest update time or to recover from certain Database related errors, you shouldperiodically reindex your Database files. You should reindex your Database whenever a largenumber of deletions have been made, if you can't retrieve an address label, or if a power outageoccurred during Database modification.

The Reindex option on the Utilities Menu is used to reindex a Database file. When you select thisoption, you are prompted for entry of a <PATH> and <FILE>. Then TOPDOC reindexes theDatabase and recreates the index file. After the reindex is complete, you are returned to the UtilitiesMenu.

NOTE: If you modify a Database using another software package,you must reindex it using the TOPDOC Reindex option.Reindex programs from other software packages will notproperly create the TOPDOC index file format.

OTHER DATABASE FUNCTIONS

Since TOPDOC uses a common file format, dBASEIV *.dbf files, for its Database records, thisinformation can also be used in a number of different ways. A Database Utility program is includedwith your TOPDOC package to allow you to manipulate the files, combine multiple files, and more.This utility is described in Chapter 27.

The remainder of this section describes some other possible database functions.

USING A DATABASE IN MULTIPLE PLC PROGRAMS

Page 130: Topdoc Manual

CHAPTER 14 THE TOPDOC DATABASE

Pub. No. TDZ-MN1 July 28, 200014-5

When you copy rungs in a program during multi-file editing, the address labels are not copiedautomatically unless you have specified this in the Editor Configuration (see Chapter 5). You mustuse Windows Explorer or the DOS copy command to copy the Database and index files for re-usein another PLC program.

For example, to copy a database, at the prompt, enter:

copy \TDZ\SPLC\<old FILE>.DB* \TDZ\SPLC\<new FILE>.DB*

This copies the existing Database file with the new name. You must also copy the index files.

copy \TDZ\SPLC\<old FILE>.AN5 \TDZ\SPLC\<new FILE>.AN5copy \TDZ\SPLC\<old FILE>.TN5 \TDZ\SPLC\<new FILE>.TN5

OTHER USES OF A DATABASE

Many software packages such as database managers, spreadsheets, and word processors can readdBaseIV compatible files such as a TOPDOC Database file. With these other packages, you areable to use TOPDOC Database files for other purposes such as custom reporting, maintenance ofa company or plant-wide information Database, or for wiring label generation.

If you are going to use another software package with your TOPDOC Database files, it is importantthat you first examine the potential consequences. Specifically, but not exclusively, you must notalter the structure of the Database records or the value of the Crossref Override (Xref O/R) field.Otherwise, your Ladder Diagrams will not print properly. Refer to the manual for your particularsoftware package for other potential consequences.

NOTE: If you sort a Database file using another software packageyou must reindex it using the Utilities menu Reindexoption before you will be able to use it with TOPDOC.

Page 131: Topdoc Manual

Pub. No. TDZ-MN1 July 28, 200015-1

CHAPTER 15

DATABASE EDITING FROM LADDERAND DATA TABLE EDITORS

This chapter describes how you can create and edit address labels during ladder editing. Chapter14 described address labels and the TOPDOC Database. This chapter also describes how you canuse the Ladder Editor Find command to search for addresses without labels.

ACCESSING THE DATABASE EDITOR

COMMAND: Label Database EditorHOTKEY: [Alt][L]MENU: (Ladder) Text ; Labels (Data Table) Special ; Label Editor

You can access the Database Editor from the Ladder Editor using the Label Database Editorcommand. Position the cursor on an instruction using the address for which you want to create/editan address label. Then invoke the Label Editor command.

To invoke the Database Editor from the Data Table Editor, use the Label Database Editor command.Position the cursor on the address for which you want to create/edit an address label. Then invokethe Label Editor command.

NOTE: If an address label is displayed above the instruction or atthe top of the Data Table Editor, but the Database editingwindow is blank when you invoke the Editor, the "Displaynext higher label" function is probably turned on. Refer toChapter 5 for more information on this feature.

If you have not previously created the Database file for this program file, a window appears askingyou if you want to do so. Select Yes to create the Database file or No to abort.

To edit another address label, you must move the cursor to another instruction or address and enterthe command again.

THE DATABASE EDITOR DISPLAY

After you invoke the Label Editor, the type of instruction determines what happens next. If theinstruction has one address, the Database editing window is displayed (Figure 15-1).

If the cursor is positioned on an instruction with more than one address, an address selection windowis displayed in the upper left corner of the screen. This window contains all of the addresses usedin the instruction.

Page 132: Topdoc Manual

CHAPTER 15 DATABASE EDITING FROM THE LADDER AND DATA TABLE EDITORS

SoftPLC Corp., Inc. 28 July 200015-2

NOTE: The cursor in the address selection window is initiallypositioned on the address whose label will be displayed onthe screen and is the only label that will be printed on lessthan 200 column wide Ladder Diagram Reports.

USING THE ADDRESS SELECTION WINDOW

You can move the cursor with the [8] and [9] keys and select the address to be documented bypressing [Enter]. The default selection is the instruction's "main" address, which is the label that willbe displayed on the screen, or printed on the Ladder Reports of less than 200 characters wide.Press [Esc] to return to the Ladder Editor.

After pressing [Enter], the database editing window is displayed (Figure 15-1).

USING THE DATABASE EDITOR WINDOW

Also, displayed at the top of the window is a menu with options Edit , Delete , Use Last , andView Last .

The PARAMETER field contains the selected address. If a label exists for the given PARAMETER,it is displayed, otherwise, the label fields are blank.

The number of parts manufactured is accumulated. If the oven temperature exceeds 400 degrees the oven is shut off until it is back in range. * I:000 I:000 B003 *

/0)] [)0)]/[)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))( ))1** 00* 02 01***B003 * **.)] [)- ** 01 * Reset the number of parts made since oven control was enabled. *B003 B003 6444444444444LABEL INPUT4444444444447*/)] [)))[ONS])))))))))))))))))))))))))))))5Delete Edit Use last View last 51

* 01 00 5Edit this label 5* Accumulate the total time that oven cont5)))))))))))))))))))))))))))))))))))5

*B003 5 B003/01 PARAMETER 5*/)] [)))))))))))))))))))))))))))))))))))))5 OVEN CONTROL TAGNAME 51* 01 5)))))))))))))))))))))))))))))))))))5*

* 5 OVEN CONTROL XREF O/R 5** 5 IS ACTIVE <Y/N> <N> 5** 5 5* Time the duration of each part which mus5 FLD DWG # 5 *B003 T004:001 +) GEQ )))))))))))), 5 5*/)] [))))]/[))))1 A > = B /))))))94444444444444444444444444444444444481

Figure 15-1Database Editing Window in Ladder Editor

The location of the Editing window will change depending on the location of the instruction on thescreen when you invoke the Editor. If the instruction is an output, the Editing window displays on

Page 133: Topdoc Manual

CHAPTER 15 DATABASE EDITING FROM THE LADDER AND DATA TABLE EDITORS

Pub. No. TDZ-MN1 July 28, 200015-3

the left lower corner of the screen. If the instruction is an input, the Editing window displays on theright lower corner of the screen. This will allow you to view the actual instruction on the rung whileit is being edited, most of the time.

THE EDIT OPTION

You use the Edit option to create a new address label or modify an existing address label.

You can enter/edit the address label exactly the same as if you were using the Dbase menu option(Chapter 16). All of the standard multi-field editing commands are available (Tables 3-1).

Once you finish editing, press [F9]. You can make the desired changes to only the fields you want,then press [F9] to accept the record any time during editing. The address label is saved in theDatabase file and you return to the menu. You can then select another option or press [Esc] toreturn to the Ladder Editor (or Address Selection window in multi-address instructions).

Press [Esc] again to return to the Ladder Editor (or Address Selection window in multi-addressinstructions).

THE DELETE OPTION

You can remove an address label from the Database file with the Delete option. After you displayan existing address label, select Delete from the menu.

The address label is removed from the Database and the entry fields are immediately cleared. Youare then returned to the menu for selection of another option. Press [Esc] to return to the LadderEditor.

THE VIEW LAST OPTION

You can see the last edited address label using the View Last option. If you are documentingaddresses with similar functions, you can use the View Last option to preview the last entry todetermine if you want to use it as a template for the current address.

When you select View Last , the last entered address label is displayed. When you are throughviewing, press any key to return to the menu.

NOTE: View Last only displays entries made in the currentediting session. If you have exited the Ladder Editor,View Last cannot be used to find entries made in priorediting sessions.

THE USE LAST OPTION

Page 134: Topdoc Manual

CHAPTER 15 DATABASE EDITING FROM THE LADDER AND DATA TABLE EDITORS

SoftPLC Corp., Inc. 28 July 200015-4

The Use Last option inserts the last edited address label for the current instruction address. Thisis an easy way of documenting addresses with the same or similar descriptions. If there are onlyminor differences between two labels, you can select Use Last and then select Edit to make thechanges.

When you select Use Last , the values for the last entered address label are entered into thedatabase for the current address. Then this menu is redisplayed. You can select Edit to make anynecessary changes, select any other option, or [Esc] to return to the Ladder Editor.

NOTE: Use Last only displays entries made in the currentediting session. If you have exited the Ladder Editor, UseLast cannot be used to find entries made in prior editingsessions.

SEARCH FOR UNLABELED PARAMETER

COMMAND: Find Unlabeled ParameterHOTKEY: [Alt][F], then Unlabeled Parameter MENU: Position ; Find Instruction/Address , then Unlabeled Parameter

To make it easier to update the Database as ladder logic changes are made and to help youdocument faster, the Unlabeled Parameter option is available on the Find command menu(Chapter 6). With this option you can search for the next instruction in the file with an address thathas no address label in the Database.

From the Ladder Editor, enter the Find command, [Alt][F], and then select Unlabeled Parameterfrom the find menu. This finds the next instruction in the program that has an address with no label.If an address is used in a multi-address instruction, the Find Unlabeled Parameter will still locatethose as undocumented.

The Database editing window and menu are then automatically displayed. You can create anaddress label or not (as previously described in this chapter). You can then search again for thenext unlabeled address or abort the search by entering [N] for no, when prompted.

Additional details on using the Find command are located in Chapter 6.

Page 135: Topdoc Manual

Pub. No. TDZ-MN1 July 28, 200016-1

CHAPTER 16

DATABASE EDITING - THE DBASE OPTION

This chapter describes how you can use the Dbase option on the Offline Editor Menu to create andedit address labels. Chapter 14 described address labels and the TOPDOC Database.

ACCESSING THE DATABASE EDITOR

You can access the Database Editor with the Dbase option on the Editor Menu. After you select Dbase , you are prompted for the <PATH> and <FILE> of the program.

If there is no existing Database file for the program name you enter, you are asked if you want oneto be created ( Yes or No ). If you select No , you are returned to the Editor Menu. If you select Yes , an empty Database file is created and you can continue.

After you enter the name of the program, the Database Manager menu is displayed (Figure 16-1).The Database Manager allows you to Edit existing entries, Add new records to the database, Create Blanks records for each address used in the program, or Delete Unused records whichexist for addresses not used in the program.

6444444444444444444444444444444Database Manager4444444444444444444444444444444475Edit Add Create Blanks Delete Unused Quit 55Edit existing database entries 5

5))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))55 FILE: \TDZ\PLC5\DEMO0RUN.dbf 55 64444444444444444444444447 5

5 5O:023/15 5 55 5O:023/17 5 644444444444Entry Window44444444444475

5 5I:022/10 5 5 555 5I:022/12 5 5 555 5T004:000/12 5 5)))))))))))))))))))))))))))))))))))55

5 5T004:000/DN 5 5 I:022/10 PARAMETER 555 5T004:000/TT 5 5 START TEST TAGNAME 555 5T004:000/EN 5 5)))))))))))))))))))))))))))))))))))55

5 5T004:000.ACC/00 5 5 A test input XREF O/R 555 5T004:000.ACC/01 5 5 for beginning <Y/N> <N> 555 5T004:000.ACC/02 5 5 free running 555 5T004:000.ACC/03 5 5 timer FLD DWG # 555 5T004:000.ACC/04 5 5 55

5 94444444444444444444444448 9444444444444444444444444444444444448594444444444444444444444444444444444444444444444444444444444444444444444444444448

Figure 16-1Database Manager

Page 136: Topdoc Manual

CHAPTER 16 DATABASE EDITING - THE DBASE OPTION

SoftPLC Corp., Inc. 28 July 200016-2

ADDRESS LIST DISPLAY

The Address List Display contains every address in your program for which documentation exists.The addresses are listed in ascending address order by "object" type in the order listed in Table 16-1.

Table 16-1Address List Display Object Order

)))))))))))))*Object Type *G444444444444I* Bits ** Words ** Files ** Timers ** Counters ** Controls ** Struct ** Programs ** Labels ** Constants *.))))))))))))-

The cursor can be scrolled through the address list to view the existing documentation (displayedin the Database Entry Display). Table 16-2 lists the commands you can use in the address window.

Table 16-2Address Window Commands

?444444444444444;444444444444444444444444444444444444444444444444@* KEYS 5 DESCRIPTION *

G444444444444444>444444444444444444444444444444444444444444444444I* [8]/[9] 5 Move cursor up/down one line ** [PgUp]/[PgDn] 5 Move cursor to previous/next page of addresses** [Ctrl][PgUp] 5 Move cursor backward three pages ** [Ctrl][PgDn] 5 Move cursor forward three pages ** [Alt][F] 5 Find an address ** [Ins] 5 Insert new label ** [Del] 5 Delete label ** [Enter] 5 Edit current label *

.)))))))))))))))J))))))))))))))))))))))))))))))))))))))))))))))))-

DATABASE ENTRY DISPLAY

The Database Entry display contains the designated label fields. Parameter, Symbol, the LabelText, XREF O/R (Cross Reference Override), and the FLD DWG # (Field Drawing Number) arediscussed in detail in Chapter 14.

When the cursor is located in the PARAMETER field, press [Enter] to move to the SYMBOL field.Use [End], [6] or [7] to move the cursor within these fields. Then enter or edit the label text.

Page 137: Topdoc Manual

CHAPTER 16 DATABASE EDITING - THE DBASE OPTION

Pub. No. TDZ-MN1 July 28, 200016-3

While located in the Label Text Field, you can use the commands listed in Table 3-1. If you entera label more than 13 characters in length, the text will automatically wrap around to the next line.Pressing [Enter] will also move the cursor to the beginning of the next line.

To move to the XREF O/R field, press [Enter] or [9] when positioned on the last line of the LabelText Field. Enter Y or N. [Enter] or [9] to move the cursor to the FLD DWG # (Field DrawingNumber) area.

Enter the FLD DWG # in the 11 character field. Use [F9] or [Enter] to exit the entry window andsave OR press [Esc] to exit and abort.

HINT: You can press [F9] at any time to save the record anddisplay the menu.

THE ADD OPTION

The Add option allows you to add new address labels to the Database. When you select Add ,the Entry window is displayed and you can enter a value in the PARAMETER field. The address listis not displayed.

If the address you enter already has a label, the information will be displayed. If the address youenter does not have a label, the blank fields are displayed. You may create or modify the label orpress [F9] to leave the fields as they are. Refer to Tables 5-1 for the available commands.

A menu is displayed with the options Insert , Carry , Abort , and Quit . If you press [Esc] or Quit at the menu, you go back to the Database Manager.

THE INSERT OPTION

The Insert option will add the currently displayed address label in the Database file. When youselect Insert , the label is saved, the entry fields are cleared, and you are prompted to enter anotherparameter.

THE CARRY OPTION

The Carry option enters the displayed address label into the database and retains the text in thewindow as a template for the next address label.

After the address label is saved, the PARAMETER field is incremented by one to the next availableaddress of the same object type (ie: bit, word). You can then use the new address, change theaddress and/or change the values in the remaining fields of the address label. When you press[Enter] on the last field (or [F9] from any field), the menu will be redisplayed.

THE ABORT OPTION

Page 138: Topdoc Manual

CHAPTER 16 DATABASE EDITING - THE DBASE OPTION

SoftPLC Corp., Inc. 28 July 200016-4

The Abort option does not save the displayed address label in the Database. You can use thisoption if you do not want to keep the current address label. If a label existed previously, this optiondoes not delete it, only the changes are aborted. The database entry window is redisplayed afteryou select this option, and you can enter another address label or press [Esc] to quit editing.

THE QUIT OPTION

The Quit option enters the displayed address label into the database and returns you to theDatabase Manager. If you forget to save the currently displayed address label when using theInsert option, Quit automatically enters the information into the database for you when you exit.

THE EDIT OPTION

The Edit option allows you to create new records or modify, copy or change the address ofdatabase records. This section describes how to use the Edit option.

If no documentation exists for the selected file, a message will be displayed indicating that thedatabase is empty. The [Esc] key will return you to the Database Manager window to use the Addoption or Quit the Database Editor.

When you select Edit , two windows are displayed, an address list and the entry window. On theleft side of the screen, the file name is displayed above the address list.

The cursor will be positioned on the first address in the address list window. On the right side of thescreen, the Database Entry window is displayed. The Entry Window contains the address label forthe address indicated by the cursor. As the cursor moves through the address list, the correspondingDatabase information is simultaneously displayed in the Entry window.

INSERTING A NEW RECORD

When the cursor is positioned anywhere in the address window, pressing the [Ins] key allows youto insert a new address label. The cursor moves to the Entry Window PARAMETER field. Enterthe appropriate values. Refer to Tables 3-1 for the available editing commands.

After the information has been entered, press [F9] to accept the current values. After entry, thecursor returns to the address window positioned on the newly inserted address. You can then useany commands in Table 16-2.

DELETING A RECORD

To delete a Database record use the [Del] key. Position the cursor on the address correspondingto the record to be deleted. Then check the Entry Window to be sure this is the correct record.Press [Del] to remove the record from the database.

Page 139: Topdoc Manual

CHAPTER 16 DATABASE EDITING - THE DBASE OPTION

Pub. No. TDZ-MN1 July 28, 200016-5

A window will be displayed for you to confirm the deletion (select Yes or No ). If you select Yes,the label will be deleted and the cursor will return to the address window, positioned on the nextaddress in the window. If you select No , the label will remain and the cursor will be positioned onthat address in the window.

CHANGING AN ADDRESS LABEL

To change an existing address label, position the pointer on the address whose label is to bechanged and press [Enter]. The cursor moves to the Entry window and a menu with options Edit, Copy , Address , and Quit is displayed at the top of the Entry window. Quit returns you tothe address window.

THE EDIT OPTION

The Edit option allows you to change an address label's record but not its address. When Editis selected, the cursor moves to the symbol field to allow you to modify the existing information.Pressing [F9] from any field saves the record and returns the cursor to the address window.

Table 16-2 describes the positioning commands and Table 3-1 lists the editing commands in theaddress window. [Esc] aborts the current changes and returns you to the Entry Window Menu.

THE COPY OPTION

The Copy option allows you to copy the currently selected database record to a new address.When you select Copy from the menu, you are prompted to enter an address to which thedatabase record will be copied. Enter the address and press [Enter]. The database record will becopied to the new address and the cursor will return to the address window, positioned on theaddress you copied from.

THE ADDRESS OPTION

The Address option allows you to change the address for an existing Database record. UnlikeCopy, the Address option does not create a new record.

Select Address from the Entry Window Menu and enter the new address, followed by [Enter]. Thedatabase record is now associated with only the new address. The cursor is returned to the addresswindow, positioned on the new address.

THE CREATE BLANKS OPTION

The Create Blanks option will automatically create blank database records for addresses used inthe program that do not currently have database records.

This option can be used to create a template set of records that require documentation that can thenbe exported to a database, spreadsheet or word processing program for entry (for example).

Page 140: Topdoc Manual

CHAPTER 16 DATABASE EDITING - THE DBASE OPTION

SoftPLC Corp., Inc. 28 July 200016-6

Page 141: Topdoc Manual

CHAPTER 16 DATABASE EDITING - THE DBASE OPTION

Pub. No. TDZ-MN1 July 28, 200016-7

THE DELETE UNUSED OPTION

The Delete Unused option automatically removes all records in the database that exist foraddresses not used in the program.

Page 142: Topdoc Manual

Pub. No. TDZ-MN1 July 28, 200017-1

CHAPTER 17

RUNG COMMENT EDITING

This chapter describes how you can create and modify rung comments with the Rung CommentEditor. You can create new comments, copy comments from other areas of the program or fromexternal text files, and export comments to external files.

A rung comment is a block of text associated with a particular rung of ladder logic. Each commentcan be up to 195 characters per line and several hundred lines long, up to 32 Kbytes in size (about3 to 8 pages of text). When a rung is copied, moved, or deleted, the comment is also affected. Youcan also use comments to print subtitles on the Ladder Diagram Report (see "SUBTITLES").

Rung comments in TOPDOC are intelligently synchronized to their respective rung. When the rungmoves, the rung comment will follow, even if the rung was moved in the PLC by an external device.This means that your rung comments do not "un-attach" when you:

@ import a program which has been edited with an external device@ copy/move rungs within a program or when using multi-file editing@ make online edits

When you attach a comment to a rung with an -(L)- instruction with any address, the correspondingrung with an -(U)- instruction with the same address will NOT have the same comment.

COMMENTS ON THE LADDER DIAGRAM REPORT

On the Ladder Diagram Report, comments are printed above their corresponding rungs. You cancenter your comments over the printed rung by setting the tab width in the Rung Comment Editorduring creation of your comment or by setting the comment margin in the Printer Setup.

The Ladder Diagram Report prints rungs using 125 through 200 character lines. Be sure yourcomment lines do not exceed the number of characters you use for your Ladder Report or they willbe truncated.

You can select to not print comments on the Ladder Report. If you do this, subtitles will also notprint.

COMMENT DISPLAY IN THE LADDER EDITOR

You decide how comments are to be displayed in the Ladder Editor:

1) The [F4] key or the menu options View ; Rung Comment Toggle can be used to toggle thedisplay of comments on and off in the Ladder Editor.

Page 143: Topdoc Manual

CHAPTER 17 RUNG COMMENT EDITING

SoftPLC Corp., Inc. 28 July 200017-2

2) The Editor configuration determines the number of comment lines to be displayed, the locationof the lines, and the tab width to be used in comment display. This is described in more detailin Chapter 5.

Comment lines of more characters than the current screen display width are truncated in the display.

ACCESSING THE RUNG COMMENT EDITOR

COMMAND: Rung Comment EditorHOTKEY: [Alt][R]MENU: Text ; Rung Comments

You can only edit the comment for the current rung in the Ladder Editor. Position the pointer on therung associated with the comment you want to enter/change.

Enter/select the Rung Comment Editor Command to display the Comment Editor menu and editingbuffer. If the rung already had a comment, it is displayed in the editing window.

Using the Rung Comment Editor is similar to using the Ladder Editor. You work within a window (or"buffer") to create and edit a comment using a variety of special commands and then, using a menu,decide what to do with the buffer (ie: write it to disk, delete it, etc.).

RUNG COMMENT EDITOR MENU OPTIONS

The Rung Comment Editor Menu has 7 options briefly described in Table 17-1, and detailed in latersections of this Chapter.

Page 144: Topdoc Manual

CHAPTER 17 RUNG COMMENT EDITING

Pub. No. TDZ-MN1 July 28, 200017-3

Table 17-1Comment Editor Menu Options

?4444444444;44444444444444444444444444444444444444444444444444444444444444444444444444444444@* OPTION 5 DESCRIPTION *G4444444444>44444444444444444444444444444444444444444444444444444444444444444444444444444444I* APPEND 5 Adds an external text file or another comment to the current comment. */))))))))))O))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))1* DELETE 5 Removes a comment from the current rung without disturbing the rung itself. */))))))))))O))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))1* EDIT 5 Allows you to create and modify comments. */))))))))))O))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))1* LOAD 5 Brings an external text file into the Rung Comment Editor. */))))))))))O))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))1* QUIT 5 Returns you to the Ladder Editor saving the buffer contents as the current ** 5 rung's comment. */))))))))))O))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))1* VIEW 5 Shows you another comment or external text file without affecting the current ** 5 comment. */))))))))))O))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))1* WRITE 5 Saves a comment on disk as an external text file. *.))))))))))J))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))-

THE EDIT OPTION

You use the Edit option on the Rung Comment Editor Menu to create and modify rung comments.Remember that you can always press [F1] while editing to get a list of available commands.

After you select Edit , your cursor is positioned in the editing window. You use the entire screenfor editing comments except for the top two lines. You are automatically placed into insert modeand positioned at the upper left corner of the editing window. You can now enter or change thecomment text.

Line 2 displays a <FILE>. This is the default <FILE> given to your comment should you decide tosave it to disk. The default name is composed of the <PATH> for the program file and the rungnumber. For example, rung P2/5 would have default <FILE> of "\TDZ\SPLC\P2/5.TXT". You canchange the default <FILE> using the reName command ([Alt][N]).

Line 1 displays status information including the current line and column number, the remainingnumber of bytes (out of the 32 Kbytes allowed) and the total number of lines used. Line 1 alsodisplays the current mode of operation and an optional command buffer, which appears whenadditional information is required for a selected command.

Using the Rung Comment Editor is similar to using any text editor or word processor. The RungComment Editor does not automatically wrap to the next line, you must press [Enter] to go to thenext line.

You can use the [Ins] key to toggle between insert and exchange (overstrike) modes. The differencebetween the two modes is that in insert mode characters are added and in exchange mode newcharacters overwrite the existing ones.

Page 145: Topdoc Manual

CHAPTER 17 RUNG COMMENT EDITING

SoftPLC Corp., Inc. 28 July 200017-4

All of the editing commands listed in Table 17-2 and the positioning commands listed in Table 17-6are available in both insert and exchange modes.

Table 17-2Rung Comment Editing Commands

?44444444444444444;4444444444444444444444444444444444444444444444@* KEYS 5 DESCRIPTION *

G44444444444444444>4444444444444444444444444444444444444444444444I* 5 COMMENT LINE EDITING ** [Ins] 5 Toggle insert/exchange modes ** [Alt][B] 5 Back out edits to current line ** [Enter] 5 Insert line after current line ** [Ctrl][B] 5 Insert line after current line ** [Ctrl][U] 5 Insert line before current line ** [Ctrl][C] 5 insert a Control character after cursor ** [Alt][S] 5 Split current line into two lines ** [Alt][J] 5 Join two lines into one ** [Alt][T] 5 set Tab stops ** [Del] 5 Delete current character ** [BkSp] 5 Delete prior character (Insert mode) ** 5 Move to prior character (Exchange mode) ** [Ctrl][BkSp] 5 Delete current line ** [Alt][E] 5 delete from cursor to End of line *

/)))))))))))))))))O))))))))))))))))))))))))))))))))))))))))))))))1* 5 RANGE EDITING ** [Alt][K] 5 marK a range of lines ** [Alt][U] 5 Unmark a range of lines ** [Alt][D] 5 Delete a range of lines ** [Alt][M] 5 Move a range of lines before current line ** [Alt][C] 5 Copy a range of lines before current line *

/)))))))))))))))))O))))))))))))))))))))))))))))))))))))))))))))))1* 5 OTHER COMMANDS ** [Alt][I] 5 Interchange (global search & replace) ** [Alt][N] 5 reName the current file ** [Esc] 5 Quit the editing session *

.)))))))))))))))))J))))))))))))))))))))))))))))))))))))))))))))))-

COMMENT LINE EDITING COMMANDS

There are 12 commands you can use to edit single comment lines. These are classified as insertcommands, delete commands, and miscellaneous other commands. There are also 3 commandsused for general editing purposes. Each is described in this section.

Page 146: Topdoc Manual

CHAPTER 17 RUNG COMMENT EDITING

Pub. No. TDZ-MN1 July 28, 200017-5

Insert Commands

Table 17-3 lists the insert commands and explains how to use them.

Table 17-3Comment Editor Insert Commands

?44444444444444;444444444444444444444444444444444444444444444444@* KEYS 5 DESCRIPTION *

G44444444444444>444444444444444444444444444444444444444444444444I* [Enter] or 5 Inserts line after current line. The cursor ** [Ctrl][B] 5 is positioned at the same location as the ** 5 beginning of the prior line (automatic indent ** 5 feature). ** [Ctrl][U] 5 Inserts line before current line ** [Ctrl][C] 5 inserts a Control character after cursor *

.))))))))))))))J))))))))))))))))))))))))))))))))))))))))))))))))-

Delete Commands

Table 17-4 lists the delete commands and explains how to use them.

Table 17-4Comment Editor Delete Commands

?4444444444444444444;444444444444444444444444444444444444444444@* KEYS 5 DESCRIPTION *

G4444444444444444444>444444444444444444444444444444444444444444I* [Del] 5 Delete character under cursor ** [Backspace] 5 Delete prior character (Insert mode) ** 5 Move to prior character (Exchange mode) ** [Ctrl][Backspace] 5 Delete current line ** [Alt][E] 5 delete from cursor to End of line *

.)))))))))))))))))))J))))))))))))))))))))))))))))))))))))))))))-

Special Function Commands

Table 17-5 lists the special function commands and explains how to use them.

Page 147: Topdoc Manual

CHAPTER 17 RUNG COMMENT EDITING

SoftPLC Corp., Inc. 28 July 200017-6

Table 17-5Comment Editor Special Function Commands

?4444444444;444444444444444444444444444444444444444444444444444444444444444444444444444444444444444@

* KEYS 5 DESCRIPTION *

G4444444444>444444444444444444444444444444444444444444444444444444444444444444444444444444444444444I

* [Alt][S] 5 Splits current line into two lines the character after the cursor. The new line is *

* 5 positioned after and begins at the same column as the current line (automatic indent *

* 5 feature). This command is comparable to inserting a carriage return. *

/))))))))))O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))1

* [Alt][J] 5 Joins two lines into one. The line after the current line is placed at the end of *

* 5 the current line. This command is comparable to deleting a carriage return. *

/))))))))))O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))1

* [Alt][T] 5 Sets tab stops. At the prompt, enter the desired distance between tab stops. The *

* 5 default is 8. Tab stops remain set until a new tab width is selected. *

/))))))))))O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))1

* [Alt][B] 5 Backs out edits to current line (undo command). This command returns the current *

* 5 line to its original state before edits were made so long as the cursor has not been *

* 5 moved from the line. *

/))))))))))O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))1

* [Alt][N] 5 Renames the current comment. The Rung Comment Editor prompts for entry of the *

* 5 new <FILE> on line 1. The name of the comment is displayed on line 2. *

.))))))))))J))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

SAVING A COMMENT

When you have finished entering/editing a comment, press [Esc]. This returns you to the CommentEditor Menu.

You can select the Quit option or press [Esc] to save the comment and return to the Ladder Editor.

COMMENT EDITOR POSITIONING COMMANDS

You can use 17 cursor positioning commands in the Comment Editor. Table 17-6 lists thesecommands.

Table 17-6

Page 148: Topdoc Manual

CHAPTER 17 RUNG COMMENT EDITING

Pub. No. TDZ-MN1 July 28, 200017-7

Comment Editor Positioning Commands?4444444444444444;44444444444444444444444444444444444444444444444@

* KEYS 5 DESCRIPTION *G4444444444444444>44444444444444444444444444444444444444444444444I

* [8] 5 Go to prior line ** [9] 5 Go to next line ** [6] 5 Go to next character ** [7] 5 Go to prior character ** [Ctrl][6] 5 Go to next word ** [Ctrl][7] 5 Go to prior word ** [Home] 5 Go to first character on current line ** [End] 5 Go to last character on current line ** [Ctrl][Home] 5 Go to first character in comment ** [Ctrl][End] 5 Go to last character in comment ** [PgUp] 5 Go up one screen (24 lines) ** [PgDn] 5 Go down one screen (24 lines) ** [Ctrl][PgUp] 5 Scroll up ** [Ctrl][PgDn] 5 Scroll down ** [Alt][P] 5 Position cursor at specified line number ** [Alt][F] 5 Find next occurrence of a string ** [Alt][L] 5 List all occurrences of a string *

.))))))))))))))))J)))))))))))))))))))))))))))))))))))))))))))))))-

The positioning commands move the cursor as indicated as soon as the key sequence is enteredexcept for the position command ([Alt][P]) which first prompts you for the desired line number.

Scrolling Commands

You can scroll the comment text up or down in the editing window using the 2 scrolling commands:

[Ctrl][PgUp] = Scroll up[Ctrl][PgDn] = Scroll down

To use these commands enter the desired key sequence to begin the scrolling motion. You can usethe space bar to start and stop the scrolling or press any key to abort.

Search Commands

You can search for a character string in a comment in two ways:

[Alt][L]: List Command. Enter this command to list all occurrences of a character string (within arange of lines) on the screen. Each occurrence is shown with its line number location. Youcan pause and restart the list by pressing the space bar. Press any other key to abort.

After you press [Alt][L], a "Search, line#s:" prompt appears on line 1. You can search theentire comment by pressing [Enter], or you can search within a range of lines. Details onselecting a range of lines are described later in this Chapter.

[Alt][F]: Find command. Enter this command to position the cursor on the next occurrence of acharacter string in the comment.

Page 149: Topdoc Manual

CHAPTER 17 RUNG COMMENT EDITING

SoftPLC Corp., Inc. 28 July 200017-8

For both search commands, the Rung Comment Editor prompts for "Search mask:" on line 1. Youmust enter the character string you wish to search for. To search again for same string, enter thecommand and press [Enter] when prompted for "Search mask:".

You can use the "?" character as a wildcard character in your "Search mask:". For example, tosearch for all occurrences of the words "their", "there", or "these" enter "the??" as the "Searchmask:".

INTERCHANGE COMMAND (SEARCH/REPLACE)

The interchange command, [Alt][I], searches for a character string and replaces it with anothercharacter string (global search and replace).

After you press [Alt][I] a "Search, line#s:" prompt appears on line 1. You can search and replacethroughout the entire comment by pressing [Enter] or you can search and replace within a range oflines. Details on selecting a range of lines are described later in this Chapter.

When you enter the interchange command, the Rung Comment Editor prompts for a "Search mask:"on line 1. This is the character string you wish to search for.

After you enter the search mask, the Rung Comment Editor prompts for "Change mask:", thereplacement character string. Enter the new character string you want.

The Rung Comment Editor finds the first occurrence of the "Search mask:", highlights the line, anddisplays the following prompt on line 1:

replace? (y/n/all)

Enter the first letter of your choice. If "y", the highlighted occurrence will be replaced and the RungComment Editor searches for the next occurrence. If "n", the highlighted occurrence will remain thesame and the Rung Comment Editor searches for the next occurrence. If "a", all occurrences arereplaced with no further prompting. To abort, press [Esc].

To search again for the same string or to replace another string with the same "Change mask:",press [Enter] when prompted for "Search mask:" or "Change mask:."

You can use the "?" character as a wildcard character in your "Search mask:". For example, toreplace all occurrences of the words "their", "there", or "these" with "theme" enter "the??" as the"Search mask:" and "theme" as the "Change mask:".

RANGE EDITING COMMANDS

The range commands are similar to the Ladder Editor range commands and give you access to thecut and paste features of the Rung Comment Editor. A range can be a single line or a group ofcontiguous lines in a comment. You can select a range of lines and delete, move, or copy them.Table 17-7 lists the Comment Editor range commands.

Table 17-7

Page 150: Topdoc Manual

CHAPTER 17 RUNG COMMENT EDITING

Pub. No. TDZ-MN1 July 28, 200017-9

Comment Editor Range Commands?444444444444;44444444444444444444444444444444444444444444@

* KEYS 5 DESCRIPTION *G444444444444>44444444444444444444444444444444444444444444I

* [Alt][K] 5 Mark a range of lines ** [Alt][U] 5 Unmark a range of lines ** [Alt][D] 5 Delete a range of lines ** [Alt][M] 5 Move a range of lines before current line ** [Alt][C] 5 Copy a range of lines before current line *

.))))))))))))J))))))))))))))))))))))))))))))))))))))))))))-

Defining a Range

There are two ways to define a range in the Rung Comment Editor -- the mark range command,[Alt][K], and by entering the line numbers in the range.

Marking a Range With [ALT][K]:

You can mark a range by pressing [Alt][K] when the cursor is located on the first line of the desiredset of lines. Next, using the positioning commands, move the cursor to the last line of the desiredset and press [Alt][K] again.

You can mark a range in either direction - up or down from the current line. You see the lines in therange as highlighted on the screen.

NOTE: If the range only consists of a single line, you only need topress [Alt][K] once, not twice.

You can define only one range at a time. To define a new range, you need to Unmark the previouslydefined range ([Alt][U]).

Defining a Range With Line Numbers:

After you enter the range copy, move, or delete commands, the Rung Comment Editor prompts for"Line #'s:" on line 1. If you have marked a range using the [Alt][K] command, you can press [Enter]to execute the command on the marked range.

If you have not marked a range, or want to override the marked range, you can define a range usingthe numbers of the comment's lines. To do so, at the "Line #s:" prompt, enter the line numberscorresponding to the desired range (separated by a comma) and press [Enter]. This causes theRung Comment Editor to execute the command on the range defined by the entered line numbers(inclusive). For example, to define a range of lines 4 through 9 enter [4][,][9] [Enter] at the "Line #'s:"prompt.

Copying a Range

By using the Copy command, [Alt][C], you can create a duplicate set of lines. The copied lines areplaced above the line where the cursor is positioned.

Page 151: Topdoc Manual

CHAPTER 17 RUNG COMMENT EDITING

SoftPLC Corp., Inc. 28 July 200017-10

To use the copy command, define the range to be copied, move the cursor to the line after thedesired location of the identical lines, and press [Alt][C].

You can copy the same set of lines again without having to remark since the range is still markedafter a copy command is executed.

Deleting a range

You can remove a defined range of lines using the delete range command, [Del][K]. Simply definethe range and press [Del][K]. All the lines in the range are removed from the comment. The cursordoes not have to be located within the range to use this command, you can be on any line in thecomment.

Moving a range

With the move command, [Alt][M], you can physically move a range of lines from their old locationto a new location. The lines are placed above the line where the cursor is positioned.

To use the move command, define the range to be moved, position the cursor on the line after thedesired new location, and press [Alt][M].

Unmarking a Range

You must unmark a range, defined with [Alt][K], before you can mark another. The Unmarkcommand is [Alt][U]. You can unmark a range at any time, from any position.

THE DELETE OPTION

You can delete a comment two different ways. By deleting the rung associated with a comment youalso delete the comment. In addition, the Comment Editor Menu option Delete can be used toremove the comment without disturbing its associated rung.

To use the Comment Editor to delete a comment, position the pointer on the rung containing thedesired comment in the Ladder Editor. Bring up the Rung Comment Editor. The comment isdisplayed in the editing window.

Select the Delete option. A prompt appears on line 1 "delete the whole buffer? (y/n)". Enter "y"to delete the entire comment or "n" to abort.

THE WRITE OPTION

With the Write option, you can save a comment to disk as an external text file. The default <FILE>is displayed on line 2. You can change the filename with the reName command [Alt][N] (Table 17-

Page 152: Topdoc Manual

CHAPTER 17 RUNG COMMENT EDITING

Pub. No. TDZ-MN1 July 28, 200017-11

2). We recommend you name your files with a .TXT extension so they can be easily loaded intoTOPDOC later.

After you select Write , a prompt appears on line 1 "write file (Y/N)". If you enter [Y] (for yes), thefile is saved with the name on line 2 and you are returned to the menu. If you enter [N] (for no), youare returned to the menu.

The Write option is extremely useful. You can use it to save comments for later re-use in otherprograms or to save them as external text files for other uses.

USING EXTERNAL FILES AND REUSING COMMENTS

At times, a comment is similar to an existing comment in the current program file or to an externaltext file on your computer disk (created using TOPDOC, another editor, or a word processingprogram). With the Comment Editor, you can use other comments or external files as newcomments or to modify existing comments.

Any comment in the current program file can be re-used for another rung in the same program file.If you want to use a comment in another program file, you need to save it to disk (using the Writeoption), and follow the instructions for using external text files as comments in this section.

Any external file can be added to a comment so long as it in standard DOS text format and is lessthan 32 Kbytes in size. Most program editors create compatible text files and most word processingprograms provide an option to save a file as a DOS text file.

THE VIEW OPTION

You can use the View option to look at a comment or external text file without modifying thecurrent comment. When you select View , a menu with the options File or Rung Comment isdisplayed.

With File , you can look at any external text file. If you select this option, you are prompted tosupply the desired <FILE>. You must also enter the complete <PATH>.

With Rung Comment , you can look at any other comment in the current program file. If you selectthis option, you are prompted for the rung number of the desired comment.

Once you have selected what you want to view, the text begins scrolling up from the bottom of thescreen. You can use the space bar to start and stop the scrolling or press any key to abort. Whenall the text has been displayed, press any key to return to the menu.

Page 153: Topdoc Manual

CHAPTER 17 RUNG COMMENT EDITING

SoftPLC Corp., Inc. 28 July 200017-12

THE LOAD OPTION

You can use the Load option to import an external text file or a rung comment saved as a text fileinto an empty editing window. After you select Load , a menu with the options File or RungComment is displayed.

With File , you can look at any external text file. If you select this option, you are prompted tosupply the desired <FILE>. You must also enter the complete <PATH>.

With Rung Comment , you can load a previously saved comment text file, provided it was savedwith a .TXT extension.

The Rung Comment Editor then copies the specified external text file and returns you to the menufor selection of another option. The original external text file is not affected by any changes youmake in the Rung Comment Editor (unless you Write the comment to the original <FILE>).

You cannot use Load to add an external text file to an existing comment, only to create a newcomment. The Append option is used to add an external text file to an existing comment.

THE APPEND OPTION

You can use the Append option to add either a comment in the current program file or an externaltext file to the current comment. When you select Append , a menu with the options File orRung Comment is displayed.

With File , you can insert any external text file before the current cursor location. If you select thisoption, you are prompted to supply the desired <FILE>. You must also enter the complete <PATH>.The file must have a .TXT extension.

With Rung Comment , you can insert any other comment in the current program file before thecurrent cursor location. If you select this option, you are prompted for the rung number of thedesired comment.

After the text has been inserted, you are returned to the menu for selection of another option.

SUBTITLES

You can use subtitles in a comment to customize your Ladder Diagram Reports. Any definedsubtitles will replace the words "LADDER DIAGRAM" on line 5 of the Ladder Diagram Report.Subtitles are useful to define regions of the ladder program that perform a specific function.

When a subtitle is encountered during printing of the Ladder Diagram Report, a new page is begunand the subtitle is printed on line 5. The remainder of the comment (if any more text exists) and the

Page 154: Topdoc Manual

CHAPTER 17 RUNG COMMENT EDITING

Pub. No. TDZ-MN1 July 28, 200017-13

rung are then printed as usual. The same subtitle is printed on each page until a new subtitle isencountered.

The Ladder Editor displays subtitles as they are entered in the Comment Editor. Subtitles do notaffect the ladder display.

Subtitles must be entered with a specific format which is:

@SUBTITLE:<subtitle text>@

The "@" symbols must be on the same line of the comment and the word "SUBTITLE" must becapitalized and followed by a colon. Any characters after the colon and prior to the closing "@"symbol are the subtitle text that is printed on the Ladder Diagram Report. You should not have anyother comment text on the line containing the subtitle. You can have multiple subtitles within asingle comment, if desired.

Figure 17-1 shows a comment with an example of a subtitle and Figures 17-2 show the result on theLadder Diagram Report.

+)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))),* Append Delete Edit Load View Write Quit ** Enter edit mode *

/))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))1* @SUBTITLE:CHECK PART TOLERANCES@ ** A part passing 2LS latches SB1 if the height >=0.9 inch. SB1 r** . ** :

Figure 17-1Sample Rung Comment Subtitle

TOPDOC for SoftPLC by SoftPLC Corp. 4.4source : \TDZ\SPLC\1TDZDEMO created: Wed Apr 18 14:23:04 1999 THIS IS A DEMO PROGRAM page 1printed: Wed Apr 18 14:28:00 1999

LADDER DIAGRAM--------------

* Retentive * * Open good timer for * * part swingarm jam condition* * I:010 T4:0 *

P2/7 /0)))))] [)))))0)))))))))))))))))))))))))))))))))))))))))(RES)))))1 ** 06 * * ** Start * * ** Pushbutton * * ** I:010 * * *.)))))] [)))))- * * 01 *

Figure 17-2(a)Ladder Diagram Report Containing Subtitle

Page 155: Topdoc Manual

CHAPTER 17 RUNG COMMENT EDITING

SoftPLC Corp., Inc. 28 July 200017-14

TOPDOC for SoftPLC by SoftPLC Corp. 4.4source : \TDZ\SPLC\1TDZDEMO created: Wed Apr 18 14:23:04 1999 THIS IS A DEMO PROGRAM page 2printed: Wed Apr 18 14:28:07 1999

CHECK PART TOLERANCES---------------------

A part passing 2LS latches SB1 if the height >= 0.9 inches. SB1 remains unlatched if the height < 0.9 inches.

*Part greater Part greater * * in height in height * *than .9 inch than .9 inch * * I:010 B0000 *

P2/7 /)))))] [))))))))))))))))))))))))))))))))))))))))))))))))(L)))))))1 * 04 00 *

Figure 17-2(b)Ladder Diagram Report Containing Subtitle

THE COMMENT UTILITY PROGRAM

Included in the TOPDOC installation is a Comment Support Program entitled CMT5.EXE. Thisprogram allows you to manipulate the TOPDOC Rung Comment File (.CMT), or a GeneralComment Format File (.GCT).

Using this program you can use other editors to create your rung comments, move rung commentsfrom one program to another, and recover unsynchronized comments.For more information on CMTx.EXE program and the options available with it, refer to Chapter 27.

Page 156: Topdoc Manual

PART V

REPORTS

Page 157: Topdoc Manual

THIS PAGE INTENTIONALLY LEFT BLANK

Page 158: Topdoc Manual

CHAPTER 17 RUNG COMMENT EDITING

Pub. No. TDZ-MN1 28 July 200018-1

CHAPTER 18

DOCUMENTOR OVERVIEW

This chapter provides an overview of the TOPDOC Documentor, including general printingprocedures that apply to each report and printer setup. No matter which report you choose toprint, there are some general procedures for printing and common information on all the reports. This Chapter explains them so that they need not be repeated in each report chapter.

You can print up to 6 different reports with the TOPDOC Documentor. These are selected fromthe Main Menu option Document and include:

Ladder This option prints the LADDER DIAGRAM REPORT which includes the ladderlogic with cross reference information, rung comments, and address labels. Thisreport is described in Chapter 19.

Address This option prints a detailed ADDRESS REPORT which prints for each datatable address used in the program, the current value, address label, and crossreference information. This report is described in Chapter 20.

Usage This option prints the address USAGE REPORT which is a detailed map of thedata table that lists how each address is used in the program. This report isdescribed in Chapter 21.

Table This option prints the DATA TABLE REPORT which lists the values in the datatable and is described in Chapter 22.

Database This option prints the DATABASE REPORT which lists the address labels and isdescribed in Chapter 23.

Batch This option is also available to print multiple reports at one time. This isdescribed in Chapter 24.

PRINTER CONFIGURATION

Before printing for the first time, you must configure your printer. If you have not yet done so,TOPDOC automatically takes you into the printer configuration process when you select one ofthe report options.

The printer setup provides the information that allows TOPDOC to communicate with your printerand configure the report output format. Once you enter this information, you do not need toprovide it again. However, you can change it at any time using the Setup option on the

Page 159: Topdoc Manual

CHAPTER 17 RUNG COMMENT EDITING

SoftPLC Corp., Inc. 28 July 200018-2

Document Menu, or the Printer option from the main menu Setup option. Figure 18-1 showsthe Printer Configuration Editor.

644444444444444444444444444444444PRINTER SETUP44444444444444444444444444444444475Port Device setup Format Report setup Save Quit 55Select printer output device or file 5K))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))M5 Printer output device/filename : 55 LPT1 55 55 Print using IBM graphics set? : Y 55 Does printer supply LF with CR?: N 55 55 Number of lines per page : 59 55 Width of the report : 125 55 Left margin of the report : 4 55 55 Print right power bar? : Y 55 Center address labels : Y 55 Left margin of the comments : 6 55 Tab character translation width: 2 55 Suppress blank line after rung: N 594444444444444444444444444444444444444444444444444444444444444444444444444444448

Figure 18-1Printer Configuration Editor

After you enter the required information, select Save to write the configuration to disk, then selectQuit to return to the Menu.

CAUTION: If you do not Save , your printer configuration will NOT besaved to disk when you exit.

NOTE: TOPDOC does not utilize the windows printer drivers. Ifyou do not have your printer manual, or your printerdoesn’t allow settings from a control panel, you may not beable to properly setup your printer for the ladder report. Inthis case, you should print to a disk file and use anotherprogram to load the report and output it using the Windowsprinter support. An application note is available on theSoftPLC website and on your CD that describes how to dothis.

SELECTING THE OUTPUT DEVICE/COMMUNICATION PORT

You use the Port option on the printer Setup Menu to select the computer hardware device for theoutput. When you select Port , a menu is displayed with options PRN, LPT1, LPT2, LPT3,COM1 , COM2, Disk File , and Quit . Select the type of printer and the port you have itconnected to using one of the first 6 options.

The LPT1, LPT2, and LPT3 options are for parallel printers. Other than the cable specified bythe printer manufacturer there are no other special requirements for using parallel printers.

Page 160: Topdoc Manual

CHAPTER 17 RUNG COMMENT EDITING

Pub. No. TDZ-MN1 28 July 200018-3

The PRN , COM1 , and COM2 options are normally used for serial printers. You can also use theCOM1 and COM2 options to send output to any connected device that can interpret ASCIIinformation.

You can use the Disk File option to send the output to an ASCII text file. You may want to outputto a disk file if your printer is temporarily unavailable or you want to view the report from disk. If youselect Disk File you must specify the <PATH> and <FILE> to send the output to. TOPDOCattaches an extension of ".PRN" to the <FILE> when a report is printed.

CAUTION: Each time you print a report to a specific <FILE>, the newdata is appended to the end of the file. This file canquickly become very large. For this reason, you should besure to delete the file when you are finished with the dataand to ensure there is sufficient disk space beforeselecting to print to a disk file.

DEVICE SETUP

You use the Device Setup option to input information about your specific printer model. Thisinformation will allow TOPDOC to communicate properly with your printer.

ESCAPE SEQUENCE

The Escape Seq option is used to enter the hexadecimal equivalents of the ASCII code(s) requiredto setup the proper output configurations. Up to 40 codes can be entered. After you enter the lastcode, press [F9] to exit back to the Printer Setup Menu. These codes can be found in your printermanual.

NOTE: Do not press the [Esc] key while entering the code(s).Also be sure to enter the hexadecimal equivalent(s) of thecharacter(s) and not the actual characters themselves.Otherwise, the configuration file will be incorrect.

For dot matrix or line printers you usually only need to enter the compressed mode code(s). Forlaser printers the required codes will vary, depending on the amount of configuration you can do atthe printer itself. Refer to your printer manual for the proper escape sequence(s).

For example, the HP LaserJet Series II (printing 200 character wide reports) requires only the codesfor printing legal size paper. These codes are: 1B, 26, 6C, 33, 41. The pitch size, graphiccharacters, and landscape orientation can be set at the printer front panel by selecting internal fontnumber 21.

PRINT IBM GRAPHICS SET?

You use the IBM Graphics option to indicate whether your printer supports IBM graphicscharacters (select Yes ) or not (select No ). Refer to your printer manual to determine the correctresponse.

Page 161: Topdoc Manual

CHAPTER 17 RUNG COMMENT EDITING

SoftPLC Corp., Inc. 28 July 200018-4

Unless your printer is a laser printer, you should select No . Even if your printer supports IBMGraphics characters you may want to select No to speed up the output of the report on a dot matrixprinter. The IBM Graphics set produces output with solid lines instead of broken lines, which looksnice but slows the reporting process considerably with a moving carriage type printer.

LINE FEED WITH CARRIAGE RETURN?

You use the Linefeed option to indicate whether your printer issues a linefeed when it receives acarriage return character or not. Select Yes if it does issue a linefeed, or No if it does not. Referto your printer manual to determine the correct selection.

You would normally select No for most printers. If your reports print with double spacing, reverseyour setting of the Linefeed option.

REPORT FORMAT

The Report Format options allow you to customize your printouts by selecting the report width,length, and margin.

NUMBER OF LINES PER PAGE

You use the Lines/Page option to enter the number of text lines you want printed on each page.The default of 59 is correct for most dot matrix and line printers.

For laser printers or certain "smarter" dot matrix printers, you may want to use a larger number tominimize the amount of paper used. For example, we use 90 lines per page for Laser printers.

REPORT WIDTH

The Report Width option allows you to specify reports to be 125 column, 200 column, or any valuein-between. Selecting these options will accommodate either 8-1/2 x 11 inch or 11 x 14-7/8 inchpaper.

Set the width at 125 Chars when using 8-1/2 x 11 inch paper when the printer is in compressedmode. To print the same amount of information without operating the printer in compressed modewould require the use of 11 X 14-7/8 inch paper and keeping the report width at 125 columns.

Select 200 Chars for the width when using 11 x 14-7/8 inch paper when the computer is incompressed mode or when using legal size paper on a laser printer.

You can also select the report width to be a Custom value anywhere between 125 and 200. If youselect Custom , only 1 label will print for each instruction on the Ladder Report, similar to the outputfor the 125 character width selection.

NOTE: If you are printing the Ladder Diagram Report, rung sizeneeds to be considered when selecting report width. Referto Chapter 19, Ladder Diagram Report, for details on logiclimitations.

Page 162: Topdoc Manual

CHAPTER 17 RUNG COMMENT EDITING

Pub. No. TDZ-MN1 28 July 200018-5

MARGIN

The Margin option allows you to set the value for the left margin. The report will be printed startingin the column designated.

The left margin would normally be set from 0 to 6. If printouts are to be placed in a folder ornotebook, you may want to increase the left margin to insure enough room is left for binding.

REPORT SETUP

The Report Setup options allow you to set values which will determine the overall appearance ofthe Ladder Diagram Report. You have the option to set tabs and margins for use within the reportand center the address descriptors. You may also choose not to print the right power bar.

NOTE: We recommend that you read Chapter 19, LadderDiagram Report, before using Report Setup .

PRINT RIGHT POWER BAR?

You use the Powerbar option to indicate whether you want to print the right power bar on theLadder Diagram Report or not. Select Yes (for yes, print the power bar) or No (for no, do not printthe power bar). If you select No , Ladder Diagram Reports are printed much faster on dot matrixand line printers since the printer does not need to move the carriage across the page as manytimes. You would normally select No for most printers, and Yes for laser printers.

CENTER DESCRIPTORS?

The Descriptors option allows you to center the address descriptors above the instructions.Selecting No results in the descriptors being printed as they were entered in the Database Editor.Selecting Yes will cause each line of the address descriptor to be centered from left to right.

COMMENT MARGIN

The Comment Margin option allows you to set the left margin for the rung comments. The rungcomments will be printed on the Ladder Diagram Report beginning in the column number designatedhere plus the left margin value. (Refer to the LEFT MARGIN section above). This CommentMargin only pertains to the position of the rung comments on the Ladder Diagram Report, and noton the Ladder Editor or Comment Editor screens.

TAB WIDTH

The Tab Width option allows you to set the number of spaces TOPDOC will expand any tabcharacters it encounters in a rung comment when printing the Ladder Diagram Report.

Page 163: Topdoc Manual

CHAPTER 17 RUNG COMMENT EDITING

SoftPLC Corp., Inc. 28 July 200018-6

SUPPRESS BLANK LINE

This option lets you determine whether to (Yes) suppress printing of the blank line between the crossreference and the next rung or not (No). Normally, you would leave this set to the default of No.Setting this to Yes can save paper, however.

WHAT THE REPORTS LOOK LIKE

The top six lines of all the reports contain the same information. This information is repeated oneach page of the report. Line 1 identifies the version of TOPDOC used to print the report. Line 2contains the <PATH> and <FILE> of the program.

Line 3 contains the date and time the PLC program was last saved to disk, the 78 character programdescription, and the report page number. Line 4 contains the date and time the report was printed.Lines 5 and 6 contain the name of the report.

CAUTION: To ensure your hard copy files are useful for certaintroubleshooting cases, the Date Created and Date Printedon the reports is useful information. The date and timecome from the operating system. Be sure they are correctbefore you load TOPDOC.

Reports can be printed on 14-7/8" wide paper, in either normal or compressed mode or on 8-1/2"wide paper in compressed mode. The REPORT WIDTH you selected will determine the paper andtype size you will need. Refer to "REPORT WIDTH".

MESSAGES DURING PRINTING

After you have made all the necessary responses to select and specify the report you desire,TOPDOC pauses and asks you to strike any key to begin printing the report.

At this pause, you should ensure that the printer is turned on and set up correctly with the proper sizepaper loaded and lined up. Before printing starts, if you need to cancel your selection, you can press[Esc] to return to the prior menu level.

During the printing process, a message is displayed that shows the current printing status. If yousee this message but the report is not printing, check your printer and cables.

STOPPING THE PRINTING PROCESS

You can stop the printing process using the [Ctrl][Break] key sequence. When you press[Ctrl][Break], a menu with options to Continue or Abort is displayed. Continue starts theprinting process again as if it had not been stopped. Abort returns you to the menu. Thiscommand is extremely useful in case of paper jam or other printer problems.

Page 164: Topdoc Manual

Pub. No. TDZ-MN1 28 July 200019-1

CHAPTER 19

THE LADDER DIAGRAM REPORT

The Ladder Diagram Report includes the program's ladder logic, address descriptors, rungcomments and selected cross reference information. To print this report, you use the Ladderoption on the Documentor Menu. This chapter describes this report.

PRINTING THE LADDER DIAGRAM REPORT

After you select Ladder from the Documentor Menu you need to enter the <PATH> and <FILE>of the program for which you want to print the ladder logic. Next, a window is displayed that allowsyou to select several report options and parameters. Each is described in Table 19-1.

Table 19-1Ladder Report Options

?44444444444444444444444;444444444444444444444444444444444444444444444444444444444444444444444444@

* PROMPT 5 DESCRIPTION *G44444444444444444444444>444444444444444444444444444444444444444444444444444444444444444444444

444I* Starting Rung: 5 Enter the first rung number to be printed. */)))))))))))))))))))))))O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

)))1* Ending Rung: 5 Enter the last rung number to be printed. The last rung number ** 5 in the ladder program will be displayed as a default value. */)))))))))))))))))))))))O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

)))1* Address Labels: 5 Print the address labels on the ladder diagram? (Y/N) */)))))))))))))))))))))))O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

)))1* Cross Reference: 5 Print the cross reference information on the ladder diagram? (Y/N) */)))))))))))))))))))))))O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

)))1* Rung Comments: 5 Print the rung comments on the ladder diagram? (Y/N) */)))))))))))))))))))))))O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

)))1|(A)ddr/(T)ag/(B)oth: 5 Print the instruction address or tagname or both? |/)))))))))))))))))))))))O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

)))1* Start Page Number: 5 Enter the starting number for the first page of the report. *.)))))))))))))))))))))))J)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

)))-

If you have selected to print the cross reference information, TOPDOC checks to see if the programhas been edited since the last time the cross reference was run. If there is no cross reference fileOR it is older than the program *.LOB file, you will be asked whether you want to cross referencethe program before printing the report. If Yes , TOPDOC will cross reference the program and print

Page 165: Topdoc Manual

CHAPTER 19 THE LADDER DIAGRAM REPORT

SoftPLC Corp., Inc. 28 July 200019-2

the report. If No , the report will print with the current cross reference file (or without the crossreference, if there is none). If you press [Esc], the report will not print and you return to the menu.

If you have selected to print the database or rung comments and they do not exist, you are askedif you still want to print the report. If Yes , you can continue. If No , you return to the menu.

READING THE LADDER DIAGRAM REPORT

Figure 19-2 is an example of the Ladder Diagram Report. This section describes the four types ofinformation on the Ladder Diagram Report: the ladder logic (instructions), address labels, rungcomments, and cross reference information.

LADDER DIAGRAM INSTRUCTIONS

The ladder diagram instructions are printed as they appear in the Ladder Editor display. The rungnumbers are printed to the left of each rung.

Rungs are never split across two pages (unless the rung is larger than a single page). However, ifa rung comment (or a rung and comment combination) is very large, the comment and rung maybe divided across pages. Also, if the rung is too wide for a single line, TOPDOC will do a form-feedand print the remainder of the rung on the next page.

Data table values associated with instructions will print the value at the time the program was lastsaved to disk.

RUNG SIZE LIMITATIONS

The maximum number of instructions per horizontal path that can be printed on the Ladder DiagramReport depend on the type of instructions used and the Report Width selected in the Printer Setup.

Instructions that require more physical space on the report, such as word and file instructions (ie:MOV, MVF), for our purposes will be referred to as Block Instructions. Table 19-2 containsinformation pertaining to the number of Relay type and Block Instructions that can be printed on theLadder Diagram Report for each width selection, using a 16.6 pitch font.

Page 166: Topdoc Manual

CHAPTER 19 THE LADDER DIAGRAM REPORT

Pub. No. TDZ-MN1 28 July 200019-3

Table 19-2Bit and Block Instructions per Rung

?44444444444444444;44444444444444444;444444444444444444@* INSTRUCTION 5 125 CHAR. 5 200 CHAR. ** TYPE 5 REPORT WIDTH 5 REPORT WIDTH *

G44444444444444444>44444444444444444>444444444444444444I* RELAY TYPE 5 5 ** INSTRUCTIONS 5 7 5 13 ** WITH OTE 5 5 *

/)))))))))))))))))O)))))))))))))))))O))))))))))))))))))1* RELAY TYPE 5 5 ** INSTRUCTIONS 5 7 5 11 ** W/ BLOCK OUTPUT 5 5 *

/)))))))))))))))))O)))))))))))))))))O))))))))))))))))))1* BLOCK INPUT 5 5 ** INSTRUCTIONS 5 5 5 8 ** WITH OTE 5 5 *

/)))))))))))))))))O)))))))))))))))))O))))))))))))))))))1* BLOCK INPUT 5 5 ** INSTRUCTIONS 5 4 5 7 ** W/ BLOCK OUTPUT 5 5 *

.)))))))))))))))))J)))))))))))))))))J))))))))))))))))))-

The values in Table 19-2 are approximate and will vary according to the instructions, addresses andthe selected Left Margin of the Report. Rungs that extend beyond the physical limitations of thereport will cause a page feed and then the remainder of the rung will be printed on the next page.

Since reports printed with the 200 character width print the labels for every instruction address, fewerinstructions may be printed on the Ladder Report to provide room for the labels when rungs haveblock instructions.

There is no limit to the number of instructions in parallel that can be printed on the Ladder Report.

RUNG COMMENTS

Rung comments are printed above the rungs. If a comment contains a subtitle, a form feed is issuedand the specified subtitle is printed on line 5 of the current and all following pages of the report.Subtitles are described in more detail in Chapter 17.

The left margin for rung comments is set according to the value designated in the Printer Setup(Chapter 18). When tab characters are encountered, they will be expanded in the Ladder DiagramReport by the number of spaces designated in the Printer Setup (see Chapter 18, "TAB WIDTH").

ADDRESS LABELS

The 5 text lines of each address label are printed above each instruction. The number of labelsprinted is based on the number of addresses used in the instruction and the selected Report Width.Figure 19-1 shows an example of multiple address labels for an instruction.

If 200 is selected for the report width, the labels entered for up to 7 instruction addresses will beprinted on the Ladder Diagram Report. If 125 is selected for the report width, for each instruction

Page 167: Topdoc Manual

CHAPTER 19 THE LADDER DIAGRAM REPORT

SoftPLC Corp., Inc. 28 July 200019-4

only one address (usually the control or counter) will have its label printed due to space limitations.Figures 19-1 show an example of how address labels print for 125 and 200 width reports.

If no label is found for a specific address during Ladder Diagram printing, the label for the nexthigher level address type(s), if they exist, is used according to the object ranking scheme in Table13-1. For example, if a bit address (such as T4:003.EN) has no address label, the address label forthe timer part of the bit address (T4:003) is printed on the Ladder Diagram Report. Similarly, if aword address (such as N7:003) has no label, the address label for a file beginning with the word(#N7:003) is printed, if it exists.

R:OUTPUT TO SCAM ALARM * +)MVM)))))))))))), *P2/0 /))))))))))))))))))))))))))))))))))1 MOVE WITH MASK /)))))1 * * A: N001:0001 * * * 0 * * B: N007:0000 * * 0 * * R: N015:0030 * * 0 * .))))))))))))))))- N001:001 RD WORD P2/0 N007:000 RD WORD P2/0 N015:030 WR WORD P2/0

Figure 19-1(a)125 Width Report

R:OUTPUT TO SCAM ALARM * +)MVM))))))))))))), *P2/0 /)))))))))))))))))))))))))))))))))))1 MOVE WITH MASK /))))1 * * A: N001:0001 * * * 0 * * B: N007:0000 * * 0 * * R: N015:0030 * * 0 * .)))))))))))))))))-

N001:0001 RD WORD P2/0 N007:0000 RD WORD P2/0 N015:0030 WR WORD P2/0

Figure 19-1(b)200 Width Report

Figure 191Address Labels/Output Cross References

for Different Report Width Formats

Page 168: Topdoc Manual

CHAPTER 19 THE LADDER DIAGRAM REPORT

Pub. No. TDZ-MN1 28 July 200019-5

CROSS REFERENCE INFORMATION

This section describes the type and location of the cross reference information on the LadderDiagram Report.

OUTPUT INSTRUCTION ADDRESS CROSS REFERENCES

Output instruction address(es) cross references are printed below each rung. Refer to Chapter 13for definitions of the cross reference types. Cross Reference information for output instructions thatuse multiple addresses will be printed for each address. See Figure 19-1 for an example of OutputCross Reference information for multiple addresses.

If you entered a [Y] in the CROSSREF OVERRIDE field of the label for an address used in an outputinstruction, the cross reference information for that address will not print below the rung.

INPUT INSTRUCTION ADDRESS CROSS REFERENCES

Input instruction address cross references are printed below the instruction. If an input instruction'saddresses are used elsewhere in output instructions, the number of the rung which could last haveaffected the value/status of these addresses are printed below the instruction.

If there are no output instructions referencing the input instruction's addresses, the FIELD DRAWINGNUMBER is printed below the instruction.

If neither of the two conditions above apply, nothing is printed below the input instruction. SeeFigure 19-2, rung P2/1 for an example of each case.

Page 169: Topdoc Manual

CHAPTER 19 THE LADDER DIAGRAM REPORT

SoftPLC Corp., Inc. 28 July 200019-6

Figure 19-2(a)Ladder Diagram Report Example

Page 170: Topdoc Manual

CHAPTER 19 THE LADDER DIAGRAM REPORT

Pub. No. TDZ-MN1 28 July 200019-7

Figure 19-2(b)Ladder Diagram Report Example

Page 171: Topdoc Manual

CHAPTER 19 THE LADDER DIAGRAM REPORT

SoftPLC Corp., Inc. 28 July 200019-8

Figure 19-2(c)Ladder Diagram Report Example

Page 172: Topdoc Manual

CHAPTER 19 THE LADDER DIAGRAM REPORT

Pub. No. TDZ-MN1 28 July 200019-9

Figure 19-2(d)Ladder Diagram Report Example

Page 173: Topdoc Manual

CHAPTER 19 THE LADDER DIAGRAM REPORT

SoftPLC Corp., Inc. 28 July 200019-10

Figure 19-2(e)Ladder Diagram Report Example

Page 174: Topdoc Manual

CHAPTER 19 THE LADDER DIAGRAM REPORT

Pub. No. TDZ-MN1 28 July 200019-11

Figure 19-2(f)Ladder Diagram Report Example

Page 175: Topdoc Manual

Pub. No. TDZ-MN1 28 July 200020-1

CHAPTER 20

THE ADDRESS REPORT

This chapter describes the Address Report. The Address Report is a comprehensive report whichprints each data table address used in the program, its value, address label, and the cross referenceinformation. You use the Address option on the Documentor Menu to print the Address Report.

PRINTING THE ADDRESS REPORT

After you select Address from the Documentor Menu you need to enter the <PATH> and <FILE>of the program for which you want to print the report. Next, a menu with options All , Range , andQuit is displayed. Quit returns you to the Documentor menu. All prints the report for the entiredata table.

Range prints the report for a selected type of cross reference objects. The report is printed inaddress order within each cross reference object type in the order listed in Table 20-1. Chapter 13describes the Cross Reference information and how to read it.

When you select Range , a data entry window is displayed. You must enter the desired startingdata table address, ending data table address, and the number you want to assign to the first pageof the printout.

The report prints the cross reference objects in Table 20-1 in address order within each object type.For example, if you specify a beginning address of O:010/00 and an ending address of O:013 everybit in each file of the data table will be printed, in addition to words O010 through O013.

After you define the range you are asked if you want to print the title page ( Yes ) or ( No ). Figure20-1 shows the title page.

TOPDOC checks to see if the program has been edited since the last time the cross reference wasrun. If there is no cross reference file OR it is older than the program *.LOB file, you will be askedwhether you want to cross reference the program before printing the report. If Yes , TOPDOC willcross reference the program and print the report. If No , the report will not print and you return tothe menu.

Page 176: Topdoc Manual

CHAPTER 20 THE ADDRESS REPORT

SoftPLC Corp., Inc. 28 July 200020-2

Table 20-1Objects on the Address Report

?444444444;444444444444444444444444444444444444444444@* OBJECT 5 DESCRIPTION *

G444444444>444444444444444444444444444444444444444444I* BIT 5 Addresses used in instructions which ** 5 reference a single bit, such as XIC or ** 5 OTE instructions. *

/)))))))))O))))))))))))))))))))))))))))))))))))))))))1* WORD 5 Addresses used in instructions which ** 5 reference a single word, such as ** 5 arithmetic instructions. *

/)))))))))O))))))))))))))))))))))))))))))))))))))))))1* FILE 5 Addresses used in instructions which ** 5 reference a range of words, such as shift** 5 register or logical instructions. *

/)))))))))O))))))))))))))))))))))))))))))))))))))))))1* TIMER 5 References to rungs which manipulate a ** 5 timer as a whole. *

/)))))))))O))))))))))))))))))))))))))))))))))))))))))1* COUNTER 5 References to rungs which manipulate a ** 5 counter as a whole. *

/)))))))))O))))))))))))))))))))))))))))))))))))))))))1* CONTROL 5 References to rungs which manipulate a ** 5 control as a whole. *

/)))))))))O))))))))))))))))))))))))))))))))))))))))))1* STRUCT 5 References to rungs with instructions ** 5 that manipulate a structure (BT,PD,etc.) ** 5 as a whole. *

/)))))))))O))))))))))))))))))))))))))))))))))))))))))1* PROGRAM 5 References to subprograms via the JSR ** 5 instruction. *

/)))))))))O))))))))))))))))))))))))))))))))))))))))))1* LABEL 5 References to rungs containing jump or ** 5 label instructions. *

/)))))))))O))))))))))))))))))))))))))))))))))))))))))1* CONSTANT5 References to rung with instructions ** 5 with constant parameters. *

.)))))))))J))))))))))))))))))))))))))))))))))))))))))-

READING THE ADDRESS REPORT

Figures 20-1 are an example of the Address Report.

The first page of the report is a title page which lists the order and definitions of the objects and themeaning of the cross reference types. Figure 20-1(a) shows the title page.

The columns on the report are:

ADDRESS The column heading is the current object type. The data in the column is theaddress.

VALUE The column headings(s) describe the information in the column. The data inthe column is normally the address value, except for output and input

Page 177: Topdoc Manual

CHAPTER 20 THE ADDRESS REPORT

Pub. No. TDZ-MN1 28 July 200020-3

addresses which print the FIELD DRAWING NUMBER from the address label,if one exists.

TAGNAME The data in the column is the value of the TAGNAME field from the addresslabel.

LABEL TEXT The data in this column is the value of the five text description fields from theaddress label.

PROGRAM The data in this column is all of the cross reference information for the address.REFERENCES Chapter 13 describes the cross reference information and how to read it.

Page 178: Topdoc Manual

CHAPTER 20 THE ADDRESS REPORT

SoftPLC Corp., Inc. 28 July 200020-4

Figure 20-1(a)Address Report Example

Page 179: Topdoc Manual

CHAPTER 20 THE ADDRESS REPORT

Pub. No. TDZ-MN1 28 July 200020-5

Figure 20-1(b)Address Report Example

Page 180: Topdoc Manual

CHAPTER 20 THE ADDRESS REPORT

SoftPLC Corp., Inc. 28 July 200020-6

Figure 20-1(c)Address Report Example

Page 181: Topdoc Manual

CHAPTER 20 THE ADDRESS REPORT

Pub. No. TDZ-MN1 28 July 200020-7

Figure 20-1(d)Address Report Example

Figure 20-1(e)Address Report Example

Page 182: Topdoc Manual

Pub. No. TDZ-MN1 28 July 200021-1

CHAPTER 21

THE USAGE REPORT

You use the Usage option on the Documentor Menu to print the Usage Report. This report is amap of the entire data table (or a selected range of addresses) that lists how each address isused in the program.

PRINTING THE USAGE REPORT

After you select Usage from the Documentor Menu, you need to enter the <PATH> and <FILE>of the program for which you want to print address usage information.

Next, a menu with options All , Range , and Quit is displayed. Quit returns you to theDocumentor Menu. All prints the report for the entire data table.

Range prints the Usage report for a selected area of the data table. When you select Range ,a data entry window is displayed. You must enter the desired starting data table word address,ending data table word address, and the number you want to assign to the first page of theprintout.

The data table files are printed in order. If you want to print values from non-adjacent files youmust print the report multiple times with a different range selection each time. For example, ifyou only want to print values from the output file and binary file 3 of the data table, you wouldfirst select a range of addresses in output file 0, and then after the report is printed, select againand print the desired addresses from file B3.

TOPDOC checks to see if the program has been edited since the last time the cross referencewas run. If there is no cross reference file OR it is older than the program *.LOB file, you will beasked whether you want to cross reference the program before printing the report. If Yes ,TOPDOC will cross reference the program and print the report. If No , the report will not printand you return to the menu.

READING THE USAGE REPORT

Figures 21-4 are an example of the Usage Report. The first page is a Usage Description Table. Here, the characters used to interpret the report are listed and defined. Figure 21-4(a) is anexample of the Usage Description Table. This section describes how to use and read this report.

Page 183: Topdoc Manual

CHAPTER 21 THE USAGE REPORT

SoftPLC Corp., Inc. 28 July 200021-2

REPORT COLUMNS

This section describes the contents of each column.

ADDRESS This column contains the data table addresses.

FILES This column may contain one or more File Characters describing how the addresswas used in reference to a file. (See Table 21-2(a))

WORDS The first column under the WORDS heading may contain a Word Characterindicating the element type (ie: Timer, Counter, Control). The second columnindicates how the address was used in reference to a word (ie: control word, presetword, accumulator word, position word, and length word). (See Table 21-2(b))

BITS This column contains a sixteen character field in which Bit Characters (Table 21-2(c)) may be placed to identify how each bit is used. The left-most character is thehighest bit number (ie: 17) and the right-most character is the lowest bit number (ie:00).

KEY This column may contain a Label Key (Table 21-3) which will indicate what theprinted label text is specifically referencing. The usage with the highest priority willdetermine which Label Key and Text will be selected. (The priority assigned is Files,Words, then Bits - highest to lowest).

TEXT This column may contain the 5 lines of text description from the address label for theaddress being described. The Key will indicate which usage the Text is describing.

USAGE REPORT CHARACTER INTERPRETATION

Table 21-1 illustrates how to interpret the characters in columns 2 through 5 of the report.

Page 184: Topdoc Manual

CHAPTER 21 THE USAGE REPORT

Pub. No. TDZ-MN1 28 July 200021-3

Table 21-1Interpretation of Usage Report Characters

?44444;44444444444444444444444444444444444444444444444444444444444444444444444444444444444444444@

*CHAR 5 DESCRIPTION *G44444>444444444444;44444444444444444444444444444444444444444444444444444444444444444444444444

44I*(.) 5 NOT USED 5 This address has no instruction which references this data table location. */)))))O))))))))))))O))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

))1*(U) 5 DBASE USED 5 This address has no instruction which references this data table location ** 5 5 but a Database entry does exist. */)))))O))))))))))))O))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

))1*(let)5 DTABLE USED5 This address has an instruction which references this data table location ** 5 5 but no Database entry exists. */)))))O))))))))))))O))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

))1*(LET)5DT & DB USED5 This address has an instruction which references this data table location ** 5 5 and a Database entry exists. */)))))J))))))))))))J))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

))1* EXAMPLE: ** ...b.... This bit was used but is not documented. ** ...B.... This bit was used and is documented. *.)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

NOTE: If an address is used but not documented, a label may beprinted for the address on the Ladder Report ifdocumentation exists for the higher level object theaddress may be a part of. Refer to Chapter 19 for moredetails.

USAGE REPORT CHARACTERS

Tables 21-2 illustrate the File, Word, and Bit Characters used in the Usage Report. Refer to Table21-1 for the meaning of upper and lower case letters used for Usage Report Characters.

Page 185: Topdoc Manual

CHAPTER 21 THE USAGE REPORT

SoftPLC Corp., Inc. 28 July 200021-4

Table 21-2(a)File Characters

?444444444;4444444444444444444444444444444444444444444444444444444444444444444444444444444444444@

*CHARACTER5 DESCRIPTION *G444444444>444444444;4444444444444444444444444444444444444444444444444444444444444444444444444

44I* (O,o) 5 OVERLAY 5 This address is used in more than one instruction which references a range** 5 5 of words. */)))))))))O)))))))))O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

))1* (F,f) 5 FILE 5 This address is used in an instruction which references a range of words. */)))))))))O)))))))))O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

))1* (S,s) 5 START 5 This address is used in an instruction which references a range of words ** 5 5 which start at this address. *.)))))))))J)))))))))J)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

))-

Table 21-2(b)Word Characters

?4444444;44444444;4444444444444444444444444444444444444444444444444444444444444444@* CHAR 5 ELEMENT5 DESCRIPTION *

G4444444>44444444>4444444444444444444444444444444444444444444444444444444444444444I*(W,w) 5 WORD 5 Address used in an instruction which references a word. *

/)))))))O))))))))O))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))1*(T,t) 5 TIMER 5 Address used in an instruction which references a timer. *

/)))))))O))))))))O))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))1*(C,c) 5 COUNTER5 Address used in an instruction which references a counter. *

/)))))))O))))))))O))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))1*(R,r) 5 CONTROL5 Address used in an instruction which references a control. *

/)))))))O))))))))O))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))1*(C,c) 5 CTL 5 Address used in an instruction which references a timer or ** 5 5 counter control word. *

/)))))))O))))))))O))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))1*(P,p) 5 PRE 5 Address used in an instruction which references a timer or ** 5 5 counter preset word. *

/)))))))O))))))))O))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))1*(A,a) 5 ACC 5 Address used in an instruction which references a timer or ** 5 5 counter accumulator word. *

/)))))))O))))))))O))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))1*(P,p) 5 POS 5 Address used in an instruction which references the control ** 5 5 position word. *

/)))))))O))))))))O))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))1*(L,l) 5 LEN 5 Address used in an instruction which references the control ** 5 5 length word. *

.)))))))J))))))))J))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))-

Page 186: Topdoc Manual

CHAPTER 21 THE USAGE REPORT

Pub. No. TDZ-MN1 28 July 200021-5

Table 21-2(c)Bit Characters

?444444;44444444444;4444444444444444444444444444444444444444444444444444444444444444444444444444444@

* CHAR 5 ELEMENT 5 DESCRIPTION *

G444444>44444444444>4444444444444444444444444444444444444444444444444444444444444444444444444444444I

*(B,b) 5 BIT 5 This address is used in an instruction which references this bit. *

.))))))J)))))))))))J)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))-

LABEL KEY ABBREVIATIONS

This section describes the meaning of the codes in the KEY column on the report.

Table 21-3Meaning of Label Key Abbreviations

?4444;44444444444444444444444444444444444444444@* KEY5 DESCRIPTION *

G4444>44444444444444444444444444444444444444444I* FLE5 File - Data Table File *

/))))O)))))))))))))))))))))))))))))))))))))))))1* FLP5 File Pointer *

/))))O)))))))))))))))))))))))))))))))))))))))))1* TMR5 Timer *

/))))O)))))))))))))))))))))))))))))))))))))))))1* CTR5 Counter *

/))))O)))))))))))))))))))))))))))))))))))))))))1* ROL5 Control *

/))))O)))))))))))))))))))))))))))))))))))))))))1* PRE5 Preset of timer/counter *

/))))O)))))))))))))))))))))))))))))))))))))))))1* ACC5 Accumulator of timer/counter *

/))))O)))))))))))))))))))))))))))))))))))))))))1* CTL5 Control of timer/counter *

/))))O)))))))))))))))))))))))))))))))))))))))))1* POS5 Position of Control *

/))))O)))))))))))))))))))))))))))))))))))))))))1* LEN5 Length of Control *

/))))O)))))))))))))))))))))))))))))))))))))))))1* WRD5 Word *

/))))O)))))))))))))))))))))))))))))))))))))))))1* /??5 Bit *

/))))O)))))))))))))))))))))))))))))))))))))))))1* .??5 Control Bit (ie: EN, TT) *

.))))J)))))))))))))))))))))))))))))))))))))))))-

The keys described as "/??" will be displayed on the Usage Report with bit numbers instead of "?'s",such as "/03".

The key described as (.??) will be displayed on the report with the mnemonic, such as ".DN" or".EN".

Page 187: Topdoc Manual

CHAPTER 21 THE USAGE REPORT

SoftPLC Corp., Inc. 28 July 200021-6

REPORT INTERPRETATION EXAMPLES

This section provides example entries in a usage report and explains how to read them.

USAGE REPORT EXAMPLE 1

Figure 21-1 is an example of an entry in the Usage Report.

ADDRESS FILES WORDS BITS KEY LABEL TEXT O:000 ... . ..B..... ........ /15 START MOTOR #1

Figure 21-1Usage Report Example 1

On the first page of the report and in Table 21-3 under "Meaning of Label Key Abbreviations", "/??"is shown to represent "bit". Therefore, in the example, "/15" is placed in the KEY column indicatingthat the label text is referring to a bit, in this case bit 15. Notice that under the BITS section a "B"has been placed in the field to represent the use of bit 15.

Because the "B" in the bit column is uppercase, documentation exists for this reference. (Alowercase "b" would indicate that documentation does not exist for this reference.)

USAGE REPORT EXAMPLE 2

ADDRESS FILES WORDS BITS KEY LABEL TEXT T004:000 ... T. BBBB..... ........ TMR BIN DUMP TIMER ... . ......... ........ . . . . . . . . ... A ......... ........ ACC TIMER ACC VALUE -- TO BE SCALED

Figure 21-2Usage Report Example 2

To use the information provided in the report example for address T004:000, look on the first pageof the report or Table 21-2(b) under Word Characters. The "T" indicates that the address is usedin an instruction that references a timer. Since the "T" is uppercase, this indicates thatdocumentation exists for this address when used as a timer.

Three spaces are allocated for each Timer since it is a structure which consists of 3 words - the CTL(Control), PRE (Preset), and ACC (Accumulator).

USAGE REPORT EXAMPLE 3

ADDRESS FILES WORDS BITS KEY LABEL TEXT B003:006 ofs W ........ ......B. WRD SWITCH CHECK

Figure 21-3Usage Report Example 3

Page 188: Topdoc Manual

CHAPTER 21 THE USAGE REPORT

Pub. No. TDZ-MN1 28 July 200021-7

To use the information provided in the report example for address B003:006, look on the first pageof the report (Table 21-2(a)) under File Characters. The "o" indicates that the address is used inmore than one file (the files are "Overlayed"). The "f" indicates that the address is used in a "File".The "s" indicates that the address is used at the "Start" of a file. Since these are all lowercaseentries, no address labels were entered for the address as a file (Table 21-1).

In the Words column, the "W" indicates the address is used in a "Word". Since the "W" is anuppercase letter, this indicates that documentation exists for this address when used as a Word.

The placement of the "B" within the sixteen character field indicates that bit "1" is used in aninstruction and since it is uppercase, its usage is documented.

The usage with the highest priority for which documentation exists will have its Key and Label Textprinted. Priority has been established from left to right, so Files are a higher priority than Words,and Words are a higher priority than Bits. Higher numbered bits are higher priority than bit 0.

In Figure 21-3 the upper case Usage Character with the highest priority is "W". Therefore, the Keycolumn indicates that the Label Text for the "WRD" usage will be printed.

NOTE: In the Files column, documentation is acknowledged onlyfor file starts (S).

Page 189: Topdoc Manual

CHAPTER 21 THE USAGE REPORT

SoftPLC Corp., Inc. 28 July 200021-8

Figure 21-4(a)Sample Usage Report (Page 1)

Page 190: Topdoc Manual

CHAPTER 21 THE USAGE REPORT

Pub. No. TDZ-MN1 28 July 200021-9

Figure 21-4(b)Sample Usage Report

Page 191: Topdoc Manual

CHAPTER 21 THE USAGE REPORT

SoftPLC Corp., Inc. 28 July 200021-10

Figure 21-4(c)Sample Usage Report

Figure 21-4(d)Sample Usage Report

Page 192: Topdoc Manual

CHAPTER 21 THE USAGE REPORT

Pub. No. TDZ-MN1 28 July 200021-11

Figure 21-4(e)Sample Usage Report

Figure 21-4(f)Sample Usage Report

Page 193: Topdoc Manual

Pub. No. TDZ-MN1 28 July 200022-1

CHAPTER 22

THE DATA TABLE REPORT

You use the Table option on the Documentor Menu to print the Data Table Report. This report liststhe address values for the entire data table or a selected range of addresses. A title page is alsoavailable which lists the data table structure.

PRINTING THE DATA TABLE REPORT

After you select Table from the Documentor Menu, you need to enter the <PATH> and <FILE> ofthe program for which you want to print data table values.

Next, a menu with options All , Range , and Quit is displayed. Quit returns you to theDocumentor Menu. All prints the report for the entire data table.

Range prints the report for a selected area of the data table. When you select Range , a dataentry window is displayed. You must enter the desired starting data table file, ending data table file,and the number you want to assign to the first page of the printout.

The data table files are printed in order. If you want to print values from non-adjacent files, you mustprint the report multiple times with a different range selection each time. For example, if you onlywant to print values from the output file and binary file 3 of the data table, you would first select arange of addresses in output file 0, and then after the report is printed, select again and print thedesired addresses from file B3.

READING THE DATA TABLE REPORT

Figures 22-1 is an example of the Data Table Report.

TITLE PAGE (DATA TABLE OF CONTENTS)

The first page of the report is titled "Data Table of Contents" and lists the structure of the data table.Each possible file type is listed followed by the file numbers which exist for that type. Figure 22-1(a)shows the Data Table of Contents.

REPORT BODY (OR DATA VALUE SECTION)

For most data table sections, each line of the report lists an address followed by data table wordvalues in the default format for the current data table file type. The first column identifies the

Page 194: Topdoc Manual

CHAPTER 22 THE DATA TABLE REPORT

SoftPLC Corp., Inc. 28 July 200022-2

address which contains the value in column two. To determine the address which contains thevalues in columns 3-9, add the number in the column heading to the address in column one.

For special data table sections, such as the Status File, PD, MG, BT, and ASCII sections, the reportformat is customized to clearly identify the meaning of each value in the data table file (see Figures22-1).

Figure 22-1(a)Data Table Report Examples

Page 195: Topdoc Manual

CHAPTER 22 THE DATA TABLE REPORT

Pub. No. TDZ-MN1 28 July 200022-3

Figure 22-1(b)Data Table Report Examples

Figure 22-1(c)Data Table Report Examples

Page 196: Topdoc Manual

CHAPTER 22 THE DATA TABLE REPORT

SoftPLC Corp., Inc. 28 July 200022-4

Figure 22-1(d)Data Table Report Examples

Figure 22-1(e)Data Table Report Examples

Figure 22-1(f)

Page 197: Topdoc Manual

CHAPTER 22 THE DATA TABLE REPORT

Pub. No. TDZ-MN1 28 July 200022-5

Data Table Report Examples

Page 198: Topdoc Manual

Pub. No. TDZ-MN1 28 July 200023-1

CHAPTER 23

THE DATABASE REPORT

You use the Database option on the Documentor Menu to print the Database Report which listsall (or a selected range) of the address labels in ascending address order.

PRINTING THE DATABASE REPORT

After you select Database from the Documentor Menu, you need to enter the <PATH> and <FILE>of the program for which you want to print address labels.

Next, a menu with options All , Range , and Quit is displayed. Quit returns you to theDocumentor Menu. All prints the report for the entire database.

Range prints the report for a selected range of addresses. When you select Range , a data entrywindow is displayed. You must enter the desired starting data table word address, ending data tableword address, and the number you want to assign to the first page of the printout.

The labels are printed in address order by type. Table 14-1 defines the object types and the orderprinted. Bits are printed first, followed by words, files, timers, counters, etc.. For example, if youspecify a beginning address of O:010/00 and an ending address of O:013 every bit in all files of thedata table will be printed, in addition to words O:010 through O:013.

READING THE DATABASE REPORT

Figure 23-1 is an example of the Database Report.

Each line of the report lists an ADDRESS followed by the TAGNAME, LABEL TEXT, FIELDDRAWING NUMBER, and CROSSREF OVERRIDE values entered into the Database for theaddress.

Page 199: Topdoc Manual

CHAPTER 23 THE DATABASE REPORT

SoftPLC Corp., Inc. 28 July 200023-2

Figure 23-1Database Report Example

Page 200: Topdoc Manual

Pub. No. TDZ-MN1 28 July 200024-1

CHAPTER 24

BATCH REPORTING

The Batch option allows you to print multiple reports in one printing session. A Table of Contentsmay also be generated to briefly document each report selection made.

PRINTING WITH BATCH

Select Batch from the Documentor Menu. You will be prompted to enter the <PATH> and <FILE>of the program for which you want to print reports.

A new menu will then be displayed with the following options: Choose , Print , Load , Save , and Quit . Quit returns you to the Documentor Menu. The remaining options are described in thissection.

Figure 24-1 illustrates the Batch Menu.

?44444444444 BATCH PRINT 4444444444@ * Choose Print Load Save Quit *?44444444 OPTIONS 44444444@* Select a report for batch ** Ladder Report *

/))))))))))))))))))))))))))))))))))1/)))))))))))))))))))))))))1* % Ladder Report ** Starting Rung : P2/0 ** Address Report ** Ending Rung : P5/132 ** Datatable Report ** Address labels : Y ** Usage Report ** Cross Reference: Y ** Database Report ** Rung Comments : Y ** Function Chart Report (SoftPLC) *.)))))))))))))))))))))))))-* Table of Contents * .))))))))))))))))))))))))))))))))))-

Figure 24-1Batch Menu

THE CHOOSE OPTION

The Choose option allows you to select and specify the reports you want to print. After selectingChoose from the Batch Print Menu, a cursor appears in the report selection list. You can move thecursor using the [8] and [9] keys. Press [Enter] when the cursor is on the name of a report you wantto print. A check mark will be placed next to the report name indicating that it was selected.Pressing [Enter] again will remove the check mark.

When a report is selected, an options window is displayed that will allow you to enter the reportparameters (Figure 24-1). Pressing [Ins] moves the pointer to the Options window so you can enterthe appropriate values. Press [Esc] to return to the report selection list or press [Enter] after the last

Page 201: Topdoc Manual

CHAPTER 24 BATCH REPORTING

SoftPLC Corp., Inc. 28 July 200024-2

option value has been entered to return the cursor to the report selection list. Continue selectingreports to be printed and then exit the Selection Menu by pressing [Esc].

The last item on the list, Table of Contents, is a summary of reports. The "SUMMARY OFREPORTS" section describes this report.

THE PRINT OPTION

The Print option sends all the selected reports to the device specified in the Printer Setup. Referto Chapter 18 for printer configuration information.

THE SAVE AND LOAD OPTIONS

Save will write the report selections and their respective options to disk so you can later retrievethem for printing or further selecting. The selections are saved with the <PATH> and <FILE> of yourprogram with an .OPT extension.

Load brings a previously saved selection of reports from the disk into memory. You can thenselect Choose (to edit) or Print .

SUMMARY OF REPORTS

Another report option available with Batch is the Table of Contents. If the Table of Contents isselected and checked along with at least one other report, a Summary of Reports document will begenerated. Figure 24-2 is an example of a Table of Contents for a batch of reports.

PROGRAM INFORMATION

The first section of the Summary is Program Information. It contains the <PATH> and <FILE>,description, processor type, data table size, and the number of I/O racks. This information comesfrom the program header.

REPORT INFORMATION

The second section is Report Information. It contains the Report Width, lines per page, and if theIBM graphics set was used. This information comes from the Printer Configuration.

TABLE OF CONTENTS

The last section is the Table of Contents. It lists each report printed, the page number the reportstarts on, and the starting and ending addresses or rungs selected to be printed.

Page 202: Topdoc Manual

CHAPTER 24 BATCH REPORTING

Pub. No. TDZ-MN1 28 July 200024-3

+)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))),

* TOPDOC for SoftPLC by SoftPLC Corp. 4.4 *

* source : \TDZ\PLC5\1TDZDEMO *

* created: Wed Apr 18 14:23:04 1992 THIS IS A DEMO PROGRAM page 1*

* Printed: Wed Apr 18 14:37:34 1992 *

* *

* SUMMARY OF REPORTS *

* ------------------ *

* *

* PROGRAM INFORMATION *

* ------------------- *

* Name : \TDZ\SPLC\DEMO.LOB *

* Description : THIS IS A DEMO PROGRAM *

* Processor type : SoftPLC-Z 1K *

* Data table size : 1024 *

* Number of I/O racks : 2 *

* *

* *

* REPORT INFORMATION *

* ------------------ *

* Columns across : 125 *

* Lines per page : 59 *

* IBM graphics set used : Y * *

* TABLE OF CONTENTS PAGE *

* ----------------- ---- *

* Ladder Listing ..................... 1 *

* start rung : P2/0 *

* end rung : P6/21 *

* comments : Y *

Page 203: Topdoc Manual

CHAPTER 24 BATCH REPORTING

SoftPLC Corp., Inc. 28 July 200024-4

* database : Y *

* cross reference : Y *

* right power bar : Y *

* *

* Detailed Address Report ............ 22 *

* start address : O:000/00 *

* end address : 3.402820E+38 *

* *

* Data Table Report ................... 35 *

* start file : 0 *

* end file : 15 *

* *

* Usage Report ........................ 48 *

* start address : O:000 *

* end address : N015:015 *

* *

* Data Base Report .................... 60 *

* start address : O:000/00 *

* end address : 3.402820E+38 *

.))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))-

Figure 24-2Table of Contents Summary Report Example

Page 204: Topdoc Manual

PART VI

UTILITIES

Page 205: Topdoc Manual

THIS PAGE INTENTIONALLY LEFT BLANK

Page 206: Topdoc Manual

Pub. No. TDZ-MN1 28 July 200025-1

CHAPTER 25

THE DIFFERENCE DETECTOR

The Diff option, found under the Main Menu option, Workfiles , accesses the TOPDOC DifferenceDetector which is described in this chapter. The Difference Detector finds differences between twocopies of the same program or similar programs on the hard disk. It compares a baseline copy toanother copy and gives a report of any differences in the ladder logic and/or data tables.

Six types of differences are found:

@ Instructions or parameters on a rung that do not match @ A missing rung in the comparison program

@ An additional rung in the comparison program@ Data table address values that do not match@ Data table file sizes that do not match@ Data table file types that do not match

Rung comments and address labels are not compared.

The result of the comparison is a report that you can display on the screen, send to a printer, or storeon your disk as a text file.

USING THE DIFFERENCE DETECTOR

After you select Workfiles from the Main Menu, then Diff from the Workfiles menu:

1) Enter the <PATH> and <FILE> of the baseline program (File A).

2) Enter the <PATH> and <FILE> of the comparison program (File B).

3) Next you are asked if you want to compare the data tables. Select Yes to compare the datatables and ladder logic, or No to compare the ladder logic only.

4) A menu is displayed with the options Console , File , Printer , and Quit . Quit returns youto the Main Menu.

The other three options specify where you want the difference output to go. Console displaysthe report on the screen. Printer sends the report to the printer. File stores the report as atext file on disk. If you select File , you are prompted for the <PATH> and <FILE> to store theoutput. The <FILE> is given an extension of ".DFT".

NOTE: The printer configuration file from "Setup" is not used bythe Difference Detector. Output to a File goes to thespecified <FILE> and output to a printer is sent without

Page 207: Topdoc Manual

CHAPTER 25 THE DIFFERENCE DETECTOR

SoftPLC Corp., Inc. 28 July 200025-2

any of the escape codes or other settings entered into theconfiguration file.

5) After you select the output device as described in step 4, the Difference Detector locates andreports the differences. After all the differences have been found, you are returned to the MainMenu.

While the Difference Detector is running, you can use the [Ctrl][Break] key sequence to abort andreturn to the Main Menu. If you choose to direct the output to the Console , you can use the[SpaceBar] to stop and any key to start the scrolling of the report.

READING THE DIFFERENCE REPORT

Figure 25-1 is an example of the Difference Report. The bold face comments are not included onthe report, they are for illustration purposes in this manual only.

The Difference Report is simple to understand as both the rung numbers and ladder logic rungs areincluded on the report. The report is divided up into "difference sections" which are clearly indicatedon the report. Each "difference section" contains all of the consecutive rungs that are different ina given area of the programs. The "A" or "B" on the left edge of the rung indicates whether the rungcame from the baseline program (A) or the comparison program (B).

If rung(s) from both programs A and B are shown, the instruction(s) and/or parameters on the rung(s)are different. If rungs from only program A are shown, the comparison program is missing thoserungs and if rungs from only program B are shown, the comparison program has additional rungs.The rung numbers always reflect the actual rung numbers within the respective programs.

In the event of added or missing rungs, the Difference Detector automatically resynchronizes tomatching rung logic, so even if the rung numbers are different, the logic comparison is madecorrectly.

Page 208: Topdoc Manual

CHAPTER 25 THE DIFFERENCE DETECTOR

Pub. No. TDZ-MN1 28 July 200025-3

Printed: Fri Jan 15 13:53:38 1999 File A: Name : \TDZ\SPLC\LKDDEMO.lob

Version : 2.26 SoftPLC-Z 1K Originator: F. PLOTMAN File B: Name : \TDZ\SPLC\DIFDEMO.lob

Version : 2.30 SoftPLC-Z 1K Originator: C. HOLBROOK Comparing datatables... ------- Data table differences ------- File size differs in two programs -------------------------------------- A - File: 4 - TIMER - Size: 3 B - File: 4 - TIMER - Size: 4

File: 4 - TIMER

------------------------------

A AC:0 PR:0 B AC:0 PR:250 (Preset value is different)

File does not exist in program A -------------------------------------- A - File: 9 - UNKNOWN - Size: 0 B - File: 9 - INTEGER - Size: 3 Comparing program areas... ------- Program differences ------- ******* Difference section ******* (XIC Bit address is different)Rung P2/1 AI:010 O:010 A-] [--------------------------------------------------------------------( )--A 03 01 Rung P2/1 BI:010 O:010 B-] [--------------------------------------------------------------------( )--B 04 01 ******* Difference section ******* (Rung either added to A Rung P2/4 or deleted from B)AI:010 B003 A-] [--------------------------------------------------------------------(U)--A 03 02 ******* Difference section ******* (Instruction added to B)Rung P2/9

Page 209: Topdoc Manual

CHAPTER 25 THE DIFFERENCE DETECTOR

SoftPLC Corp., Inc. 28 July 200025-4

AI:010 B003 A-] [--------------------------------------------------------------------(L)--A 05 01 Rung P2/8 BI:010 I:010 B003 B-] [----] [-------------------------------------------------------------(L)--B 05 14 01 ******* Difference section ******* (Time base was changed)Rung P2/16 AB003 +- TON ----+ A-] [---------------------------------------------------------+ T004:001 +(EN)A 04 ! Base .01 ! A ! PR 123 +(DN)A ! AC 0 ! A +----------+ Rung P2/15 BB003 +- TON ----+ B-] [---------------------------------------------------------+ T004:001 +(EN)B 04 ! Base 1.0 ! B ! PR 123 +(DN)B ! AC 0 ! B +----------+

Figure 25-1Difference Report Example

Page 210: Topdoc Manual

Pub. No. TDZ-MN1 28 July 200026-1

CHAPTER 26

PROGRAM EXPORT/IMPORT OPTIONS

This chapter describes the Workfiles menu options Export and Import . These options are usedto perform program file format conversions between the formats used by TOPDOC, the PLC, andthe Allen-Bradley 6200 or RSLogix software.

NOTE: TOPDOC for SoftPLC includes PLC-5 uploadcapability. Therefore, you could directly connectto a PLC-5 and upload the logic to the TOPDOC.LOB format without needing to convert it.

LADDER FILE FORMATS

There are three PLC program file formats you may want to use with TOPDOC, identified by the fileextension:

1) .LOB Files must be in this format to be used with the TOPDOC Editor and Documentor.These are called Workfiles. Files uploaded/downloaded from/to the PLC withTOPDOC are also in this format.

2) .PC5 These files are complete memory images in Allen-Bradley's ASCII program textformat used with 6200 versions 4 and later or RSLogix software. You can convertto/from this format using TOPDOC.

3) .ACH Files in this format are called Archive files and can be exchanged with Allen-Bradley 6200 Software versions 3 and earlier.

EXPORT OPTIONS

When you select Export from the Workfiles Menu, a menu is displayed with the options PC5 (Ascii) , ACH (Archive) and Quit . Quit returns you to the Workfiles Menu.

PC5 (ASCII) OPTION/LADDER DECOMPILER

You use the PC5 (Ascii) option to convert a program (<FILE>.LOB) to Allen-Bradley program textfile (<FILE>.PC5) format for use with Allen-Bradley's 6200 Series Software, versions 4 and later,or RSLogix

. PC5 (Ascii) actually runs a separate utility program called the Ladder Decompiler. This utility canalso be run from the operating system command line. Doing so gives you additional flexibility and

Page 211: Topdoc Manual

CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS

SoftPLC Corp., Inc. 28 July 200026-2

options not available when the utility is run from the menu. We suggest you read this entire sectionbefore using this option.

The Ladder Decompiler (ldcomp5.exe) is a utility program that converts a file in SoftPLC’s binaryformat (.LOB) into a text file in Allen-Bradley's ASCII format (.PC5). This text file is a representationof processor memory that includes data table, ladder program file, force table, and configurationtable sections. Once the PC5 file is created, it can be directly edited with a text editor or used withthe Allen-Bradley 6200 or RSLogix software.

NOTE: The Decompiler operates on new format LOB files.Before using the utility from the command line, youcurrently must convert the old LOB format files to the newLOB format using another conversion program. If you runthe decompiler from the TOPDOC menus, this conversionis run automatically.

Before running the Ladder Decompiler you must have an LOB format file of the program. Theseare automatically created with the TOPDOC offline package or can be created after doing an uploadwith TOPDOC.

RUNNING THE DECOMPILER FROM TOPDOC

After you select the PC5 (Ascii) option from the Export Menu, you must enter the following:

1) Workfile to convert: This is <FILE>.LOB, the program you have edited using TOPDOC and nowwant to convert to PC5 (Ascii) format.

2) Destination PC5 (Ascii) file: This is the name you want to give to the version of the PLC-5program you want to use with Allen-Bradley's 6200 Software. This can be the same as<FILE>.LOB.

CAUTION: If a PC5 file of the same name already exists, it will bewritten over by the decompiler without a warning message.You may want to rename or make a backup copy of theexisting PC5 files prior to running this option.

You will also be asked if you want the destination *.PC5 file to contain extended documentation(helpful information) or not. See "THE -D SWITCH" below for details on the extendeddocumentation.

TOPDOC then converts the LOB file to new TOPDOC format. It then runs the decompiler for you,displaying status and error messages on the screen. Press any key to return to the menu when thedecompilation is complete.

NOTE: If you need to use the "no comments" capability in yourdecompilation, you MUST run the utility from thecommand line. The menu does not allow you to passoptions to the decompiler.

Page 212: Topdoc Manual

CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS

Pub. No. TDZ-MN1 28 July 200026-3

Page 213: Topdoc Manual

CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS

SoftPLC Corp., Inc. 28 July 200026-4

RUNNING THE DECOMPILER FROM THE COMMAND LINE

To run the decompiler from the command line, use the following syntax:

ldcomp5 [-d] <filename>.lob

The -d Switch

The -d switch turns on the option to decompile a program with detailed documentation about wordand bit definitions for the Processor Status file, PID, Block Transfer, Timer/Counter/Control. Thisswitch makes the resulting *.PC5 file larger, so use it only if you need to edit the words and bits ofthe files mentioned.

The -c Switch

The -c switch is normally NOT used. When you run the Decompiler with the -c option, you do notget comments in the resultant <filename>.pc5. This makes <filename>.pc5 smaller, but difficultto read and understand.

Filename Specification

You need to specify the name of the LOB format file(s) you want to decompile into PC5 format files.

You can use DOS wildcard specifications (* and/or ?) in the <filename>. However, the extensionMUST be LOB in order for the decompiler to work. For example:

ldcomp5 conv*.lob

would decompile all LOB files that have names starting with conv, which could be a set of programsfor a conveyor system (ie: conv1, conv2, etc.).

If the LOB file is in a different directory than the one you are running the decompiler, from you needto also specify the PATH. For example:

ldcomp5 D:\splc\txtpgms\myfile.lob

would decompile myfile.lob in the \splc\txtpgms directory on drive D.

The PC5 file will have the same root name as the LOB file, only the extension will be different.

CAUTION: If a PC5 file of the same name already exists, it will bewritten over by the decompiler without a warning message.You may want to rename or make a backup copy of theexisting PC5 files prior to running LDCOMP5.

Page 214: Topdoc Manual

CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS

Pub. No. TDZ-MN1 28 July 200026-5

Page 215: Topdoc Manual

CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS

SoftPLC Corp., Inc. 28 July 200026-6

LADDER DECOMPILER OUTPUT

A successful decompile creates a PC5 format file that can be loaded into a text editor, wordprocessor or the Allen-Bradley 6200 software.

Decompile errors should only occur if the LOB file is invalid or is a TOPDOC old format. As thedecompiler runs, error messages will display on the screen.

If an error occurs during decompiling, the name of the current file being decompiled is printed alongwith the current line number and an error message. The line where the error was found is usuallyprinted BELOW its corresponding error message. A '^' points to the location in the current line wherethe error was found.

If any decompile errors occur, no PC5 output file will be created.

If you are running the decompiler from the command line, by using the DOS redirection command,you can send the error messages to a disk file or printer. For example:

ldcomp5 <filename>.lob >lpt1

will send the decompiler messages to the printer attached to lpt1.

ACH (ARCHIVE) OPTION

You use the ACH (Archive) option to convert a Workfile (<FILE>.LOB) to archive file(<FILE>.ACH) format for use with Allen-Bradley's 6200 Series Software, versions 3 and earlier.

After you select ACH (Archive) from the Export Menu, you must enter the following:

1) Workfile to convert: This is <FILE>.LOB, the program you have edited using TOPDOC and nowwant to convert to archive format.

2) Destination archive file: This is the name you want to give to the version of the PLC programyou want to use with Allen-Bradley's 6200 Software. This can be the same as <FILE>.LOB.

After you enter the filenames, <FILE>.LOB is copied and converted to <FILE>.ACH. During theconversion process, the Workfile and archive file names and the program header description aredisplayed. You can press any key to return to the Workfiles Menu when the conversion is complete.

NOTE: This option only converts the ladder logic and data table.To convert documentation (labels and rung comments),you must run a separate utility. See Chapter 27 forinformation on the Convert Documentation option.

IMPORT OPTIONS

Page 216: Topdoc Manual

CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS

Pub. No. TDZ-MN1 28 July 200026-7

When you select Import from the Utilities Menu, another menu is displayed with the options PC5(Ascii) , ACH (Archive) and Quit . Quit returns you to the Workfiles Menu.

PC5 (ASCII) OPTION/LADDER COMPILER

You use the PC5 (Ascii) option to convert a program in Allen-Bradley 6200 Software (versions 4and later) program text file format (<FILE>.PC5) to TOPDOC workfile format (<FILE>.LOB).

The PC5 (Ascii) option actually runs a separate utility program called the Ladder Compiler. Thisutility can also be run from the operating system command line. Doing so gives you additionalflexibility and options not available when the utility is run from the command line.

NOTE: If you are simply converting a program exported from6200 software, you can skip the section entitled"ADVANCED FEATURES". If you are using text to generatethe program, you most likely will want to use the fullcapabilities of the Ladder Compiler. In this case, youshould carefully read all sections of this manual related tothe Ladder Compiler.

NOTE: This option only converts the ladder logic and data table.To convert documentation (labels and rung comments)you must run a separate utility. See Chapter 39 forinformation on the Convert Documentation option.

The Ladder Compiler is a utility program that converts a text file in Allen-Bradley's ASCII format(.PC5) into SoftPLC’s binary format (.LOB). This text file is a representation of SoftPLC processormemory that includes data table, ladder program file, force table, and configuration table sections.Once the LOB file is created it can be directly loaded into TOPDOC.

The other main features of the Ladder Compiler, described under "ADVANCED FEATURES", are:

1) Symbolic Programming2) File Inclusion capability3) Detailed Verification and Updating

Before using the Ladder Compiler utility, you should have already created the .PC5 text file(according to the Allen-Bradley documentation), created any text files that will be #included duringcompilation, and assigned values to any #define'd symbols that will be resolved during compilation,if any.

RUNNING THE COMPILER FROM TOPDOC

To run the Ladder compiler from the TOPDOC menus, select Workfiles from the main menu, thenImport . Next, select PC5 (Ascii) to compile a *.PC5 text file into a TOPDOC *.LOB file.

After you select PC5 (Ascii) , you must enter the following:

Page 217: Topdoc Manual

CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS

SoftPLC Corp., Inc. 28 July 200026-8

1) PC5 (Ascii) file to convert: This is <FILE>.PC5, the program you have edited using the Allen-Bradley 6200 Software and now want to convert to TOPDOC LOB format.

2) Destination Workfile: This is the name you want to give to the version of the PLC-5 programyou want to use with TOPDOC. This can be the same as <FILE>.PC5.

TOPDOC then runs the utility for you, displaying status and error messages on the screen. Next,it runs the LOB conversion utility to ensure the LOB file is in the correct format for this version ofTOPDOC. Press any key to return to the menu when the conversion is complete.

NOTE: TOPDOC uses the "redefine" capability in the compilationwhen you run the Ladder Compiler from the menu. If youdo NOT want the "redefine" capability, you MUST run theutilities from the command line. The menu does not allowyou to pass options to the compiler. Refer to "THE -rSWITCH" for more information.

RUNNING THE COMPILER FROM THE COMMAND LINE

To run the compiler, use the following syntax from the command line:

lcomp5 [-r] <filename>.pc5

The -r Switch

For advanced users:

The -r switch MUST be used if you are redefining symbol names within the same <filename>.pc5.Otherwise, you will get compile errors. In other words, if you #define a symbol name more thanonce in the complete resultant file (the .pc5 file and any include files), you must use the -r switchto tell the compiler that you DO want to redefine the symbol.

Filename Specification

You need to specify the name of the PC5 format file(s) you want to compile into LOB format files.

You can use DOS wildcard specifications (* and/or ?) in the <filename>. However, the extensionMUST be PC5 in order for the compiler to work. For example:

lcomp5 conv*.pc5

would compile all PC5 files that have names starting with conv, which could be a set of programsfor a conveyor system (ie: conv1, conv2, etc.).

If the PC5 file is in a different directory than the one you are running the compiler from, you needto also specify the PATH. For example:

Page 218: Topdoc Manual

CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS

Pub. No. TDZ-MN1 28 July 200026-9

lcomp5 D:\splc\txtpgms\myfile.pc5

would compile myfile.pc5 in the \splc\txtpgms directory on drive D.

The LOB file will have the same root name as the PC5 file, only the extension will be different.

CAUTION: If an LOB file of the same name already exists, it will bewritten over by the compiler without a warning message.You may want to rename or make a backup copy of theexisting LOB files prior to running LCOMP5.

LADDER COMPILER OUTPUT

A successful compile creates an LOB format file that can be loaded into TOPDOC.

NOTE: The Ladder Compiler generates a version new LOB formatfile. Currently, TOPDOC does not use this format. Youmust run a separate utility program to convert the newLOB file to old LOB format. If you run the compiler fromthe TOPDOC menus, this conversion is doneautomatically.

During compilation, the Ladder Compiler performs most of the same steps that TOPDOC does whenyou are editing a program. Each address of each rung is checked for validity and if the addressdoes not exist, the compiler will create the data table for it automatically. If the insertion of a rungrequires data table updates, such as with the Block Transfer instructions, the updates are done bythe compiler. Any conflicts with address types are reported.

Compile errors include address type conflicts, invalid instruction mnemonics, invalid control codes,and more. As the compiler runs, error messages will display on the screen.

If an error occurs during compiling, the name of the current file being compiled is printed along withthe current line number and an error message. The line where the error was found is usually printedBELOW its corresponding error message. A '^' points to the location in the current line where theerror was found. In the example below, a JSR mnemonic was incorrectly typed as a JR. Thisresulted in the following errors:

Compiling conv2.pc5conv2.pc5(1309): Error: invalid input "JR"SOR JR 3 0 EOR ^conv2.pc5(1309): Error: error in input area of rungSOR JR 3 0 EOR

^

If you get a compilation error with a $C or $F code, you should edit the PC5 file using any text editorand delete everything from the Output Force area to the end of the file.

If any compile errors occur, no LOB output file will be created.

Page 219: Topdoc Manual

CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS

SoftPLC Corp., Inc. 28 July 200026-10

If you are running the compiler from the command line, by using the DOS redirection command, youcan send the error messages to a disk file or printer. For example:

lcomp5 <filename>.pc5 >lpt1

will send the compiler messages to the printer attached to lpt1.

NOTE: The Ladder Compiler currently ignores any SFC and I/OModule Configuration information present in the ASCII file.The file will be compiled, but the information will be thrownaway.

ADVANCED FEATURES

This section will describe how to use the Ladder Compiler Symbolic and Macro Programming(#define and #include) features.

SYMBOLIC PROGRAMMING/USING #define

With the use of the #define keyword in the text file, you may define a symbol, and any subsequentuse of that symbol will be replaced by your definition text. The syntax used is a subset of thatsupported by the C programming language. Whereas C supports parameters in a macro, the laddercompiler only supports parameter-less macros.

The syntax of the #define is:

#define <SYMBOL NAME> <VALUE>

Symbol names can consist of any ASCII character. The first character of a symbol name must bean alphanumeric character. Values can be any allowed text structures or SoftPLC addresses asdefined by the Allen-Bradley PC5 format requirements.

For example:

#define ADDRESS1 N7:0

Once "ADDRESS1" is defined equal to the text "N7:0" by the above #define statement, the symbolADDRESS1 can be used anywhere in the text, and the symbol will be substituted with "N7:0" by thecompiler before translation to TOPDOC .LOB format.

The compiler accepts a command line switch ( -r ) which, when present, allows you to redefinesymbols that have been previously defined. This way you can have different values for a particularsymbol name at different points during the compile process. The compiler always uses the mostrecent definition of a symbol. If the switch is not present, redefinition of a symbol will be reportedas an error. See Figure 26-1 for an example of how symbol redefinition can be used.

Macro Programming

Page 220: Topdoc Manual

CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS

Pub. No. TDZ-MN1 28 July 200026-11

The #define keyword is not limited to addresses. The text of entire rungs may be defined into asymbol, or you could use it to define sets of values for TIMER datatable values. For example:

#define LATCHRUNG SOR XIC START OTL OUTPUT EOR

The text being replaced by the symbol is limited to 256 characters.

You can split the symbol definition text onto multiple lines, by using the backslash "\" character atthe end of the current line to denote continuation of the definition. For example:

#define LATCHRUNG SOR XIC \START OTL \OUTPUT EOR

We recommend using all capital letters in symbol names so they can be easily manipulated. TheCompiler is case sensitive and using all caps will eliminate potential problems, particularly whenmultiple programmers are working on a project.

You may also consider using the address TAGNAME (from the TOPDOC database) as the Symbolname. This will make the text files relate better to the documentation for the ladder files.

Nesting

If you use symbol names in #define statements, you need to be sure to #define these symbols tovalid SoftPLC addresses, values, or strings PRIOR to using them in another #define or #includedfile. Otherwise, you will get a compile error. For example, to use the following:

#define LATCHRUNG SOR XIC START OTL OUTPUT EOR

you must have previously #define'd START and OUTPUT to actual SoftPLC addresses.

FILE INCLUSION/USING #include

With the use of the #include keyword, you can include other files into the current file by reference.The syntax is exactly the same as the C language. Either <> or "" can surround the file name. Twoexamples:

#include "symbols.txt"#include <rungs.txt>

The included files can contain as little as a single word or as much as entire section definitions, suchas one or more data table files or ladder program files. With this facility, you can organize theproject into several files all included into one main file. Included files can include yet other files, andso on. The maximum number of nesting levels is limited only by the FILES parameter setting inyour CONFIG.SYS file.

The syntax of the #include is:

Page 221: Topdoc Manual

CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS

SoftPLC Corp., Inc. 28 July 200026-12

#include <filename> OR #include "filename"

Filenames can be any valid DOS filename, provided the referenced file is in ASCII format. Ofcourse, to compile properly, the text file must be setup according to the Allen-Bradley PC5 filespecifications.

An environment variable is provided to allow you to specify a search path for the include files (seebelow). Alternatively, you can specify the drive and directory path as part of the filename as follows:

#include "D:\dir1\dir2\file3.txt"

Environment Variable

An environment variable INCLUDE is available that allows the Ladder Compiler to search for includefiles not in the same directory as the PC5 file being compiled. You can use the INCLUDE variablefrom the operating system command line using the SET command, or put the SET command in yourAUTOEXEC.BAT file so it is automatically executed upon computer system bootup.

The INCLUDE variable works like the PATH command. The syntax is:

SET INCLUDE=<path1>;<path2>;...<pathn>;

For example, to allow include files in the \SPLC\TXTPGMS and \SPLC\NEWPGMS directories ondrive D, you could use the following:

SET INCLUDE=D:\SPLC\TXTPGMS\;D:\SPLC\NEWPGMS\;

PUTTING IT TOGETHER

Having both the #include and #define facilities provides you with a lot of power that can cut downon the amount of work needed to complete a project. For example, you may define repetitive rungsin a file using symbols as addresses, define the addresses in other files, and then include differentaddresses for the same rung. This is shown in a simple example in Figure 26-1.

Common code can be isolated in an include file, and the addresses can be changed by changingthe include file that contains the definitions. Repetitive rungs can be easily constructed in this way,using the -r command line switch.

Page 222: Topdoc Manual

CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS

Pub. No. TDZ-MN1 28 July 200026-13

text file "rungdef.txt": +)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))),

*% a symbolically defined rung: % * *#define LATCHRUNG SOR XIC START OTL OUTPUT EOR *

.))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))-

text file "addrdef1.txt": +)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))),

*% define some symbols % * * #define START I0/13 * * #define OUTPUT O1/4 *

.))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))-

text file "addrdef2.txt": +)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))),

*% Redefine the symbols from addrdef1.txt % * * #define START I0/13 * * #define OUTPUT O1/4 *

.))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))-

And tie them all together with text file "main.pc5": +)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))),

*LADDER 2 * * * *% Establish values of ADDRESS1 thru ADDRESS4. % * *#include <addrdef1.txt> * *% Include the symbolic rung definition AFTER the values% * *#include <rungdef.txt> * *% Reference a rung which uses those addresses. % * *LATCHRUNG * * * *% Use the same rung(s) but with different addresses. % * *#include <addrdef2.txt> * *#include <rungdef.txt> * *: * *... and so on. * * *

.))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))-

Figure 26-1Example Ladder Compiler Input File

MISCELLANEOUS CONSIDERATIONS

1) If you attempt to import a PC5 file that contains the #define or #include statements with theAllen-Bradley 6200 software, you will get an "invalid syntax error" for each line containing oneof these statements. You will need to remove them before you can import the file.

2) If you use the wildcard specification capability to compile or decompile multiple filessimultaneously, you should redirect the output of errors to a disk file or printer. This will ensureyou have a complete record of any errors.

3) The Allen-Bradley PC5 format uses the % sign to identify comments in the file. The LadderCompiler can accept either the % sign, the C language /*...*/ structure, or a leading //,terminated by end of line.

Page 223: Topdoc Manual

CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS

SoftPLC Corp., Inc. 28 July 200026-14

ACH (ARCHIVE) OPTION

You use the ACH (Archive) option to convert a PLC-5 program that was created with Allen-Bradley's 6200 version 3 or earlier to a TOPDOC SoftPLC *.LOB workfile.

After you select the ACH (Archive) option from the Import Menu, you must enter the following:

1) Archive file: This is <FILE>.ACH, the file that was used with Allen-Bradley's 6200 Software andyou now want to edit with TOPDOC.

2) Destination Workfile: This is the name you want to give to the version of the PLC-5 programyou want to edit with TOPDOC. This can be the same as <FILE>.ACH.

After you enter the filenames, <FILE>.ACH is copied and converted to <FILE>.LOB. During theconversion process the archive file and Workfile names and the program header description aredisplayed. You can press any key to return to the Workfiles Menu.

NOTE: This option only converts the ladder logic and data table.To convert documentation (labels and rung comments)you must run a separate utility. See Chapter 27 forinformation on the Convert Documentation option.

NOTE: If an .ACH file came from a source other than the Allen-Bradley 6200 Software or TOPDOC, it may not be directlycompatible with the standard .ACH file format as publishedby Allen-Bradley. If you try to import this file intoTOPDOC without success, call SoftPLC Technical Supportfor assistance.

Page 224: Topdoc Manual

Pub. No. TDZ-MN1 28 July 200027-1

CHAPTER 27

DOCUMENTATION CONVERSIONS ANDUTILITIES

This chapter includes information on converting program documentation (address labels and rungcomments) to/from TOPDOC format and other documentation software packages. It also describesthe documentation utilities included with TOPDOC that allow you to manipulate data files and textfiles.

DOCUMENTATION CONVERSIONS

You can convert TOPDOC documentation files to text using the utility programs described in latersections of this Chapter. You can also convert TOPDOC documentation files to Allen-Bradley 6200format as described in this section.

The easiest way to do the conversion is with the Workfiles menu option Convert Documentation.The conversions can also be run from the command line. Both methods are described in thissection.

NOTE: If you have program documentation in the ASCII formatfrom another documentation software package (other thanthe A-B 6200), you can import it into TOPDOC using aseries of utilities available at a nominal fee from SoftPLC.

CONVERTING FROM ALLEN-BRADLEY 6200 TO TOPDOC

The first step in this conversion is to get the Allen-Bradley documentation files into the IPDS ASCIIformat, using the “export to text” procedure. Refer to the A-B documentation for the procedure onhow to do this.

With the IPDS ASCII files, you can now do the conversion into TOPDOC's file formats. Theconversion performs the following steps:

(a) Converts address label to text file format ("*.PRN") and rung comment to text file format("*.GCT"). Both these file formats are TOPDOC's intermediate formats.

(b) Converts TOPDOC's "*.PRN" file into TOPDOC's Database ("*.DBF", "*.ANx", "*.DBT") files.

(c) Converts TOPDOC's "*.GCT" file into TOPDOC's rung comment ("*.CMT") file.

Several programs are called by the conversion utility to accomplish the steps above automatically.

Page 225: Topdoc Manual

CHAPTER 27 DOCUMENTATION CONVERSIONS AND UTILITIES

SoftPLC Corp., Inc. 28 July 200027-2

You can run the utility from within SoftPLC TOPDOC using the Workfiles menu options ConvertDocumentation , then IPDS Ascii to TOPDOC . Alternatively you can run the utility from theDOS command line by typing "ab5util".

CONSIDERATIONS

1) No duplicate description records are allowed.

2) IC (instruction address comment) records are not converted, except in the case when an ACrecord (address comment) is not present for the same address. In this case, the IC record istreated an AC record.

3) Rung comments must be associated with the main address, of the topmost, rightmost outputinstruction of a rung.

NOTE: If there were no rung comments in the 6200 files, you willget an error creating the .CMT file. This can be ignored asthe conversion will successfully complete.

4) I/O Configuration files are not supported by this conversion.

USING THE CONVERSION UTILITY

Regardless of how you load the utility, a menu is displayed with options IPDS Ascii to TOPDOCand TOPDOC to IPDS Ascii. Select IPDS Ascii to TOPDOC, then enter the <PATH> and<FILE> of the ASCII file to be converted. The default <PATH> is the subdirectory the 6200 softwareexports Ascii files to, but you can change it if your files are located elsewhere.

Next, you need to enter the <PATH> and <FILE> for the converted files. The default will be yourdefault TOPDOC data directory with the same <FILE> name. The conversion will then be doneshowing you status messages as it runs. When completed, you will be prompted to "Press any key"which will return you to the menu.

CONVERTING FROM TOPDOC TO ALLEN-BRADLEY 6200

The conversion from TOPDOC to Allen-Bradley 6200 text file involves:

1) Converting TOPDOC's address labels and rung comments into 6200 text Format File ("*.TXT").

2) Importing 6200 Ascii Format file into Allen-Bradley files, using the Allen-Bradley 6200 software.

Several programs are called automatically by the conversion utility to accomplish the steps above.

Page 226: Topdoc Manual

CHAPTER 27 DOCUMENTATION CONVERSIONS AND UTILITIES

Pub. No. TDZ-MN1 28 July 200027-3

You can run the utility from within TOPDOC using the Workfiles menu options ConvertDocumentation , then TOPDOC to IPDS Ascii . Alternatively you can run the utility from theDOS or command line by typing "absutil".

CONSIDERATIONS

1) COMMENT ATTACHMENTS: If different rung comments are linked to the same address (eg:same output instruction on different rungs), only the first rung comment is extracted.

2) TRUNCATION: TD5TOAB.EXE (one of the programs called by the conversion utility) optionallytakes command line arguments, one of which specifies that you want truncation to take placeduring the conversion. If you run "ab5util" program directly or from the TOPDOC menu,truncation IS performed.

Option Description -s Truncate symbols -d Truncate address labels -r Truncate rung comments

The Allen-Bradley text import utility will not convert any records that exceed Allen-Bradley'sspecifications. The options described above are needed to guarantee that those specificationsare not exceeded. We have allowed you to make truncation an option so you can convert fromTOPDOC to Allen-Bradley's text format file without losing text, for editing with a text editor. Todo this however, you must run TD5TOAB.EXE from the command line and not from the menu.

3) SYMBOL/TAGNAME SIZE: Allen-Bradley symbols are 10 characters long (maximum).TOPDOC tags (symbols) are 13 characters long (maximum).

When -s option is used, tags are truncated to 10 characters;

4) LABEL SIZE: Allen-Bradley's address labels are 5 lines by 10 characters. TOPDOC's addresslabels are 5 lines by 13 characters. When -d option is used, a smart algorithm is used tominimize truncation within the label, and only truncate the end.

Example of conversion when -d option is used:

TOPDOC label--> AB label This is for This is forthe purpose the purposeof showing of showinghow the -d how the -doption works option wor

5) LABEL ADDRESSES: There are some differences in the way TOPDOC and Allen-Bradley 6200software address files. If the TOPDOC address is #<addr>, the converted Allen-Bradley labelwill be attached to word <addr>, not the file.

Page 227: Topdoc Manual

CHAPTER 27 DOCUMENTATION CONVERSIONS AND UTILITIES

SoftPLC Corp., Inc. 28 July 200027-4

6) COMMENT SIZE: Allen-Bradley's rung comments are 6 lines (maximum), by 80 characters.TOPDOC's comments can be up to 32K characters, with a maximum of 200 hundred charactersper line. When -r option is specified, only the first 6 lines are used and comment lines of morethan 80 characters are split up into several lines.

USING THE CONVERSION UTILITY

Regardless of how you load the utility, a menu is displayed with options IPDS Ascii to TOPDOCand TOPDOC to IPDS Ascii . Select TOPDOC to IPDS Ascii , then enter the <PATH> and<FILE> of the TOPDOC file to be converted. The default <PATH> is the default TOPDOC softwaredata directory, but you can change it if your files are located elsewhere.

Next, you need to enter the <PATH> and <FILE> for the converted files. The default will be thedefault 6200 text directory (\IPDS\TEXT\PLCx) with the same <FILE> name.

The conversion will then be done, showing you status messages as it runs. When completed, youwill be prompted to "Press any key", which will return you to the menu.

THE DATABASE UTILITY PROGRAM (DBF5.EXE)

Included with your TOPDOC package is a utility program called DBFx.EXE. This program can onlybe run from the command line and uses the following command line format:

dbf5 [flag] <FILE1> <FILE2>

where

"flag" = one of the options described in the next section

and <FILE1> and <FILE2> are the input and output database and/or text files.

COMMAND LINE OPTIONS

This section lists the Database Utility options (flags) that can be used to perform different functions.In the descriptions below, "sdffile" is a standard delimited text file and "dbffile" is a dBASEIV file.

-in Import sdffile <FILE1>.PRN into dbffile <FILE2>.DBF. When duplicate records are located,the last occurrence of the address listed in the file will be used and the duplicate records willbe placed into <FILE2>.DUP.

-io Import sdffile <FILE1>.PRN into dbffile <FILE2>.DBF. When duplicate records are located,the first occurrence of the address listed in the file will be used, and duplicate records intowill be placed into <FILE2>.DUP.

-x Export dbffile <FILE1>.DBF to sdffile <FILE2>.PRN.

Page 228: Topdoc Manual

CHAPTER 27 DOCUMENTATION CONVERSIONS AND UTILITIES

Pub. No. TDZ-MN1 28 July 200027-5

-mn Merges sdffile <FILE1>.PRN with existing dbffile <FILE2>.DBF. When duplicates recordsare located, the last occurrence of the address listed in the sdffile will be used, and duplicaterecords into will be placed into <FILE2>.DUP.

-mo Merges sdffile <FILE1>.PRN with existing dbffile <FILE2>.DBF. When duplicate recordsare located, the first occurrence of the address listed in the dbffile will be used, andduplicate records will be placed into <FILE2>.DUP.

-rn Reindexes the dbffile <FILE1>.DBF. When duplicate records are located, the lastoccurrence of the address will be used, and duplicate records are placed into <FILE1>.DUP.

-ro Reindexes the dbffile <FILE1>.DBF. When duplicate records are located, the firstoccurrence of the address will be used, and duplicate records are placed into <FILE1>.DUP.

MERGING TOPDOC DATABASES

One use of the Database Utility is to merge two TOPDOC databases. This is useful, for example,when TOPDOC programs have been combined via the multifile Editor. In this case, if the databasedid not get copied with the ladder, you can use the Database Utility to merge the databases together.Figure 27-1 illustrates this procedure for two databases.

644444444444447 6444444444444475 <FILE1>.DBF 5 5 <FILE2>.DBF 59444444L4444448 9444444L4444448

R R DBF5 -x <FILE1> DBF5 -x <FILE1> * * 9 9 644444444444447 644444444444447

5 <FILE1>.PRN 5 5 <FILE2>.PRN 5944444L44444448 94444444L444448 .)))))))))))))0)))))))))))))))-

R DBF5 -i <FILE3> * 9 644444444444447 5 <FILE3>.DBF 5 944444444444448

Figure 27-1Merging TOPDOC Databases

The process of merging TOPDOC databases can be completed in three steps using the DBFxprogram.

1) Converting the TOPDOC Database File to SDF (.PRN) Format

Page 229: Topdoc Manual

CHAPTER 27 DOCUMENTATION CONVERSIONS AND UTILITIES

SoftPLC Corp., Inc. 28 July 200027-6

The first step in merging database files is to convert the *.DBF files to ASCII SDF files (StandardDelimited Format). These files are created using the -x option to the Database Utility program,as shown in the example below:

DBF5 -x TDZ\SPLC\EXAMPLE

This will create a file called TDZ\SPLC\EXAMPLE.PRN. If necessary, you can edit this file withany standard Text Editor. You should do this for all the files you want to combine.

2) Combining the .PRN Files

The second step to merging the databases together is to combine the .PRN files together. Thiscan be done two ways.

(a) Using the DOS COPY command:

COPY EXAMPLE1.PRN + EXAMPLE2.PRN FINAL.PRN

Entering this at the DOS prompt will combine two files, EXAMPLE1.PRN, andEXAMPLE2.PRN into a file called FINAL.PRN. This method of combining files can be usedon more than just two files, enabling you to combine two or more files in one step.

(b) The second way of combining files is by using the DOS redirection operator, and the TYPEcommand. This is done as follows:

TYPE EXAMPLE2.PRN >> EXAMPLE1.PRN

Entering this on the DOS command line will add the file EXAMPLE2.PRN toEXAMPLE1.PRN. This method works with two files only. To combine more than two filestogether, you would have to perform the above command for each file.

3) Converting the Combined .PRN file into a TOPDOC Database File

The final step in merging database files is to convert the combined SDF file into a TOPDOCdatabase *.DBF. This is accomplished with the -i option of the Database Utility.

You will need to decide how to handle duplicate records and your choice will determine whichof the -i options you use. The first is "n", which uses the newer (or last encountered) databaserecord when duplicate addresses are encountered. The second is "o", which uses the older (orfirst encountered) database record when duplicate addresses are encountered.

Examples:

DBF5 -in \TDZ\SPLC\FINAL

In this example, DBF5 will import the file FINAL.PRN into a TOPDOC database calledFINAL.DBF. If duplicate records are located, then the last usage of the address in the filewill be used, and a file called FINAL.DUP will be created containing all the duplicate recordslocated, but not used in the database file.

Page 230: Topdoc Manual

CHAPTER 27 DOCUMENTATION CONVERSIONS AND UTILITIES

Pub. No. TDZ-MN1 28 July 200027-7

DBF5 -io \TDZ\SPLC\TEMP \TDZ\SPLC\FINAL

In this second example, DBF5 will import the file TEMP.PRN to a database calledFINAL.DBF, but the first record of any duplicates will be used. FINAL.DUP will be createdcontaining all the duplicate records located, but not used in the database file.

When step #3 is completed, you will have a TOPDOC database file *.DBF, the associatedmemo file *.DBT, and database index file *.AN5. To use this database with TOPDOC, you onlyneed to run the Utilities option Reindex , then you are ready to use the database with theTOPDOC Editor or Documentor.

THE COMMENT UTILITY

This section describes how to use the TOPDOC Comment Utility Program CMT5.EXE. With thisprogram, you can manipulate TOPDOC Rung Comment Files (*.CMT) and General CommentFormat Text Files (*.GCT). With this program, you can use text editors to create rung comments,move rung comments from one program to another, and recover comments that have becomeunsynchronized from their ladder logic rungs.

TOPDOC RUNG COMMENT FILES

The TOPDOC Rung Comment Files are stored in the same subdirectory as your Ladder ProgramFiles (*.LOB), with the same root name as the Ladder Program they belong to and an extension of.CMT. This file contains all the rung comments for the program, as well as information allowingTOPDOC to attach each comment to the proper rung.

Comments are merged with the Ladder Program by comparing the rung number and the first outputinstruction mnemonic on the rung. When you load the program, if a comment exists that does not"match up", TOPDOC places the comment in a *.GCT file and then continues to match rungcomments to rungs. Mismatches are handled on a case by case basis, TOPDOC resynchronizesfrom the point of a mismatch forward automatically.

THE GENERAL COMMENT FORMAT FILE (.GCT)

A *.GCT file entry has four fields. Figure 27-2 shows an example *.GCT file.

1) The first field is the word HEADER enclosed by two asterisks.2) The next three characters contain the mnemonic of the first output instruction on the rung.3) The last nine characters of the header line list the rung number the comment belongs on.4) The next lines contain the text information of the rung comment, up to 32Kbytes of text.

Page 231: Topdoc Manual

CHAPTER 27 DOCUMENTATION CONVERSIONS AND UTILITIES

SoftPLC Corp., Inc. 28 July 200027-8

+))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))),* **HEADER**OTE RNG: 0000 ** This rung provides 3-wire control of the conveyor motor with jam detection for ** automatic shut down. ** ** *HEADER**OTE RNG: 0001 ** A contact on a motion detector is monitored to provide a conveyor RUN indicator. ** ** **HEADER**RTO RNG: 0006 ** The first limit switch enables a Retentive Timer which is latched by the time ** Enable Bit. A jam condition is detected if the timer times out. ** ** **END** *

.)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))-

Figure 27-2Example General Format Comment File

USING THE COMMENT UTILITY PROGRAM (CMT?.EXE)

Included with your TOPDOC package is a utility program called CMT5.EXE. This program can onlybe run from the command line and uses the following command line format:

cmt5 [flag] <FILE>

where

"flag" = one of the options described in the next section <FILE> = the name of the program whose comments you want to manipulate

COMMAND LINE OPTIONS

-i Convert <FILE>.GCT to <FILE>.CMT.

CAUTION: Before doing this operation, you should verify thatthere are not any comments in an existing .CMT fileyou want to keep, because this conversion deletes anyexisting .CMT file before converting the .GCT file.

-x Convert <FILE>.CMT to <FILE>.GCT format.

CAUTION: Before doing this operation, you should verify that anyexisting .GCT file does not contain information youwant to keep, because this conversion deletes anyexisting .GCT file before converting the .CMT file.

NOTE: If you use the cmt5 -x option, and the program containsinstructions using the new MG, BT, PD data types, rungcomment mismatches will occur. In this case, remove the

Page 232: Topdoc Manual

CHAPTER 27 DOCUMENTATION CONVERSIONS AND UTILITIES

Pub. No. TDZ-MN1 28 July 200027-9

mnemonic from the .GCT file and use the merge option torestore the comment file.

-d Reads in the <FILE>.CMT and removes any unused blocks. This reduces the size of the.CMT file, and reduces the disk space used. The Comment Utility program automaticallyperforms this operation when you convert a .CMT file to a .GCT file.

-r Performs the same conversion as the -x option, except instead of creating a .GCT file onthe disk, it displays the information on the screen. This allows you to read the comment filewithout entering TOPDOC, or creating an unnecessary file on disk.

COMMENT UTILITY PROGRAM EXAMPLES

Moving Comments from One Program to Another

If you have two similar programs that you want to use the same rung comments in, you can easilycopy the comments from one program to another using the Comment Utility.

In this example, the comments from a SoftPLC program called PALLET1 will be copied to a SoftPLCprogram called WRAPPER.

1) Convert PALLET1's rung comment file PALLET1.CMT to a .GCT file.

cmt5 -x SoftPLC\pallet1

2) Next, use any text editor to replace the instruction mnemonics with spaces. Do NOT simplyremove the mnemonics or the conversion will not work!

HINT: If the two programs are "exactly" the same, you do notneed to do this step. A good way to check this is to runthe Difference Detector. If the Difference Detector findsa mismatch, you must perform Step #2.

3) Rename the .GCT file for the new program name using the DOS RENAME command.

rename SoftPLC\pallet1.GCT SoftPLC\wrapper.GCT

4) Convert the .GCT file into a .CMT file.

cmt3 -i SoftPLC\wrapper.gct

When you have performed the above steps, when you run TOPDOC and load the file (WRAPPER)into the Ladder Editor or Documentor, the comments will be merged automatically.

Page 233: Topdoc Manual

CHAPTER 27 DOCUMENTATION CONVERSIONS AND UTILITIES

SoftPLC Corp., Inc. 28 July 200027-10

Creating Rung Comments Outside of TOPDOC

You can create rung comments outside of TOPDOC and then use the CMT program to merge thecomment file with the .LOB file. In this example, we will merge comments with a SoftPLC Programfile called MCDEMO.LOB.

1) Using any text editor, create a .GCT file with the same name as your .LOB file. The file needsto be in the format shown in Figure 27-2. When you are creating the record header, leave thethree letter mnemonic field blank. This enables the .GCT file to be merged with the .LOB fileon the basis of rung number only.

2) Use the CMT program to convert the .GCT file that you just created into a .CMT file. Use the-i command line option by typing:

CMT5 -i splc\MCDEMO

3) When this conversion is complete, run TDZ and load the file you just added the rung commentsto (MCDEMO.LOB) into the editor, and the comments will be merged automatically.

Recovering Comments from a .GCT File

If program edits are made online on a PC that does not have documentation files, there is apossibility that another copy of TOPDOC will be unable to synchronize all the rung comments withthe .LOB file when it is uploaded. When TOPDOC finds a comment that it cannot match to a rung,it places the comment in a .GCT file and continues to try and match the rungs. To recover themismatched comments in the .GCT file to the proper program rungs use the following procedure.

In this example we will recover comments for a program file called MCDEMO.LOB.

1) Rename the .GCT file to another name so when you convert the comments still in the .CMT tothe .GCT format you will not lose any comments. You do this by typing:

cd splcrename MCDEMO.GCT MCDEMO.TMPcd ..

2) Convert the .CMT file to a .GCT file by using the -x command line option by typing:

CMT5 -x splc\MCDEMO

3) When this Conversion is complete, use any text editor to append the two files together. Thiswill create a large .GCT file with all of the rung comments that will be contained in your program.

4) Use any text editor to replace the 3 character mnemonic from the header line of the GCTrecords with spaces. (Don't just delete the mnemonic, replace it with spaces.)

5) Then use the CMT program to convert the .GCT file to a Rung Comment File (.CMT), using the-i command line option by typing:

Page 234: Topdoc Manual

CHAPTER 27 DOCUMENTATION CONVERSIONS AND UTILITIES

Pub. No. TDZ-MN1 28 July 200027-11

CMT5 -i splc\MCDEMO

6) When this conversion is complete, run TDZ and load the file you have just recovered the rungcomments for into the editor (MCDEMO.LOB). The rung comments will be mergedautomatically.

Page 235: Topdoc Manual

PART VII

SOFTWIRES

Page 236: Topdoc Manual

THIS PAGE INTENTIONALLY LEFT BLANK

Page 237: Topdoc Manual

Pub. No. TDZ-MN1 28 July 200028-1

CHAPTER 28

SoftWIRES OVERVIEW

This manual explains how you use SoftWIRES to perform PLC program emulation, simulationand testing, using TOPDOC version 4.

WHAT IS SoftWIRES?

With SoftWIRES, you can run your control program logic offline within the computer for testingor training. SoftWIRES executes the ladder diagram instructions identically to the PLC. You canchange data table and I/O values manually or have SoftWIRES automatically transfer data tableand I/O values between the control program and a program that models your process. By usingSoftWIRES, you no longer need to set up elaborate I/O simulation panels or spend time andmoney testing on your actual plant equipment.

SoftWIRES is fully integrated into the TOPDOC offline Ladder Editor and is automaticallyinstalled when you install TOPDOC. Your Software Sentinel and/or TOPDOC software packagemust be enabled for SoftWIRES functionality in order to use the emulator and SoftWIREScapabilities.

O.N.E. INTERFACE OVERVIEW

SoftWIRES also includes an O.N.E. (or "DF1 Interface") that processes Communication networkcommands as part of the simulation. These commands can come from another computerrunning software like graphics packages (ie: Wonderware InTouch, Citect, A-B’s RSView, etc.),other A-B PLC's, and more. So long as the command packets are valid PLC-5 Data HighwayRead/Write type commands, SoftWIRES will understand and respond to them.

With this Interface, you can test not only your PLC programs, but also your operator interfaceapplications. You can also train operators on the operator interface application without needingthe PLC equipment and I/O or I/O simulator! The Interface is described with more detail inChapter 32.

Page 238: Topdoc Manual

Pub. No. TDZ-MN1 28 July 200029-1

CHAPTER 29

PROGRAM EMULATION

This chapter describes how SoftWIRES emulates, or executes, PLC ladder logic. Included arethe SoftWIRES definition of program emulation, modes of emulation, how to emulate a program,and the commands you can use during emulation.

WHAT IS EMULATION?

Emulation is open loop program execution, there is no I/O scan. Simulation (Chapter 30) isclosed loop testing. Program emulation is a powerful debugging and testing tool. The PLCprogram logic is executed in the PC just as the PLC would run it. This allows you to test aprogram before you download it to the PLC.

There are many advantages to program emulation. End users can save a lot of time and moneyby finding programming problems at the engineer's desk instead of tying up (and potentiallyharming) plant equipment. Systems Houses and Consultants have the ability to test programsbefore installation at the client site.

Another advantage of emulation is in teaching personnel how PLC programs actually operate ina classroom setting without having to use PLC equipment or I/O simulator panels.

SoftPLC Corporation provides emulation capability two ways: a) from within SoftWIRES and b)from within the TOPDOC Ladder Editor. When you enter the emulation command, SoftWIRESemulates the currently loaded program file. The SoftWIRES Emulator is nicely integrated withthe TOPDOC Editor providing a highly productive programming and debugging environment.

During program emulation, you can scroll through the ladder diagram and watch the programrunning. SoftWIRES intensifies instructions that are true, just as the TOPDOC Online Editordoes when the PLC is in run mode. The data table is updated as the program runs and you cansee the timers and counters incrementing and values (such as in math instructions) changing.

Contact status change and data table manipulation are included which can be used to simulatelive input status changes. The data table can be examined or altered at any time. You candebug a complete program or small sections at a time.

MODES OF EMULATION

SoftWIRES provides for two different modes of emulation. The two modes are continuous (orrun mode) and single-step. Continuous mode operates as its name implies. The entireprogram is executed just as if the PLC were running it. You can monitor and modify the datatable and turn individual bits on and off.

Single-step mode is a powerful debugging tool. You can execute the ladder diagram one rung ata time, at your command. You can insert breakpoints at critical areas or upon a specific set of

Page 239: Topdoc Manual

CHAPTER 29 PROGRAM EMULATION

SoftPLC Corporation 28 July 200029-2

conditions, then while execution is halted, you can examine and/or modify the data table values. Single-stepping is described in detail later in this chapter.

USING THE EMULATOR

COMMAND: EmulationHOTKEY: [Alt][E]MENU: Special ; Emulate File

The Emulation command is used to access the program emulation feature from the TOPDOCLadder Editor. After you enter/select the command, SoftWIRES pre-scans the current loadedprogram. This pre-scan checks the program much like the Editor Verify option, but adds someadditional checks. If no errors are found, Emulation begins. If the pre-scan finds any errorswhich would cause run-time faults, a message is displayed and the rung containing the error isbrought up. You are back in the TOPDOC Editor operate mode at this time and can take thenecessary actions to correct the problem.

Once the pre-scan is complete with no errors, you are placed in Single-Step Mode of emulation,positioned at the first rung of the ladder. You can continue emulating in single-step mode oremulate in continuous mode by pressing [C].

As the program runs, the instruction status (TRUE/FALSE) is indicated with color change, just asit is when Online with a PLC. The current values of words will be displayed on the screen, as inthe case of the Counter and Timer instructions. You can also monitor the program's data tablevalues using the TOPDOC Data Table Editor. Table 29-1 lists the commands available duringprogram emulation.

You may also see a "DC" appear below bit instructions. This is a feature of SoftWIRESsimulation and can be ignored during simple emulation. For more information, refer to Chapter30.

NOTE: If you choose to use the Data Table Editor to set word orbit values, all of the Data Table Editor commands areavailable. However, the Data Table values arecontinually updated as the program runs, and valuesyou enter may be overwritten by the program.

To quit program emulation and return to the Editor, press [Esc].

NOTE: If you had loaded multiple program files before using theSoftWIRES emulator, these files remain loaded but arenot accessible (via [F7]/[F8]).

Page 240: Topdoc Manual

CHAPTER 29 PROGRAM EMULATION

Pub. No. TDZ-MN1 28 July 200029-3

Table 29-1Emulation Commands

KEYS DESCRIPTION

[8]/[9] [6]/[7] [Home]/[End] [Ctrl][Home] [Ctrl][End] [Ctrl][PgUp] [Ctrl][Down] [Alt][P] [Alt][F] [Alt][D] [Alt][Z] [+]/[-] [Ins][D] [S] [C] [R] [N] [K] [U] [F4] [F6] [Esc]

Go to previous/next rung Go to next/prior instruction Go to first/last instruction on rung Go to first rung in program Go to last instruction in program Go to first instruction in program sectionGo to last instruction in program sectionPosition command Find command Access Data Table Editor Zoom to Data Table Editor Turn ON/OFF the bit corresponding to thecurrent EXAMINE ON/OFF instruction Insert new data into an instruction Enter Single-Step mode Enter Continuous Run mode Restore cursor to next executable rungExecute Next Rung in Single-Step mode Mark rung as breakpoint Unmark breakpoint rung Rung Comments Toggle Address Label Toggle Quit emulation and return to Editor

SINGLE-STEP EMULATION

Single-step emulation allows you to execute PLC logic one rung at a time - at your command. This allows you to get more control of your debugging process and to set the data table values todifferent states to observe the impact on a particular rung or set of rungs.

In single-step mode, time is essentially frozen. Program execution is halted. You havecomplete control. You can execute a rung, move about the program, view or edit the data table,or return to continuous mode.

If you move the cursor, the Restore command ([R]) can be used to reposition at the next rung tobe executed. To execute a rung, the Next command ([N]) is used. Table 29-2 lists the single-step execution commands.

Page 241: Topdoc Manual

CHAPTER 29 PROGRAM EMULATION

SoftPLC Corporation 28 July 200029-4

Table 29-2Single-Step Emulation Commands

KEYS DESCRIPTION

[R] Restore. Return to next rung to be executed.

[N] Next. Execute next rung.

[C] Continue. Return to continuous emulation mode.

+ all the commands listed in Table 29-1.

ENTERING SINGLE-STEP EMULATION MODE

When you first load SoftWIRES or the Emulator, you are in single-step mode. You can alsoenter single-step mode from within SoftWIRES by pressing the [S] key at any time when incontinuous mode.

BREAKPOINTS

Breakpoints are locations in the program or specific conditions upon which you want to stopcontinuous execution and enter single-step mode. You can mark certain rungs as breakpoints oryou can use ladder logic to automatically trigger single-step mode upon a certain set ofconditions.

When a Breakpoint occurs, including when you press [S], a Breakpoint message occurs. Press[Enter] to clear the message. You will be positioned on the last rung scanned when theBreakpoint occurred.

If you are in the Data Table Editor when a Breakpoint occurs, TOPDOC will display a messagethat single-step mode has begun. You can continue editing the data table by pressing any key toclear the message. Program execution will not begin until you return to the ladder display andenter the proper command to continue execution ([N] to execute next rung).

Marked Breakpoints

You can mark rungs as Breakpoints to automatically trigger single-step emulation mode whenthe rung is executed. To mark a rung as a breakpoint, press [K]. The power bars will change to"B"s to indicate the rung is a marked Breakpoint. To unmark a breakpoint rung, position on therung and press [U].

Breakpoints are "sticky". What this means is that breakpoints remain marked until you unloadthe program file by either exiting the Editor (by going back to the Main Menu) or using the Close option from the Editor File Menu. So, you can stop emulation, edit the logic (including markedrungs), and start the emulation again without having to remark breakpoints.

Page 242: Topdoc Manual

CHAPTER 29 PROGRAM EMULATION

Pub. No. TDZ-MN1 28 July 200029-5

The Breakpoint Instruction

Marked breakpoints can be used, for example, to stop continuous execution when a particularsubroutine is executed, such as a fault or shut-down routine. To do this, you would mark the firstrung of the subroutine. Similarly, you would mark a rung within a MCR zone.

Another way to use marked breakpoints is to mark the first/last rung of a program to see theeffects of a single scan.

A special output instruction with mnemonic BKP (for BreaKPoint) is also available. When a rungcontaining this instruction is TRUE and the rung is scanned, single-step emulation mode isentered. The instruction can be used like any other PLC instruction throughout your program. There is no limit to the number of Breakpoint instructions allowed.

NOTE: SoftWIRES for TOPDOC versions 3.0 and earlier usedthe BRK mnemonic. Since SoftPLC support BRK as avalid instruction, we have changed the mnemonic toBKP in version 4.

Once energized, the Breakpoint instruction acts like an output latch instruction. In other words,single-step mode is ON until you issue a Continue command ([C]) to return to continuousexecution. If another true Breakpoint instruction is encountered while in single-step mode, it isignored, and single-step mode is continued without interruption.

If you use the BKP instruction, it will need to be removed prior to downloading the program to thePLC.

The BKP instruction (-(BREAK)-) can be used to stop execution, for example, when:

@ a certain amount of time has elapsed or number of scans have occurred by using aTimer/Counter Done bit to energize the Break instruction,

@ a certain set of I/O conditions exist which could cause a potentially dangerous or equipmentdamaging situation,

@ the rungs of particular interest for the test are about to be scanned,

@ and many others.

Page 243: Topdoc Manual

Pub. No. TDZ-MN1 28 July 200030-1

CHAPTER 30

SoftWIRES SIMULATION

This chapter describes the concept of SoftWIRES, how SoftWIRES works, and how you can useSoftWIRES as a testing and training tool. Unlike Emulation, which is open-loop, SoftWIRESsimulation provides for complete closed-loop testing.

ABOUT SoftWIRES

SoftWIRES lets you test your control program against a program that models your process. Thissimulation, which includes feedback, lets you completely test your program without the need forcumbersome wiring and the expense of test panels. In fact, SoftWIRES permits kinds of testingthat can't be done with hardwired panels.

SoftWIRES can be used to test process startup, shutdown, normal operations, error conditions,and failure simulations. SoftWIRES modeling handles inputs and outputs, both discrete andanalog, and permits on-screen verification of control programs, system model functions, andlogic states. You can test an entire program or a range of rungs and "single-step" to execute asingle rung at a time. You can preset program interrupts to flag the occurrence of pre-definedevents.

With SoftWIRES, testing can be done during development. You can design the system and yourcontrol program simultaneously. Since the actual control and process equipment is not neededfor testing you reduce shop downtime and the risk of equipment damage during startup. Byreducing travel and time spent on location, you can spend more time designing.

PROCESS MODELING

Your process modeling program can be as simple or complex as you want. The simplest case iswhere no model is used at all. This is the Emulator, an open loop testing situation where thedata values are manipulated by you using the Data Table Editor and contact and datamanipulation (refer to Chapter 29).

Another simple model is a Sequencer Output instruction. You can use this instruction to load apredefined sequence of changing inputs into the control program data table. Your process modelprogram can consist of several of these Sequencer Output instructions with different sequencertables each designed to exercise your control program under varying conditions.

From these simple cases, your model can be made as detailed as you want. Chapter 4 givesguidelines and sample models for different control logic sequences, both digital and analogcontrol.

Page 244: Topdoc Manual

CHAPTER 30 SoftWIRES SIMULATION

SoftPLC Corporation 28 July 200030-2

GETTING READY TO USE SoftWIRES

Before you can use SoftWIRES to test your PLC logic, you must do the following:

1) create a control program2) create a model program3) create/load an environment

You use the TOPDOC Editor for steps 1 and 2. You use the SoftWIRES option for step 3. Environments are described in detail in the next section.

When you select SoftWIRES , a menu with options Environment , Go , Setup , and Quit isdisplayed. Quit returns you to the Editor Menu. Go begins the simulation and is describedlater. Setup is for more advanced simulation and is described in Chapter 32.

ENVIRONMENTS

SoftWIRES uses an "Environment" to determine how the test will be run. You need to create anEnvironment before you can run SoftWIRES. The Environment option on the SoftWIRESMenu is used to create/edit Environments. When you select Environment , another menu isdisplayed with the options Edit , Load , Write , and Quit . Quit returns you to theSoftWIRES Menu.

Load brings an existing environment off the disk into memory. When you select Load ,SoftWIRES requests the name of the Environment you want to use. Environments are called<filename>.CTL. If you press [Enter] on a blank filename prompt, SoftWIRES lists all theexisting Environments.

Write saves the current Environment to disk as <filename>.CTL. When you select Write ,SoftWIRES asks you to provide the name of the Environment.

When you select Edit , you can create/change an Environment using the displayed menuoptions Control , Process , Flow Sequence , Wiring Diagram , and Quit . An Environmentconsists of:

1) Control program name,2) Process simulation program name,3) Program Execution Flow Sequence, and 4) Wiring Diagram definition. The Wiring Diagram is used to specify how each I/O bit is

transferred between the Control program and the Process program.

ENTERING THE PROGRAM NAMES

To enter the control program name, select the Control File option. This will bring up thestandard Path/File Entry Window. Enter the name of the control program file.

Page 245: Topdoc Manual

CHAPTER 30 SoftWIRES SIMULATION

Pub. No. TDZ-MN1 28 July 200030-3

To enter the process simulation program name, select the Process File option. This will bringup the standard Path/File Entry Window. Enter the name of the process model program file.

Remember you can press [Enter] on a blank filename field to get a list of all the .LOB files in thespecified path.

THE FLOW SEQUENCE

The Flow Sequence determines the order of test execution. You have six available choices.

1) Control Program Scan - executes the control program rungs2) Output Scan - transfers outputs from the control to process3) Process Program Scan - executes the process program rungs4) Input Scan - transfers inputs from the process to control5) Reset Field Outputs - sets all unforced outputs to zero6) Flush Field Inputs - sets all unforced inputs to zero

The Flow Sequence you create determines, in part, how the simulation takes place. The FlowSequence is a powerful tool that can help make your simulation easier and can help you simulatea variety of different field conditions. The default Flow Sequence is the most normal condition.

To change the Flow Sequence, select the Flow Sequence option. This will position the cursorin the Flow Sequence window and you can make edits. [8] and [9] can be used to move thecursor within the window.

You can delete the current item or insert new items before the current item. To delete an item,press [Del]. To insert, press [Ins]. This displays a list box of choices. Within the list box,position the cursor on your desired selection and press [Enter]. This will insert this item abovethe current item in the Flow Sequence and return the cursor to the Flow Sequence window.

To change an existing entry in the Flow Sequence, press [Enter]. This displays a list box ofchoices. Within the list box, position the cursor on your desired selection and press [Enter]. Thiswill change the item and return the cursor to the Flow Sequence window.

To quit editing the Flow Sequence and return to the menu, press [Esc].

THE WIRING DIAGRAM

The SoftWIRES Wiring Diagram is the heart of SoftWIRES. The Wiring Diagram lets youspecify which I/O is to be simulated, which is to be ignored, and allows you to force I/O pointsON and OFF. This section describes how to set up the Wiring Diagram.

The Wiring Diagram is to be viewed from the perspective of the Control Program. An "input" isan input to the Control program (the factory to the PLC) and an "output" is an output to theProcess Program (the PLC to the factory). The Process Program, although a normal .LOB file,is written differently than a normal program. It examines output addresses and energizes inputaddresses, backwards from a normal control program. The Wiring Diagram is the same size asthe I/O image table of the Control Program.

To edit the Wiring Diagram, select the Wiring Diagram option from the Environment EditMenu. This displays the Wiring Diagram display and a menu with options Edit , Bit/Word

Page 246: Topdoc Manual

CHAPTER 30 SoftWIRES SIMULATION

SoftPLC Corporation 28 July 200030-4

Toggle , Auto Advance , and Quit . Quit returns you to the Environment display. Theother options are described in this section.

The Wiring Diagram Editor can be used in word mode or bit mode. In word mode, the cursor is16 bits (1 word) wide and you can modify all 16 bits of the word as a whole. In bit mode, thecursor is 1 bit wide and you can modify each individual bit. The Bit/Word Toggle option isused to toggle between word and bit editing modes.

The Auto Advance option operates like the Data Table Editor. If Auto Advance is ON, you canedit multiple words/bits sequentially. If Auto Advance if OFF, you edit a single word/bit at a time. The Auto Advance option toggles from Auto Advance ON to OFF each time you select it.

The Edit option is used to view and make changes to the Wiring Diagram. Using the WiringDiagram is similar to using the Data Table Editor. The available commands are listed in Table30-1.

NOTE: The Wiring Diagram editor can also be accessed fromthe ladder display during program simulation by pressing[Alt][S].

Table 30-1Wiring Diagram Commands

KEYS DESCRIPTION

[8]/[9] [6]/[7] [PgDn] [PgUp] [Ins] [Alt][S][Esc]

Move up/down one word Move right/left one bit/word Move down 16 words Move up 16 words Change current bit/word Display/Edit Wiring Diagram from ladderReturn to Environment Menu or ladder

I/O Bit Status

After you select Edit , you can position the cursor anywhere within the I/O data table files usingthe commands listed in Table 30-1. To change a word or bit value, press [Ins]. This displays amenu with the options Connect , Disconnect , Force On , and Force Off. These optionscorrespond to the four states you can set for each I/O bit. As you cursor through the WiringDiagram, the Control Program label for that bit will be displayed if you are in Bit editing mode. Ifyou are in Word mode, the label for the word is displayed.

Connect/Disconnected Points

An input bit which is Connected will have its value transferred from the process program to thecontrol program. An output bit which is connected will have its value transferred from the controlprogram to the process program. A connected bit is displayed with an "=" in the Wiring Diagram.

Page 247: Topdoc Manual

CHAPTER 30 SoftWIRES SIMULATION

Pub. No. TDZ-MN1 28 July 200030-5

A bit which is Disconnected will not have its value transferred from the control program to thetest program and vice versa. A disconnected bit is displayed with a "." in the Wiring Diagramand has the letters DC below bit instructions using the address in the ladder display.

You can also connect/disconnect bits from the ladder display by pressing [Del][*] to Disconnector [Ins][*] to Connect when positioned on any bit instruction.

Forced I/O

An input bit which is Forced ON will be set to 1 in the control program input image table, while anoutput bit which is Forced ON will be set to 1 in the process program output image table. Aforced on bit is displayed with "8" in the Wiring Diagram.

An input bit which is Forced OFF will be set to 0 in the control program input image table. Anoutput bit which is Forced OFF will be set to 0 in the process program output image table. Aforced off bit is displayed with "9" in the Wiring Diagram.

SoftWIRES forces act like PLC forces. Control program output bits which are forced will displaythe true unforced value in the Data Table Editor. Control program input bits which are forceddisplay the forced value in the Data Table Editor. The forced ON or OFF condition is displayedbelow the instructions in the ladder display. You can also force from the ladder display bypressing [Ins][+] to force ON or [Ins][-] to force OFF when positioned on any bit instruction.

RUNNING THE TEST

The Go option on the SoftWIRES Menu is used to begin the test run. Before you select Go you must create or Load an Environment. After you select Go , SoftWIRES does a pre-scanto check the programs (refer to Chapter 29), and, if no errors are found takes you into single-stepexecution mode, performing based on the Flow Sequence which is normally at the first rung ofthe control program. You can then use any of the commands in Table 30-2.

If you don't have an environment loaded, then SoftWIRES will force you into the EnvironmentEditor.

Page 248: Topdoc Manual

CHAPTER 30 SoftWIRES SIMULATION

SoftPLC Corporation 28 July 200030-6

Table 30-2SoftWIRES Commands

KEYS DESCRIPTION

[8]/[9] [6]/[7] [Home]/[End] [Ctrl][Home]/[End][Ctrl][PgUp] [Ctrl][Down] [Alt][P] [Alt][F] [Alt][D] [Alt][Z] [F4] [F6] [Alt][S] [+]/[-] [Ins][+]/[-] [Del][+]/[-] [Ins][*]/[Del][*] [Ins][D] [F7]/[F8] [Esc] [Esc][Esc] [K] [U] [Alt][G] [C] [N] [R] [S]

Go to previous/next rung Go to next/prior instruction Go to first/last instruction on rung Go to first/last rung in program Go to first instruction in pgm section Go to last instruction in pgm section Position command Find command Access Data Table Editor Zoom to Data Table Editor Rung Comments Toggle Address Label Toggle Access SoftWIRES Wiring Table Turn ON/OFF bit for EXAMINE ON/OFF Force ON/OFF current bit Remove Force ON/OFF Connect/Disconnect current bit Insert data values into an instruction Control/Model program display Toggle Stop simulation and go to Editor Quit and return to Editor Menu marK rung as Breakpoint Unmark rung with Breakpoint Continue simulation after editing Return to continuous execution mode Execute next rung Restore pointer to next executed rung Single-step mode

NOTE: All the information in Chapter 29 on emulationBreakpoints, etc., also applies to your SoftWIRESsimulation. By combining and using all these tools youcan perform easy yet sophisticated program tests.

Page 249: Topdoc Manual

Pub. No. TDZ-MN1 28 July 200031-1

CHAPTER 31

WRITING A PROCESS MODEL

This chapter gives guidelines on writing a process model. A process model can be as simple orcomplex as you want. You can model the entire process controlled by the control program oronly critical portions.

The main thing to remember when writing a model is that in the process program you examineoutput addresses and energize (or control) input addresses, which is essentially backwards fromwriting control program logic. You are writing a program that explains to the PLC what theprocess (factory) does.

THE SIMPLEST MODELS

A SEQUENCER OUTPUT instruction can be used to generate input conditions you want to test. Based on a set of conditions, such as a timer, manual pushbutton, etc., you can have a processprogram, which is simply an XIC followed by a SQO, feed various input conditions to your controlprogram.

For example, if a box is moving down a conveyor, the input conditions are related to time (ie: thespeed of the conveyor). So we could have a program that looks like Figure 31-1 to model ourconveyor process.

The Sequencer table values would contain the conditions of the inputs as product moves downthe conveyor, including normal cases, start-up, and error conditions such as jam-ups or conveyormotor failure. The control program can then be tested to ensure it properly handles eachcombination of inputs that could occur.

* TIMER START TIMER TO STEP * * PUSHBUTTON THE SEQUENCER * * I:012 +) TON )), *

P2/0 /)))))] [)))))))))))))))))))))))))))))))))))))))))))))))))))))1T004:000/(EN)1 * DC 00 *Base 1.0* * * *PR 10/(DN)* * *AC 0* * * .))))))))- * * C:C:COUNTER TO * * TEN SECOND CONTROL THE * * TIMER DONE SEQ STEP * * T004:000 +) SQO ))))))))))))), *P2/1 /))))]/[)))))))))))))))))))))))))))))))))))))))))1 SEQUENCER OUTPUT /)(EN))1

* DN * FILE: #N010:000 * * * * MASK: #N009:000 /)(DN) * * * 1111111111111111 * * * * DEST: I:010 * * * * 0000000000000000 * * * * CONTROL: R006:000 * * * * LEN/POS: 22/ 0 * * * .)))))))))))))))))))- *

Page 250: Topdoc Manual

CHAPTER 31 WRITING A PROCESS MODEL

SoftPLC Corporation 28 July 200031-2

Figure 31-1Process Model Using a Sequencer

By making the logic which drives the SQO more complex, you can easily do more sophisticatedtesting without having to write a complete rung by rung process program. In this example, theprocess model simply drives inputs. BREAKPOINT instructions can be inserted in the controlprogram to catch interesting conditions.

DISCRETE I/O MODELING, THE 3 WIRE PROGRAM

Figures 31-2 and 31-3 show a simple discrete I/O modeling situation - the 3 wire program. Figure 31-2 is a simple start/stop pushbutton circuit which turns on a motor that locks in anauxiliary contact.

This circuit normally would not require rungs in the process model other than to examine themotor (XIC) and turn on the auxiliary contact (OTE). For demonstration purposes, let's get fancyand assume we want to model the time delay from when the motor is energized to when theauxiliary contact is locked on. Figure 31-3 depicts an example of this model. Rung 1 starts atimer when the motor is turned on. Rung 2 turns on the auxiliary contact when the timer timesout.

The start and stop pushbuttons are manually controlled devices. There are two ways to simulatethis. The first is with the standard Flow Sequence of Process Scan, Input Scan, Control ProgramScan, Output Scan. In this case, we want to manually control the pushbuttons, so we want toDisconnect these inputs in the Wiring Diagram. Any Disconnected input can be manipulatedfrom the ladder display with the [+] and [-] keys. If an input is Connected, then it normally cannotbe manipulated this way because its value will be established by the field (ie: the processprogram). The motor and the auxiliary contact will be monitored/controlled by the processprogram so we want to Connect these inputs in the Wiring Diagram.

The second method would be to use a Flow Sequence which flushes the Field Inputs, then doesan input scan. In this case, we must use Forcing to control the pushbuttons. The motor andauxiliary contact must also be connected in the Wiring Diagram in this case.

Page 251: Topdoc Manual

CHAPTER 31 WRITING A PROCESS MODEL

Pub. No. TDZ-MN1 28 July 200031-3

This is the control program. Ready to download into the PLC after testing.

In a SoftWIRES environment the auxiliary contact's data will be simulated by SoftWIRES and the process program. This simulation will allow the process/designing engineer to test the process sequencing and analog criteria before the control hits the floor. This is good for safety, and cost savings in start-up and development.

* This is the * * N.C. stop N.O. start output for the* * pushbutton pushbutton FVNR motor * * at station at station starter MS-21* * ST3-S22 ST3-S22 in Dryer room* * I:010 I:010 O:011 *

P2/0 /)))))]/[)))))0)))))] [)))))0))))))))))))))))))))))))))))))))))))))))( ))))))1 * 00 * 01 * 00 * * * This is the * * * *hold-in input* * * * from motor * * * *starter MS-21* * * *in Dryer room* * * * I:010 * * * .)))))] [)))))- * * 02 *

Figure 31-2The 3Wire Control Program

This is the simulation program. We examine outputs and energize inputs. The Timer is used to simulate a small delay the may occur during energization of the Motor Starter.

* This is the This delay * *output for the timer will * * FVNR motor provide a * *starter MS-21 minor bit * *in Dryer room change delay * * O:011 +))TON))), *

P2/0 /)))))] [))))))))))))))))))))))))))))))))))))))))))))))))))))))1T004:000/(EN)1 * 00 *Base .01* * * *PR 100/(DN)1 * *AC 0* * * .))))))))- * * When the timer times out, close the auxiliary contact on the motor starter. * This delay This is the * * timer will hold-in input* * provide a from motor * * minor bit starter MS-21* *change delay in Dryer room* * T004:000 I:010 *

P2/1 /))))] [)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))( ))))))1 * DN 02 * * *

Figure 31-3The 3Wire Modeling Program

Page 252: Topdoc Manual

CHAPTER 31 WRITING A PROCESS MODEL

SoftPLC Corporation 28 July 200031-4

ANALOG I/O MODELING, FIRST ORDER LAG

You can use simple instructions to model analog I/O responses. As a simple case, let's use atank temperature application. Suppose an open tank is to be kept at constant temperature. Thewind and outside temperature affect the tank liquid temperature. A device measures thetemperature of the tank and a steam valve is controlled to maintain the constant desiredtemperature.

This process can be modeled with a simple first order lag equation:

Yn = Yn-1 * (1-a) + a * Xn,

where Xn is the current analog sample, Yn is the output, and "a" is the tuning constant that youadjust from 0 to 100%. If "a" is 0, the lag is infinite and if "a" is 1, there is no lag.

This equation can be modeled using only the rungs shown in Figure 31-4.

* TIMER DONE * * T004:000 +) MUL )))))))))))),*P2/0 /))))] [)))))))))))))))))))))))))))))))))))))))))))))))))1 A * B --> R /1

* DN * A: N007:000 ** * * 0 ** * * B: N007:001 ** * * 0 ** * * R: N007:002 ** * * 0 ** * .))))))))))))))))))-* * TIMER DONE * * T004:000 +) MUL )))))))))))),*P2/1 /))))] [)))))))))))))))))))))))))))))))))))))))))))))))))1 A * B --> R /1

* DN * A: N007:003 ** * * 0 ** * * B: N007:004 ** * * 0 ** * * R: N007:005 ** * * 0 ** * .))))))))))))))))))-* * TIMER DONE * * T004:000 +) ADD )))))))))))),*P2/2 /))))] [)))))))))))))))))))))))))))))))))))))))))))))))))1 A + B --> R /1

* DN * A: N007:002 ** * * 0 ** * * B: N007:005 ** * * 0 ** * * R: N007:006 ** * * 0 ** * .))))))))))))))))))-* * +) MOV )))))))))))),*

P2/3 /))))))))))))))))))))))))))))))))))))))))))))))))))))))))1 (MOVE) A --> R /1 * * A: N007:006 ** * * 0 ** * * R: I:000 ** * * 0000000000000000 ** * .))))))))))))))))))-* * *

Figure 31-4First Order Lag Model

Page 253: Topdoc Manual

Pub. No. TDZ-MN1 28 July 200032-1

CHAPTER 32

SOFTWIRES O.N.E./COMMUNICATION DRIVER

One powerful capability of SoftWIRES is the ability to interface SoftWIRES to other devices thatcommunicate using the Allen-Bradley DF1 protocol (the "language" used by the Data Highwayand Data Highway Plus). These devices may be other computers running graphics software, likeWonderware’s InTouch, Intellution FIX, A-B RS-VIEW, other SoftPLC’s, or A-B PLC's.

With this feature, you cannot only use SoftWIRES to test PLC logic and do ladder logic orprocess simulations, but also use it to:

. create more sophisticated models which include graphics or the capabilities of the graphicsprogram;

. use the graphics program (or other PLC program) to affect the simulation

. test the process graphics as well as the ladder logic

. train operators without PLC or process equipment

HARDWARE CONFIGURATIONS

You can connect your computer to a PLC as if you were going to use TOPDOC Online. Refer tothe Quick Reference Guide for details on the different connections possible.

To connect two computers together, you can use 2 interface modules, such as Ethernet ports onthe same TCP/IP network, or Data Highway Cards (eg: 1784-KTX), connected straight throughtogether (pin 1 to 1, 2 to 2, 3 to 3).

You can also tie the COM port on the SoftWIRES computer to a COM port on the secondcomputer via (2) RS-232-C cables connected to a common Female/Female Null Modemconnector WITHOUT the need for a Communications Interface Module. You can use any nullmodem cable (eg: Lap-Link cable), these are available from SoftPLC Corp. as Cat. No. ICO-CNM. No other special hardware is required.

NOTE: You can use this same hardware configuration betweentwo COM ports in the same computer (if your graphicssoftware runs under a Win32 operating system).

SOFTWARE SETUP

There are two steps to set up the communications. These can be done with the SoftWIRES Setup option. When you select Setup , a menu appears with options Edit and DriverConfiguration .

The Driver Configuration option loads the O@N@E Configuration program ONECNFIG. Thisprogram is described in detail in other TOPDOC documentation. Configure your

Page 254: Topdoc Manual

CHAPTER 32 SOFTWIRES O.N.E/COMMUNICATION DRIVER

SoftPLC Corporation 28 July 200032-2

communications based on the hardware you are using. Only O@N@E channels 0-3 can be used. For COM drivers, we recommend you use 9600 baud.

Next, using the Edit option, set up the SoftWIRES Communications Configuration. For eachactive channel, set the DF1 Active value to "Y". Make sure the inactive channels are set to"N".

The PLC-2 Compatibility File field is available if you are using this feature of the PLC-3 andPLC-5. Most of the time, this would be set to "Normal". Other valid values are 0-63. Refer tothe Allen-Bradley documentation for more information.

RUNNING THE SIMULATION

Once you have configured the hardware and communications software, you are ready to run thesimulation. Load the SoftWIRES Environment, then select the Go option from the SoftWIRESmenu. Next, start-up your graphics application(s) and/or PLC's.

You can use all the SoftWIRES features including single-stepping, forcing, and breakpoints. However, in addition, any commands received over the active O@N@E Channels will beprocessed. For example, if your graphics application sends the command to Set a Bit, it will beset and you will see this reflected in both the graphics application and the SoftWIRES data tableand ladder displays!

Page 255: Topdoc Manual

Pub. No. TDZ-MN1 28 July 200033-1

CHAPTER 33

BLOCK TRANSFER

This chapter discusses how SoftWIRES emulates the Allen-Bradley Block Transfer instructionsand gives an overview of how to use Block Transfer instructions in your process model program. This chapter assumes that you have read the discussion of Block Transfer in the appropriate A-B processor manuals.

HOW SoftWIRES BLOCK TRANSFER WORKS

The SoftWIRES Block Transfer Message system allows the control program and process modelprograms to communicate with one another through fictitious intelligent I/O modules.

In the PLC, block transfers are carried out asynchronously with the program scan. SoftWIRESBlock Transfers are carried out synchronously with changes in the control flow.

Consider the case with a flow sequence consisting of CONTROL PROGRAM SCAN, OUTPUTSCAN/TRANSFER, PROCESS SIMULATION, and INPUT SCAN/TRANSFER. In this context,BTR or BTW instructions encountered in the control program will issue read or write requestmessages based on module addressed and size of the transfer.

Following the OUTPUT SCAN/TRANSFER and immediately before starting the PROCESSSIMULATION, reply messages for the simulation program will be received and the simulationprogram's data table updated, but let's come back to this later. During the simulation programscan, BTR or BTW instructions encountered will issue read or write request messages similar tothose in the control program. Following the INPUT SCAN/TRANSFER, and before starting theCONTROL PROGRAM SCAN, outstanding requests from the simulation program and the controlprogram are compared looking for matches.

The matching process consists of looking for control program READ requests that have acorresponding simulation program WRITE request, or control program WRITE requests thathave a corresponding simulation program READ request. Before two requests can be matched,they must refer to the same Rack, Group, and Module address, and must be requests of thesame length. Once two requests have been matched, the corresponding reply messages aregenerated waiting for the program to receive these replies.

Following the matching process and before the control program scan, the control program's replymessages are received, and the data table is updated accordingly. If the reply was to a READrequest, then the data is copied into the data file, and the control structure is updated. If thereply was to a WRITE request, only the control structure is updated. This receiving messagesand updating the data table is repeated before the simulation program scan as mentioned earlier.

Next, the control program scan begins again, more requests are generated and the cycle beginsagain.

Page 256: Topdoc Manual

CHAPTER 33 BLOCK TRANSFER

SoftPLC Corporation 28 July 200033-2

BTR/BTW INSTRUCTIONS IN THE CONTROL PROGRAM

This section identifies differences in control bit operation from PLC operation and SoftWIRESemulator operation when the Block Transfer instructions are located in the Control Program.

ST - This bit is not used in the emulator because the complete transfer always takesplace at once and never lasts through a program scan.

NR - In SoftWIRES, if a control program request is not answered within 10 cycles throughthe control flow sequence, an error is declared and the NR and ER bits will be set.

TO - The time-out bit is not implemented. As discussed above, if a control programrequest is unanswered in 10 cycles, the "no response" condition will be reached.

If a requested block length of 0 is entered into a control program BTR/BTW instruction, the firstrequest from the simulation program matching the Rack, Group, and Module will be matched tothis request allowing the simulation program request to determine the size of the transfer.

BTR/BTW INSTRUCTIONS IN THE SIMULATION PROGRAM

When considering Block Transfer instructions in the simulation program, you need to take theperspective of emulating an I/O module. Thus a BTW instruction can almost be considered anoffer to give data to the control program, and a BTR instruction is an offer to take data from thecontrol program. In this context, the operation of the instructions are a little different in thesimulation program.

Figure 33-1 shows some example rungs that can be used in the process model to emulate anintelligent I/O module that sends data to the control program.

The primary difference between simulation program requests and control program requests isthat simulation program requests are not allowed to remain outstanding through multiple controlflow sequence cycles. A simulation program request always gets a reply in the scan immediatelyfollowing the one the request was issued in. In this case, a "no response" return simply meansthat there was no corresponding control program request issued that cycle.

The differences in control bit operation are:

ST - This bit is not used in the emulator because the complete transfer always takesplace at once and never lasts through a program scan.

NR - In SoftWIRES, if a simulation program request is not answered in the matchingbefore the control program scan, NR is set with the DN bit.

TO - The time-out bit is not implemented.

Page 257: Topdoc Manual

CHAPTER 33 BLOCK TRANSFER

Pub. No. TDZ-MN1 28 July 200033-3

If a requested block length of 0 is entered into a simulation program BTR/BTW instruction, thiswill be a meaningless request for the transfer of 0 words of data. Remember, the simulationprogram BTR/BTW instructions are the I/O "modules".

* T004:000 +) BTW )))))))))))), */)))))] [))))))))))))))))))))))))))))))))))))))))1 BLOCK XFER WRITE /(EN)))))))1

* DN * RACK: 1 * ** * GROUP: 2 /(DN) ** * SLOT: 1 * ** * CTRL: #N007:000 /(ER) ** * DATA: #N012:000 * ** * LENGTH: 54 * ** * CONTINUOUS: N * ** .))))))))))))))))))- *

* Bit 15 - Enable These XIC instructions are here only to * Bit 13 - Done show the state of the BTW control bits. * Bit 12 - Error * Bit 09 - No response * * N007:000 N007:000 N007:000 N007:000 O:000 *

/))))] [)))))] [))))))] [))))))] [)))))))))))))))))))))))))))))))))))( ))))))))** 15 13 12 09 00 ** *When DN is set with NR reset, the BTW instruction has successfully sent *data to the control program. When this rung goes true, the "I/O module" *is free to change the data that it is trying to send, knowing that the *last batch of data has been sent. * * N007:000 N007:000 B003 +) COP ))))))))))))), */)))] [))))))]/[))))[ONS]))))))))))))))))))))0)))))1 FILE COPY /)))))))1

* 13 09 00 * * SOURCE: #N012:001 * ** * * DEST: #N012:000 * ** * * LENGTH: 53 * ** * .)))))))))))))))))))- ** * +) ADD )))))))))))), ** .))))))1 A + B --> R /)))))))1* * A: N012:053 * ** * 151 * ** * B: 1 * ** * R: N012:053 * ** * 151 * ** .))))))))))))))))))- *

* T004:000 B003 */))))))] [)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))(U))))))))1

* DN 00 ** T004:000 T004:000 *

/))))))]/[))))))))))))))))))))))))))))))))))))))))))))))))))))))))))(TON)))))))1* DN Base .01 ** PR 00020 ** AC 00012 ** *

Figure 33-1Sample Block Transfer Modeling Rungs

Page 258: Topdoc Manual

CHAPTER 33 BLOCK TRANSFER

SoftPLC Corporation 28 July 200033-4

PART IXPART IX

OPTIMIZATION & TROUBLESHOOTINGOPTIMIZATION & TROUBLESHOOTING

Page 259: Topdoc Manual

THIS PAGE INTENTIONALLY LEFT BLANK

Page 260: Topdoc Manual

Pub. No. TDZ-MN1 28 July 200034-1

CHAPTER 34

OPTIMIZATION

This chapter contains system optimization hints. You can use this information to optimize theperformance of TOPDOC and improve your overall PLC program development and maintenanceprocess.

NOTE: In addition to this manual, we have prepared ApplicationNotes to address specific tasks, such as PLC program ordocumentation conversion programs and additionalavailable utility programs. Our website lists theApplication notes available.

CUSTOMIZING YOUR TOPDOC INSTALLATION

This section describes ways to customize your TOPDOC installation, configuration, and the wayTOPDOC loads and runs.

CONFIG.SYS FILE SETUP

1) You should have a "FILES=20" (or a higher number) statement in your CONFIG.SYS fileto ensure you don't get file open errors. If installed properly, the TOPDOC installationprocess automatically sets this in your CONFIG.SYS file. Refer to your DOS manual fordetails on the CONFIG.SYS file and the FILES command.

2) If you did not use the subdirectory defaults when installing TOPDOC, you should increasethe allocated environment space by at least 2000 to accommodate the TOPDOC and O@N@Eenvironment variables. You do this by modifying the CONFIG.SYS statement"shell=command.com /E:xxx" (with xxx = 2000 greater than previous value). If you did nothave a "shell=" statement, use /E:2048.

INSTALLATION OPTIONS

When you install TOPDOC you are asked to provide the names of subdirectories to be used for theTOPDOC programs and related files, user configuration files, and user PLC application files. Thisflexibility provides a way for you to customize your installation.

TOPDOC finds the appropriate subdirectories you need through the use of operating system"Environment Variables". The variable values are established with the DOS "SET" command. Seethe section entitled "USING ENVIRONMENT VARIABLES" for information on the SET command.

Page 261: Topdoc Manual

CHAPTER 34 OPTIMIZATION

SoftPLC Corp., Inc. 28 July 200034-2

By selecting directories other than the TOPDOC defaults, you can, for example: separate files usedby multiple TOPDOC users on a computer or LAN network; or separate files for each application,plant area, or (for OEM's and System Integrators) for each customer.

HINT: If you install TOPDOC on a Local Area Network, each usercan have their own configuration and application files byspecifying different settings for the environment variables.

The Environment Variables available for installation configuration are:

TDZEXE This is the location of the TOPDOC programs (*.exe), help files and the resource file.The default is "\TDZ\" or "\TDZ\". For example:

SET TDZEXE=D:\TOPDOCZ\

TDZCFG This is the location of the configuration files (printer, colors, editor, etc.). The defaultis "\TDZ\" or "\TDZ\". For example:

SET TDZCFG=D:\TOPDOCZ\MYTDZCFG\

TDZDAT This is the default location of your PLC application programs and documentation (*.lob,*.dbf, etc.). The default is "\TDZ\PLC5\" or "\TDZ\PLC3\". For example:

SET TDZDAT=D:\TOPDOCZ\DATA\

ONE This is the location of the \TDSYS directory for all O@N@E communication driver files.For Example:

SET ONE=C:\TDSYS\

LOADING OPTIONS

TOPDOC can be loaded with command line options to modify the default configuration.

HINT: You can use combinations of loading options, providingthey are not in conflict with each other (ie: tellingTOPDOC to do the same thing 2 different ways).

There are 2 categories of loading options: (1) video and color options and (2) entry points. Eachare described in the following sections.

SCREEN DISPLAY OPTIONS/OPTIMIZATION

When TOPDOC installs, the default display size is 25 lines x 80 characters.

43 Line Mode Options

Page 262: Topdoc Manual

CHAPTER 34 OPTIMIZATION

Pub. No. TDZ-MN1 28 July 200034-3

Computers with a VGA card and monitor can load TOPDOC with 43 lines instead of 25 using the"-v5" option. This will allow you to nearly double the amount of ladder diagram displayed in theLadder Editors.

Height and Width Options

Computers with a "smart" VGA card can adjust the Ladder Editor display from 25 x 80 through 50x 132 using the Height and Width options.

The Height option (-hxx) sets the number of displayed lines, where xx is a value from 25 to 50. TheWidth option (-wxxx) sets the number of displayed lines, where xxx is a value from 80 to 132.

To set the height and width, use a command string like:

-hxx -wxxx

Example: TDZ -h43 -w132

The maximum values are a factor of the ability of the graphics card in your computer. If a value isselected beyond the performance ability of the card, display problems will be apparent when youattempt to run TOPDOC. Normally, adjustments to the height do not cause a problem, but the widthadjustments might.

NOTE: To adjust the width, you may first have to use theappropriate setup procedure for your graphics card toachieve the desired display. This procedure will bedescribed in your video card manual, and will most likelyentail running a utility program that came with the card.After you perform the procedure, you can then use theHeight and Width options to tell TOPDOC what yourgraphics card is set for.

LOGGING TOPDOC USERS

If multiple users have access to your PLC's and TOPDOC files, you can keep track of who madethe last change to each program file with the use of an operating system Environment Variablecalled "TD_ID". In the program header is a field called "Originator". Each time the program iswritten to disk (after an upload or offline edit), the Originator Name is updated with the current valueof TD_ID. Refer to "USING ENVIRONMENT VARIABLES" for information on how to set the TD_IDvalue.

HINT: The <Originator> will be in the program header regardlessof who is using the computer. This variable is global forall TOPDOC packages installed on the computer,regardless of PLC model. You can write a batch file thatasks for the user's name and sets this variable accordingly

Page 263: Topdoc Manual

CHAPTER 34 OPTIMIZATION

SoftPLC Corp., Inc. 28 July 200034-4

before loading TOPDOC if many people are using thecomputer and the "Originator" value is important to you.

USING ENVIRONMENT VARIABLES

NOTE: The loading option codes for TDZ MUST be in lower caseletters. You can get a list of available loading options byentering the following:

TDZ -?

You can use the loading options for TDZ by entering them directly on the command line.

Alternatively, you can use the "SET" command either from in AUTOEXEC.BAT or from thecommand line to set the loading options and environment variables. The SET command is usedas follows:

SET <env var name>=<value>

In AUTOEXEC.BAT, the SET commands should be placed before any SHELL is loaded. By placingthe environment variable settings in AUTOEXEC.BAT, TOPDOC will always use the definedconfiguration automatically.

HINT: If network users boot off a local workstation drive, eachuser can have a different TOPDOC configuration bymodifying their individual AUTOEXEC.BAT files.

From the command line, SET commands can be entered manually on an individual basis, or youcan use a batch file to group them together, then run the batch file before loading TOPDOC. Whenyou install TOPDOC, we do this by creating a "RUNTDZ.BAT" which includes the necessary SETcommands for the installation option variables. By modifying RUNTDZ.BAT, you can furthercustomize your TOPDOC setup, either by adding additional variable settings or changing theexisting ones.

NOTE: If you use the RUNTDZ.BAT method, be sure to inform allTOPDOC users to load with RUNTDZ so the variables getproperly set!

HINT: On a Local Area Network, you can customize each user'sTOPDOC configuration by having a unique batch file.

OPTIMIZING TOPDOC PERFORMANCE

This section describes ways to obtain the peak performance from TOPDOC.

INCREASING SCROLLING SPEED

Page 264: Topdoc Manual

CHAPTER 34 OPTIMIZATION

Pub. No. TDZ-MN1 28 July 200034-5

1) Turn Off Documentation: You can increase Ladder Editor scrolling speed by turning the RungComments ([F4]) and Address Labels ([F6]) off until you locate the desired rungs. This willespecially help online when you have a slow hard disk or network because, although theprogram is in the PLC, the documentation is on the disk.

2) Helpful Commands: Remember to use the powerful commands TOPDOC provides such as theFind Commands ([Alt][F]), the Position Command ([Alt][P]), and On-Screen Cross ReferenceDisplay ([Alt][S]) to quickly find the desired rungs rather than scrolling through the program.

3) Editor Configuration: You can set the Editor Configuration values to maximize the amount ofLadder visible at any time and to determine the number of rungs scrolled with the [PgUp]/[PgDn]keys, which are faster than using the arrow keys.

PRINTED REPORTS OPTIMIZATION

This section describes ways to (a) optimize the speed of report output and (b) to minimize theamount of paper used. Refer to Chapter 30 for details on using the Printer Configuration programto set these parameters.

REPORT OUTPUT SPEED

To maximize the output speed of TOPDOC's Ladder Report on a non-laser printer:

@ Do not print the right power bar.@ Do not use IBM graphic characters.@ Set the XREF OVERRIDE to "Yes" for addresses used many times in the program so the cross

referencing does not print each time the address is used on different rungs.

MINIMIZING PAPER USAGE

To minimize the amount of paper used by TOPDOC's Ladder Report you can:

@ Set "Suppress Blank Line" to "Yes" to not print a blank line between the rung and the outputcross referencing.

@ Don't make your rung logic (with documentation turned on) wider than your selected print width.If a rung will not fit on a page, the logic is continued on the NEXT page.

@ Set the XREF OVERRIDE to "Yes" for addresses used many times in the program so the crossreferencing does not print each time the address is used on different rungs.

@ On laser printers, set Lines/Page to a high (>90) number.@ Select a Report Width between 125 and 199 columns. 200 column reports print multiple labels

for multi-address instructions, which may cause the rung to be too wide for the page, thuscausing a form feed to continue the logic on the next page.

@ If Center Descriptors? is set to "Yes", TOPDOC automatically bottom justifies and centersaddress labels above the instruction. TOPDOC does not always print extra blank lines on thereport. Therefore, if your labels are all under 5 lines each rung will take less lines to print.

Page 265: Topdoc Manual

PART XPART X

APPENDICESAPPENDICES

Page 266: Topdoc Manual

THIS PAGE INTENTIONALLY LEFT BLANK

Page 267: Topdoc Manual

Pub. No. TDZ-MN1 28 July 2000A-1

APPENDIX A

TOPDOC FILES

This Appendix lists the files included with TOPDOC, and those created as you use TOPDOC toperform various functions.

HINT: Before installing any TOPDOC updates, you should usethis section to determine what files to save and what filesto delete. Always check the TDZREAD.ME file on theTOPDOC disks before deleting any files.

DISTRIBUTION DISK FILES

The files included on the TOPDOC CD is listed below. The files marked with an * must be in thesubdirectory you designated for the TOPDOC programs when you installed TOPDOC (default of\TDZ) in order for TOPDOC to run properly.

TDZREAD.TXT A text file containing information about TOPDOC that is not included in thismanual. We highly recommend that you print this file out and read itbefore installing the program.

HISTORY.TXT A text file containing an enhancement and bug fix listing for each TOPDOCrevision.

TDZ.EXE *Main TOPDOC executable program.

TDZ.RES *Resource File. Includes all TOPDOC prompts, menu options, etc.

TDZHELP.HLP *The text file for the help and error messages.

TDZHELP.NDX *The index file for the help text file.

SENTTEST.EXE Program that can read Software Sentinel programming and test operation.

DBF5.EXE The database export utility.

CMT5.EXE The comment file export utility.

AB5UTIL.EXE *TOPDOC/A-B 6200 Documentation Conversion Utility menu program.

AB5TOTD.EXE *A-B 6200 to TOPDOC Documentation Conversion, called byAB5UTIL.EXE.

TD5TOAB.EXE *TOPDOC to A-B 6200 Documentation Conversion, called byAB5UTIL.EXE.

Page 268: Topdoc Manual

APPENDIX A TOPDOC FILES

SoftPLC Corp. Inc. 28 July 2000A-2

LOBCVT5.EXE *TOPDOC version 2-3.4 to version 3.5 *.LOB conversion. (DOS SoftPLC only)

LDCOMP5.EXE *Program to convert *.LOB files to *.PC5 format text files. (DOS SoftPLC only)

LCOMP5.EXE *Program to convert *.PC5 format text files to *.LOB files. (DOS SoftPLC only)

ACHFIX.EXE Program to fix a bug in ICOM’s ACH export function.

TDZ.ICO Icon to load TOPDOC.

ININST.ISN TOPDOC uninstall program.

TDVERS.EXE Displays the version of TOPDOC.

DRIVER FILES

The following files must be in your \TDSYS directory in order to communicate between yourcomputer and a SoftPLC.

COMMON FILES

ONECFWIN.EXE The O@N@E driver configuration program.

DRIVERS.CFG A drivers available list used to display the menu in ONECNFIG.

CFGHELP.HLP The ONECNFIG help file.

CFGHELP.NDX Index file for the ONECNFIG help system.

ONEPRO.EXE A TSR (Terminate and Stay Resident program) used with Win32 O@N@E forcommunications.

ONEPRO.BAT Batch file used to load ONE PRO.

ONE.ICO Icon to load ONE PRO.

ONEDMP.EXE Program to dump a communications trace for troubleshooting.

ONEDVR.CFG File that stores the configuration files for O@N@E Channels you have configured.

README.TXT ONE readme file.

O@@N@@E -KT DRIVER FILES

ONEKT.WIN Driver program for communications via the 1784-KT module. (DOS only)

ONEKT*.BIN Binary files used by 1784-KTX cards.

Page 269: Topdoc Manual

APPENDIX A TOPDOC FILES

Pub. No. TDZ-MN1 28 July 2000A-3

ONEKT.CFG ONEKT driver configurations you have set up.

O@@N@@E COM DRIVER FILES

ONECOM.WIN Driver program for communications between the computer serial to theSoftPLC RS-232 ports.

ONECOM.CFG ONECOM driver configuration for drivers you have set up.

O@@N@@E-DH DRIVER FILES

ONEDHA.WIN Driver program for communications via the SoftPLC ICO-DHA cards.

DH.BIN Binary file required for the ICO-DHA cards to the Data Highway I.

DHPLUS.BIN Binary file required for the ICO-DHA cards to the Data Highway Plus.

ONETCP.WIN Driver program for communications between TOPDOC and SoftPLC overTCP/IP Ethernet.

ONETCP.CFG Configuration files for ONE TCP channels you have set up.

CONFIGURATION FILES

The files listed below store configuration information. They are created when you setup your printer,editor, colors, and communication parameters and then save them to disk. These files should bein the directory you specified for configuration files when you installed TOPDOC (default of \TDx).

RUNTDZ.BAT A batch file created by the installation program to ensure the environmentvariables, which determine the location of the TOPDOC files, are set properlywhen TOPDOC is loaded.

PRINTER.CFG The Printer Configuration file. This file contains the type of device and port youare using for printing reports and the information needed to properlycommunicate with your printer.

AB5EDIT.CFG The Editor Configuration file. This file contains the information about how youwant your rung comments displayed during ladder diagram editing and howmany rungs to scroll with the [PgUp] and [PgDn] keys.

WC.CFG The Color Configuration file. This file contains the window color selections.

DH.CFG The PLC communications configuration. This file contains the last channel andstation number accessed by TOPDOC, which is used to display the defaults.

SWIRE.CFG The SoftWIRES configuration file which contains the communications setup.

Page 270: Topdoc Manual

APPENDIX A TOPDOC FILES

SoftPLC Corp. Inc. 28 July 2000A-4

Page 271: Topdoc Manual

APPENDIX A TOPDOC FILES

Pub. No. TDZ-MN1 28 July 2000A-5

PROGRAM AND DATA FILES

The following files store your PLC programs, associated documentation, and other data files. Werecommend you store these files in the default \TDZ\SPLC directory on your hard disk, but you canstore them anywhere you specify.

<FILE>.LOB A PLC program in TOPDOC Workfile Format - the format TOPDOC uses to"read" the PLC program for editing, reporting and documentation.

<FILE>.ACH A file in archive file format. PLC-5 files in this format can be used with Allen-Bradley's 6200 Software (versions 3 and earlier).

<FILE>.PC5 A file in Allen-Bradley program text file format. SoftPLC files in this format canbe used with Allen-Bradley's 6200 Software (versions 4 and later) and withSoftPLC’s Ladder Compiler/Decompiler utilities.

<FILE>.XD2 A cross reference data file for the PLC program. These files are created whenyou choose the Cross Ref menu option from the Utilities menu.

<FILE>.XI2 A cross reference index file. These files are created when you choose theCross Ref menu option from the Utilities menu.

<FILE>.DBF A Database file of address labels in dBASEIV format. These files are createdwhen you enter address labels with the Dbase menu option or by using theLabel Editor command from the Ladder Editor.

<FILE>.AN5 Database index files. These files are created when you create a Database and<FILE>.TN5 are maintained using the Reindex option on the Utilities Menu.

<FILE>.DBT A Database memo file. These files are created when you create a Database.

<FILE>.CMT A rung comment file. These files store the rung comments created with theRung Comment Editor.

<FILE>.GCT A file created when rung comment re-synchronization fails. Refer to Chapter39 for more details.

<FILE>.TXT A file created when you save a rung comment to disk from the Comment Editor Write option.

<FILE>.PRN A file containing Documentor output when you select Disk File as the outputdevice in the printer configuration file.

<FILE>.DFT A file containing the difference report generated when using the Diff option onthe Workfiles Menu and selecting to save the output to a <FILE>.

<FILE>.OPT A file created when you configure a set of reports for Batch output and save itto disk.

Page 272: Topdoc Manual

APPENDIX A TOPDOC FILES

SoftPLC Corp. Inc. 28 July 2000A-6

<FILE>.WLS The file used to store the Data Watch Lists for a program.

<FILE>.NCR A file created when you save a Non-Sequential Rung list.

<FILE>.IOC The I/O Configuration file.

<FILE>.IOD A file created when you edit the I/O Configuration Units.

<FILE>.HST A Contact Histogram data file created when you log to File and Console .

<FILE>.CTL A SoftWIRES environment file created when you save to disk.

<FILE>.**$ These are scrap files that can be deleted. They only exist if a process wasinterrupted by power outage or other major failures.

Page 273: Topdoc Manual

Pub. No. TDZ-MN1 28 July 2000B-1

APPENDIX B

PID AUTO-TUNING

This Appendix provides information on the Auto-Tuning Aid included with TOPDOC.

ABOUT THE PID TUNING METHOD WE ARE USING

TOPDOC's PID Autotune function employs an open-loop algorithm that uses a reaction curve forthe process. The loop is placed in Software Manual mode, giving TOPDOC the ability to set theController Output (CO). A step change is applied to CO, and then the Process Variable (PV) ismonitored in order to determine the process reaction curve response.

TOPDOC uses this curve to suggest values for the three tuning parameters:

@ proportional gain, integral gain, and derivative gain in the case of INDEPENDENT gains@ controller gain, integral time, and derivative time in the case of DEPENDENT gains

This algorithm is well-suited to processes that can be modeled by a first order lag plus dead timemodel. Most industrial processes fit into this category, but not all. An example of a process thatmay not fit this model is a level loop. Some level control loops are not self regulating, meaning thata step change in the controller output will result in a tank filling up rather than seeking a new steadystate level. For a loop to be tunable with this open loop method, the loop must be self-regulating.This means that the process part of the loop should be expected to exhibit an S shape responsecurve to a step change in controller output, with the process variable reaching a new steady statevalue on its own. This is in contrast to a process which never reaches a final constant steady statevalue, but rather wants to run away, or continue to increase, as some level loops do while the tankcontinues to fill indefinitely.

ACCESSING THE PID AUTO-TUNE SCREEN

COMMAND: AutotuneInteger Control Block PD Control Block

HOTKEY: [Ins][D] [Alt][A] (from PID configuration screen)MENU: Data ; Insert Data Special ; Auto-tune

If your PID loop is using an integer control block (file type N), place the cursor on the PID instructionand enter the command to go to the PID Configuration Editor. You will see a menu with an Auto-tune option that will take you to the PID autotune screen.

If your PID loop is using a PD control block, go to the PID template display for the control block inthe Data Table Editor (you can use [Alt][Z] from the instruction). Then, press [Enter] to access thePID Status and Configuration screen. From this screen, enter the command to access the PID Auto-tune function.

Page 274: Topdoc Manual

APPENDIX B PID AUTO-TUNING

SoftPLC Corp. Inc. 28 July 2000B-2

USING THE PID AUTO-TUNE FUNCTION

Press [Esc] at any time to abort the auto-tune function.

Once you select Auto-tune , you will be prompted to enter some information for the auto-tuningprocess:

@ Enter the percentage step change that will be applied to the Controller Output (CO). TOPDOCwill apply a positive step change to CO if your loop is direct acting, or a negative step changeif your loop is reverse-acting. A reasonable range for the step change is between 5 and 30%.Make sure that the current CO value plus the step value you select falls within the range0-100%. That is:

CO + step < 100% for direct acting loopsCO - step > 0% for reverse acting loops

@ Select the tuning parameters with which you want to tune your loop. You can select acombination of Proportional, Integral, and Derivative.

@ Enter Software Manual mode when you are ready. In SW Manual mode, the PID instructiondoes not affect the CO value.

Once the loop is in SW Manual mode, you need to wait until the process reaches steady-state.Steady-state is reached when the process has finished reacting to the Controller Output value thatexisted when the loop was placed in SW Manual mode. When the Process Variable "levels out"(i.e.: when it stops oscillating), the process has reached steady-state. You will need to have a feelfor the response time of the process you are controlling in order to make a full determination thatsteady-state has been reached. You can use the PV field below the PID faceplate to monitorchanges in the PV.

Once the process has reached steady-state, press any key to begin the auto-tuning function.TOPDOC will step change the CO with the percentage change that you requested, and will beginmonitoring the PV until you determine that steady-state has once again been reached. The rulesoutlined above regarding the determination of steady-state also apply here.

When you are satisfied that steady-state has been reached, press [Enter]. TOPDOC will display thesuggested tuning parameters. At this point, you will have a chance to apply the suggestedparameters by saving the parameters to the PLC.

If you choose to save the recommended parameters, they will be sent to the PLC and you will beprompted whether you want to put the loop in AUTO mode, allowing the PID instruction to controlthe Controller Output.

If you choose not to save the parameters, you will be prompted whether to place the loop in AUTOmode using the original parameters, if it was previously in AUTO mode. If the loop was notpreviously in AUTO mode, execution will continue in MANUAL mode with the original parameters.

In any case, pressing any key will exit the auto-tune screen.

Page 275: Topdoc Manual

APPENDIX B PID AUTO-TUNING

Pub. No. TDZ-MN1 28 July 2000B-3