Sunteți pe pagina 1din 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.
THIS PAGE INTENTIONALLY LEFT BLANK
Because of the variety of uses of the information described in this manual, the users of, and those
responsible for applying this information must satisfy themselves as to the acceptability of each
application and use of the information. In no event will SoftPLC Corp. be responsible or liable for
its use, nor for any infringements of patents or other rights of third parties which may result from its
use.
SoftPLC Corp., MAKES NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE
CONTENTS HEREOF AND SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF
MERCHANTABILITY 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 any
magnetic medium without the written consent of SoftPLC Corp.
TOPDOC and SoftPLC are registered trademarks of SoftPLC Corp. O@N@E (Optimum Network
Executive) and SoftWIRES are trademarks of SoftPLC Corp.
First Printing: July, 1988
Sixth Printing: July, 2000
(C)Copyright 2000 SoftPLC Corp.
ALL RIGHTS RESERVED.
THIS PAGE INTENTIONALLY LEFT BLANK
Pub. No. TDZ-MN1 28 July 2000 i
PREFACE
This manual is intended to be used in conjunction with SoftPLC Corps. TOPDOC, Advanced PLC
programming and documentation software for SoftPLC. This manual also covers SoftWIRES, PLC
emulation, systems simulation and testing software. Specifically, it supports TOPDOC and
SoftWIRES version 4.4.
WHAT IS TOPDOC?
TOPDOC is a complete programmable controller development environment. With TOPDOC you
can create, edit, and document PLC ladder logic programs on computers compatible with Windows
32 bit operating systems (Win 95, 98, NT, or 2000). TOPDOC includes offline (computer based
program development and reporting), online (PLC based program development and monitoring) and
SoftWIRES(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
PREFACE
SoftPLC Corp. Inc. 28 July 2000 ii
@ 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 and
understand how to use your computer and the Windows operating system. The SoftPLC and
TOPDOC Quick Reference Guide describes software installation and configuration; as well as
communication driver setup.
This manual was written to explain the use of TOPDOC. The TOPDOC help files also include
information on TOPDOC and more detailed information about the specific data you need to enter
or are viewing while using TOPDOC.
NOTE: With each TOPDOC product and update there is a
TDZREAD.ME and HISTORY.DOC file. These text files
contain product update information and additions or
corrections to the information in this manual. Before
installing or using TOPDOC or any updates you receive,
be sure to read these files carefully. You may also want
to print the files and store them with this manual for future
reference.
HINT: SoftPLC offers training on TOPDOC and on SoftPLC
hardware and programming. If you are interested, call
SoftPLC.
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 do
not 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 should
press the [Ctrl], [Shift], or [Alt] key at the same time as the following key(s), rather than
pressing the keys in sequence. Other keys listed together (such as [Ins] or [Del]) should
be pressed sequentially.
PREFACE
Pub. No. TDZ-MN1 28 July 2000 iii
X> A letter followed by > indicates a disk drive. We normally use the letter C to indicate
the hard disk drive, A for the floppy drive, and D for the CD-ROM drive. You would use
the appropriate letter(s) for your system.
NOTE: Denotes that special attention needs to be given to a
particular point.
CAUTION: Denotes that special attention needs to be given to this
point as well as exercising caution, otherwise loss of data
or 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.
SoftPLC Corp. Inc. 28 July 2000 iv
TABLE OF CONTENTS
THIS PAGE INTENTIONALLY LEFT BLANK
SoftPLC Corp. Inc. 28 July 2000 vi
PART I
GENERAL INFORMATION
THIS PAGE INTENTIONALLY LEFT BLANK
Pub. No. TDZ-MN1 28 July 2000 1-1
CHAPTER 1
REQUIREMENTS
This chapter describes computer and printer hardware and operating system requirements for
TOPDOC and SoftWIRES.
MINIMUM COMPUTER REQUIREMENTS
@ Windows dictates the required memory, CPU, and hard drive required. You only need about
10MB free hard drive space for TOPDOC.
@ Parallel port (Required for users connecting to a parallel printer and/or requiring Software
Sentinel 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 for
each are listed in this section.
TOPDOC prints reports in user selectable widths. Your printer requirements will be based on the
width 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 select
a 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
CHAPTER 1 REQUIREMENTS
SoftPLC Corp. Inc. 28 July 2000 1-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 HP
LaserJet II compatible printers which allows 200 character
wide reports to print on 8-1/2" x 11" paper in landscape
mode.
Pub. No. TDZ-MN1 28 July 2000 2-1
CHAPTER 2
TOPDOC CONFIGURATION
Refer to the SoftPLC/TOPDOC Quick Reference Guide for detailed installation and loading
information. 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 many
backup copies as you wish or you can install on multiple PCs. However, unless the Software
Sentinel (Software Protection Device) is installed on your computer, you will not be able to run
TOPDOC. The Software Sentinel was included with your TOPDOC package and is a square
connector 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 cost
of a Sentinel is 100% of the list price of the software the
Sentinel activates. You should treat the Sentinel as you
would treat your wallet or other valuable goods.
The Sentinel connects to a parallel communications port on your computer (printer port). Any
parallel port can be used if you have multiple ports. You can still use your parallel port for
communications (ie: to a printer). Just connect your parallel cable to the back of the Software
Protection Device instead of directly to the computer.
WARNING: Do not plug or unplug a Sentinel attached to a printer while
the printer is ON. Turn the printer OFF first. Otherwise
damage may occur to your Sentinel. Also, do not
"LapLink" or perform other similar operations through
the Sentinel as damage to the Sentinel WILL occur.
Each SoftPLC product (catalog number) has its own specially coded Sentinel. Only one Sentinel
may 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 combine
multiple SoftPLC products on a single Sentinel, contact SoftPLC for reprogramming information.
CHAPTER 2 INSTALLATION
SoftPLC Corp. Inc. 28 July 2000 2-2
SCREEN COLOR CONFIGURATION
With the Colors option (under the main menu option Setup ), you can configure the colors of the
different windows you see in TOPDOC. You can specify 10 sets of foreground and background color
combinations 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 select
Colors from the setup menu. TOPDOC displays the color configuration screen shown in Figure
2-1. The commands you use to change the color configuration are listed at the top of the screen in
the colors program and in Table 2-4.
Color Configuration
Arrows = 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-1
Color 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)
CHAPTER 2 INSTALLATION
Pub. No. TDZ-MN1 28 July 2000 2-3
You can set the foreground, background colors, and attributes for 6 aspects within each window set
as shown in Table 2-1. The Ladder and Data Table Editor's configuration are somewhat different
and 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 a
menu window.
Title The name at the top of the window.
Table 2-1
Color 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-2
Ladder Editor Color Configuration
CHAPTER 2 INSTALLATION
SoftPLC Corp. Inc. 28 July 2000 2-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-3
Color 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-4
Color Configuration Key Sequences
Continue selecting in this manner until you are satisfied with all your choices, then press [Esc]. This
displays 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 Disk
changes the color configuration file (WC.CFG) and uses the new colors in the current session and
all future sessions. Use Temporarily will use any changes in the current session only. If you exit
to 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
CHAPTER 2 INSTALLATION
Pub. No. TDZ-MN1 28 July 2000 2-5
It is a good idea to remember to make regular back-ups of your program and data files in case of
computer or PLC hardware failures. Your biggest investment is your data, regular backups following
a 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 root
name but different extensions. Appendix A describes each of the TOPDOC application data files.
Pub. No. TDZ-MN1 28 July 2000 3-1
CHAPTER 3
TOPDOC OVERVIEW
This chapter describes TOPDOC's user interface and defines some terms. You will learn how to
select menu options and choices from a list, respond to a request for information, get help, and
handle errors. You will also learn the special commands and key sequences you can use to make
data entry and selection easier.
By learning the information in this chapter, you will find both TOPDOC and the rest of this manual
very easy to use, and will also be able to use TOPDOC's productivity tools to your maximum
advantage.
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. To
abort 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 the
help 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 about
each 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 enter
information.
CHAPTER 3 TOPDOC OVERVIEW
SoftPLC Corp. Inc. 28 July 2000 3-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, or
other 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 1
st
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 to
select the current (blinking) menu option.
[INS] Used to toggle between insert and exchange (overstrike) editing modes. The [INS] key is
also 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] is
also 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 these
keys, you press them simultaneously with the other keys in the sequence, not sequentially.
Table 3-1
Special 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
CHAPTER 3 TOPDOC OVERVIEW
Pub. No. TDZ-MN1 28 July 2000 3-3
Key Sequence Description
[7] Moves cursor left one space or to prior menu option (moves from first option to the last
option if positioned on the first)
[6] Moves cursor right one space or to next menu option (moves from last option to the first
option 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 same
letter, 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 for
selections.
2) You can use [6], [7], [9], [8], [Home] and [End] to position the cursor on the desired choice and
then press [Enter].
A short description below a horizontal menu explains what the current option does. An easy way to
become 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.
CHAPTER 3 TOPDOC OVERVIEW
SoftPLC Corp. Inc. 28 July 2000 3-4
RESPONDING
After you select a menu option, TOPDOC displays either another lower level menu (in which case
you would select again) or a set of prompts to which you must respond. You can either respond or
press [F1] for help.
Most prompts display a default response. To accept the default, simply press [Enter]. Where
responses must be selected from a list, pressing [Ins] will display the list, then you can select by
positioning on your selection and pressing [Enter].
To change the default or enter a new response, type in the information requested. You can also edit
your response using the special keys listed in Table 5-2(a). [Esc] can always be used to abort and
return to the prior menu level.
After you enter a response, TOPDOC requests an entry for the next field. If you are positioned on
the last field TOPDOC takes the next action.
NOTE: You can use either upper or lower case entries when
responding.
PATH/FILE ENTRY
For most upper level menu options you must enter the drive specification, path, and filename you
want to use. This section describes how to enter this information, it is not repeated throughout the
manual. 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-1
Path/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 8
character 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.
CHAPTER 3 TOPDOC OVERVIEW
Pub. No. TDZ-MN1 28 July 2000 3-5
FILE SELECTION
<FILE> is the name of the program you want to process. Filenames have two parts - the root
and 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. The
maximum root size is 8 characters.
HINT: If you don't remember the name of the <FILE> you want
to use, press [Enter] at a blank <FILE> prompt. A
window opens that lists all files in the specified <PATH>
in alphabetical order (Figure 5-2). To quickly blank out
the field to access the file list display, press
[Ctrl][BackSpace]. Only files with the correct extension
for the current menu option or TOPDOC function are
listed. Normally, the last accessed <FILE> is displayed
as 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-2
File Directory Listing
You can use [6 6], [7 7], [9 9], [8 8], [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, you
can use the [F7] and [F8] keys to cycle through the list of
loaded 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
CHAPTER 3 TOPDOC OVERVIEW
SoftPLC Corp. Inc. 28 July 2000 3-6
After you have responded to all the prompts for a given function, TOPDOC processes your
response(s). During processing of functions that may take several seconds or longer, a message
is displayed that tells you what is happening (eg: "Printing the report..."). When processing is
complete, 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 error
message is displayed that briefly describes the problem. You can press [F1] for help or [Esc] to
return 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, for
example, to abort processes such as printing a report or uploading/downloading a file from the PLC
to/from the computer.
Pressing [Ctrl][Break] brings up a menu with options to Continue or Abort . Selecting Continue
causes the process to go on uninterrupted. Selecting Abort cancels the process and returns you
to the menu.
Sometimes only the Continue option is displayed because aborting during processing could cause
invalid files. Allow the process to complete, then make any necessary corrections and start the
process again.
GETTING HELP
TOPDOC has a context sensitive online help facility. What this means is that you can get help
pertinent to the task you are doing as you are doing it. You can get help any time TOPDOC is
waiting for you to select or respond, or has displayed an error message (refer to the last section in
this chapter).
Every menu option and response field has an associated help message. Simply press [F1] before
or 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]) displays
the next page of the message. The word "End ..." at the lower right hand corner indicates that this
is the last window of information for the current context. You can page backward through the help
message 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
CHAPTER 3 TOPDOC OVERVIEW
Pub. No. TDZ-MN1 28 July 2000 3-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 topics
from 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, a
menu displays with the options Browse or Quit . Quit or [Esc] will return you to where you were
before you pressed [F1].
Select Browse to display the topics for which help is available. Move the cursor using the arrow
keys to the desired function and press [Enter]. This will display the help message for the selected
option.
Pressing [Esc] will display the menu prompting you to Browse again or Quit the help system.
SEE ALSO'S
CHAPTER 3 TOPDOC OVERVIEW
SoftPLC Corp. Inc. 28 July 2000 3-8
At times you will see on the help menu a third option, See Also . "See Also" references list other
messages in the Help system related to the current area. Select a topic using the arrow keys
followed by [Enter], then view the help message. There may be additional levels of help below this
level. [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 window
contains a short explanation of the error. Press [F1] to get more information about the error and/or
suggested 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-4
Sample Error Window
A 5-digit error number is displayed in the help message at the top center of the help window (Figure
3-5). This number is extremely important for SoftPLC to be able to identify and troubleshoot the
problem.
HINT: Be sure to write down the error number at the top of the
help message and the exact error message before calling
for technical assistance.
Press [Esc] to close the help and error windows and continue. Part IX has additional troubleshooting
information.
Pub. No. TDZ-MN1 28 July 2000 3-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 specified
path. 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-5
Sample 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-3
How do I . . .?
PART II
INDEX
Pub. No. TDZ-MN1 28 July 2000 Page v
PC to PLC COMMUNICATIONS
THIS PAGE INTENTIONALLY LEFT BLANK
Pub. No. TDZ-MN1 28 July 2000 4-1
CHAPTER 4
PLC COMMUNICATIONS / XFER OPTIONS
Refer to the Quick Reference Guide for information on establishing communications between
TOPDOC and SoftPLC, cabling requirements, and ethernet networking.
Once communications have been established, you can upload/download programs to/from the
computer and PLC; monitor PLC operation online and perform troubleshooting functions such as
forcing, contact histogram, etc.
The TOPDOC Xfer (transfer) options make it easy for you to test communications, perform
program transfers to and from the PLC, and other functions. The Xfer options are described in this
chapter.
CHECKING COMMUNICATION AND CLEARING MEMORY
There are a number of ways you can check communications, verify you have selected the correct
PLC before going online or performing an upload/download, and to verify you have selected a
correct 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 PLC
before 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 that
communications are working.
After you select Who Is It? from the menu, a message will be displayed asking you to enter the
Channel and Station number of the desired PLC. Once you enter these, the Who Is It window
(Figure 4-1) is displayed.
CHAPTER 4 PLC COMMUNICATIONS/XFER OPTIONS
SoftPLC Corp., Inc. 28 July 2000 4-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-1
Who Is It? Display
THE HEADER OPTION
The Header option shows you pertinent information on existing *.LOB files (workfiles) and PLC-3
memory 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 an
example 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-2
Program Header Window
CHAPTER 4 PLC COMMUNICATIONS/XFER OPTIONS
Pub. No. TDZ-MN1 28 July 2000 4-3
CLEARING MEMORY
In case of memory or processor faults that cannot be cleared by normal means, or if you want to
clear a PLC's memory before creating or downloading a new program, you can download an
empty 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 between
the 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 your
TOPDOC 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 the
description 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 description
of 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 same
name, the old .LOB file is written over by the upload
operation.
You can upload regardless of the PLC mode. If the data table values are changing during the
upload, the value reflected in the Data Table in the disk file will be the value of the bit/word at
the time the PLC memory was read.
When the Upload operation is performed, the program is automatically written to disk. When the
upload 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
CHAPTER 4 PLC COMMUNICATIONS/XFER OPTIONS
SoftPLC Corp., Inc. 28 July 2000 4-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 to
download.
After entering the program name, you must enter the Channel and Station Number of the PLC
you 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 a
message 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. A
complete successful download operation must be performed to create a valid program in the
processor.
The PLC must be in Remote or Program mode to perform a download. If you try to download
when the PLC is in run mode, a message will be displayed indicating this. No download will
occur. When you confirm that you wish to perform a download, the PLC will be placed into the
remote program mode and all outputs will be de-energized.
WARNING: If a program download is attempted while the PLC is in
remote run mode, unpredictable and/or hazardous
machine operation could occur. Damage to equipment
and/or injury to personnel could result from the PLC
being placed into Remote Program mode.
CAUTION: Download only modifies the PLC RAM memory. If
SoftPLC is re-started before a Write to flash is
performed, you will start with the last saved workfile, not
the last downloaded or runtime state. The Quick
Reference Guide describes retentive memory in more
detail.
THE READ OPTION
You use the Read option menu to transfer information in the SoftPLC Flash or other disk to
SoftPLCs RAM memory. This function is meant to provide an easy way to revert to a previous
program version without performing a download. For example, use this option if you have made
online changes that you dont 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 to
work with. You then enter the <PATH> and <FILE> of the program on the SoftPLC disk you want
copied into the SoftPLC RAM.
The PLC must be in Program Remote Program to perform a Read operation.
CHAPTER 4 PLC COMMUNICATIONS/XFER OPTIONS
Pub. No. TDZ-MN1 28 July 2000 4-5
NOTE: The <PATH> and <FILE> display are not the TOPDOC
computer, but the SoftPLC disk(s). No data transfer
from the SoftPLC to the TOPDOC PC occurs during a
READ. To transfer from SoftPLC to TOPDOC, use
Upload.
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 SoftPLCs RAM to the SoftPLC flash or
other disk.
The Write function is meant to provide an easy way to back up your SoftPLC. If you have made
online ladder changes, you should Write them to the SoftPLC flash disk to ensure they are not
lost 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 to
work with. Then, enter the <PATH> and <FILE> you want to save the RAM contents to, on the
SoftPLC disk.
After entering the program name, 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 a
message 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 when
the PLC is in run mode, a message will be displayed indicating this. No write will occur. When
you confirm that you wish to perform a download, the PLC will be placed into the remote
program mode and all outputs will be de-energized.
NOTE: The Write option is SoftPLC RAM to SoftPLC disk. No
data transfer from the TOPDOC PC occurs during a
Write. To transfer from TOPDOC PC to SoftPLC, use
Download.
WARNING: online ladder logic and data table changes are not
automatically saved unless your SoftPLC has battery
backed up RAM memory. A number of options are
available to provide retention memory functions. These
are described in detail in the Quick Reference Guide.
PART III
LADDER LOGIC
& DATA TABLE EDITING
THIS PAGE INTENTIONALLY LEFT BLANK
Pub. No. TDZ-MN1 July 28, 2000 5-1
CHAPTER 5
LADDER EDITOR OVERVIEW
This chapter describes the Ladder Editor user interface and some basic concepts you need to
know to use the Ladder Editor, both online and offline. This includes how you interact with the
Editor, what the display looks like, how to use the command buffer and menus, and other general
editing concepts.
The user interface is free-form, much like the interface for a word processor or spreadsheet
program. You decide what you want to do and when you want to do it. At times, a menu or list
of choices will be displayed. Chapter 5 describes how to select from menus and lists, and to
respond to prompts.
LADDER EDITOR PURPOSE/SCOPE
You use the Ladder Editor to create and/or modify ladder diagram programs and program
documentation - 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, but
different extensions. Appendix A describes each of the TOPDOC files. You only need to enter
the 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 table
TOPDOC uses are in the PLC, rather than the disk file copy that is used offline. The information
in this chapter applies to both online and offline editing.
CHAPTER 5 LADDER EDITOR OVERVIEW
SoftPLC Corp., Inc. 28 July 2000 5-2
EDITOR CONFIGURATION
This section describes how to configure the Ladder Editor. The configuration defaults are shown
in Figure 5-1.
The first time you load the Ladder Editor (either online or offline) after installing TOPDOC, the
Editor 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, TOPDOC
either 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-1
Editor 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 the
screen during Ladder Diagram Editing when comment display is turned on. (The [F4] key is used
to turn the comment display on and off during ladder editing.)
CHAPTER 5 LADDER EDITOR OVERVIEW
Pub. No. TDZ-MN1 July 28, 2000 5-3
RUNG COMMENT DISPLAY POSITION
In this field enter "A" to display comments above the rung or "B" to display comments below the
rung. Displaying comments below the rung may allow you to see more ladder diagram instructions
on 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 character
encountered in a comment, instead of the actual tab length set in the comment itself. Comments
always 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 the
tab 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 or
down 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 each
word used in expressions for CPT and FAL type instructions. Most times, you would enter "N", so
you 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 one
program 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 across
programs.
COPY ADDRESS TAGS ON RUNG COPY?
In this field, you can specify whether address labels are copied when rungs are copied from one
program 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 copy
operation across programs.
DISPLAY NEXT HIGHER ADDRESS LABEL?
CHAPTER 5 LADDER EDITOR OVERVIEW
SoftPLC Corp., Inc. 28 July 2000 5-4
If this field is Y (Yes), and database display is turned ON, then the Ladder Editor will display
additional 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 address
is 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 display
the label for TIMER T4:0. This feature is also implemented on the Ladder Report and is described
in 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 records
after your database entry is completed, this feature may
not seem to operate as TOPDOC treats blank records
differently 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 Window
function is active in the ladder editor. Refer to Chapter 12 for more information on the Data Watch
Window function.
SHOW ADDRESSES/TAGS IN LADDER
In this field, enter <A> to display the data table addresses for each instruction parameter, or <T> to
display 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 the
Online menu or the offline Edit menu. Figure 5-2 shows the Ladder Editor display for a new
program.
CHAPTER 5 LADDER EDITOR OVERVIEW
Pub. No. TDZ-MN1 July 28, 2000 5-5
Mode:operate F10=Menu Rung:P2/0
C:\TDZ\SPLC\DEMO
--------------------------------END OF PROGRAM-----------------------------
Figure 5-2
Ladder Diagram Editing Window
Line 1 displays the current mode of operation, messages, and the current rung number. It also
reminds you to press [F10] to see the Ladder Editor pull-down menus. Online, Line 1 also displays
the 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 displayed
on Line 1 to the far left side. You perform all editing functions except entering new rungs or
instructions from operate mode. These include searching and positioning, changing the display
mode, loading other editors, program documentation, and more. In insert mode you enter new rungs
or instructions.
NOTE: Online the displayed mode will be the PLC operating
mode, 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 the
middle of the ladder diagram window. The current rung number is displayed to the far right on line
1 and the cursor points to the current instruction on that rung.
SoftPLC RUNG NUMBERING
SoftPLC rungs are numbered as follows:
@ Rungs are prefixed with P
n
, where
n
is the SoftPLC program number, beginning with program
2 through 999 (Programs 0 and 1 are reserved for non-ladder logic functions). TOPDOC
displays 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 the
Program number, separated by a slash. For example, rung P2/0 is the first rung of the first
program. Other example rung numbers are P54/932, P4/23, P17/2.
CHAPTER 5 LADDER EDITOR OVERVIEW
SoftPLC Corp., Inc. 28 July 2000 5-6
The END OF PROGRAM statements are automatically inserted. You cannot include these
statements 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 new
program file first.
LADDER LOGIC DISPLAY
Figure 5-3 is a sample ladder display with all program documentation turned OFF. Note that the
cursor is located in the middle of the screen to make program editing easier. In TOPDOC, you can
scroll from program section to program section. For example, in the program in Figure 5-3, the END
OF PROGRAM statement is the last rung of program 31 (Rung 31/6), and the next rung is the first
rung of program 32 (Rung 32/0).
If the rung size exceeds the ladder editing window size, you can use [6], [7], [Home] and [End] keys
to scroll the rung horizontally within the window and use [9] and [8] to scroll the rung vertically within
the 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-3
Example Ladder Program Display
POWER BAR DISPLAY
Normally the power bars are displayed as solid lines. When creating or editing a rung, however, the
power 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 the
original logic may have occurred.
CHAPTER 5 LADDER EDITOR OVERVIEW
Pub. No. TDZ-MN1 July 28, 2000 5-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 any
positioning command or by inserting a new rung.
MENU DISPLAY [F10]
A number of "HotKey" commands are available to allow you to quickly perform different editing
functions without having to use a lot of keystrokes. By pressing [F1] from operate mode you can get
a 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 top
line of the screen (Figure 5-4).
) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) Ladder Editor) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )
File Ladder Text Data Position View Special
Figure 5-4
Ladder 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 the
cursor to a desired option. At any time you can pull-down the current option by pressing [9]. Once
an 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 most
option 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 a
unique 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 can
re-display the menus by pressing [F10] again.
READING THE MENUS
CHAPTER 5 LADDER EDITOR OVERVIEW
SoftPLC Corp., Inc. 28 July 2000 5-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 executed
directly by pressing the appropriate keys (ie: [Alt][P] or [F6]). These "HotKey" commands are
identical 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 selecting
the 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-5
Using the Ladder Editor Pull-Down Menus
LADDER DOCUMENTATION DISPLAY
There are different options which specify how the ladder diagram is displayed. In the Ladder Editor
you 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
CHAPTER 5 LADDER EDITOR OVERVIEW
Pub. No. TDZ-MN1 July 28, 2000 5-9
@ rungs, tag names, and rung comments
@ rungs, tag names, address labels, and rung comments
RUNG COMMENT TOGGLE
COMMAND: Rung Comment Toggle
HOTKEY: [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 displayed
depends on the "EDITOR CONFIGURATION" (described earlier in this Chapter).
ADDRESS LABEL TOGGLE
COMMAND: Label Toggle
HOTKEY: [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 in
Chapter 26.) When you enter/select the Label Toggle command, a menu is displayed with options
All , Labels , None , Tag Only or Quit . Quit takes you back to the Ladder Editor without
changing 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 File
Control 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 is
placed 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, and
b) the information in the database file must be retrieved from disk before it can be displayed on
the 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 position
command, [Alt][P] (Chapter 6). You can also turn the address label display off until you scroll
to 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 no
longer fit. In this case, a message "Current rung extends beyond the screen width/depth" is
CHAPTER 5 LADDER EDITOR OVERVIEW
SoftPLC Corp., Inc. 28 July 2000 5-10
displayed on line 2. You can use [6], [7], [9], [8], [Home], and [End] to scroll around to see the
entire rung.
NON-SEQUENTIAL RUNG DISPLAY
COMMAND: Non-Sequential Rung Display Editor
HOTKEY: [F5]
MENU: View ; Non-Sequential Rungs
This section describes TOPDOC's Non-Sequential Rung Display feature. With this feature, you can
select up to 8 rungs from any locations within a Ladder Program and sequentially display them. This
is an extremely useful troubleshooting tool since you can see logic related to a particular control
function 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 rung
numbers, and each of the five lists of rungs can be given a unique name. Furthermore, each group
of five "list windows" can be stored as a disk file for later re-use without having to re-specify the rung
numbers.
With TOPDOC, you can display any one of the current five "list window" groups of rungs. It is then
easy to switch to another group within the five, go back to normal full consecutive rung display, or
to load another group of five "lists".
CHAPTER 5 LADDER EDITOR OVERVIEW
Pub. No. TDZ-MN1 July 28, 2000 5-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-6
Non-Sequential Rung Display Editor
To load the Non-Sequential Rung Display Editor (Figure 5-6), enter/select the command from the
Ladder Editor. The Non-Sequential Editor menu includes the options Regular Display , Selected
Display , Edit , Load , Save , and Quit . Quit returns you to the Ladder Program. The other
options are described in the following sections.
REGULAR DISPLAY
Selecting Regular Display from the Non-Sequential Rung Display Editor re-displays the ladder
logic in normal mode (sequentially, all rungs displayed). The cursor will be located on the rung you
were 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 allows
you 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 in
non-sequential display mode, TOPDOC puts an asterisk "*" before the rung number in the upper
right hand corner of the Ladder Editor.
To return to the Non-Sequential Rung Display Editor and/or Regular Display mode, enter/select the
Non-Sequential Display command again.
Most of the Ladder Editing commands are not valid in the Non-Sequential Display Mode. Table 5-1
lists the valid commands.
CHAPTER 5 LADDER EDITOR OVERVIEW
SoftPLC Corp., Inc. 28 July 2000 5-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 current
EXAMINE ON/OFF instruction
[Ins][+]/[-] Force ON/OFF the bit corresponding to the current bit
instruction
[F3] Change PLC operating mode
Table 5-1
Allowed 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 logic
they did when they were first created. The non-sequential
lists use only the rung number, not the logic. Therefore,
you may need to adjust the lists when the program logic
changes.
CHAPTER 5 LADDER EDITOR OVERVIEW
Pub. No. TDZ-MN1 July 28, 2000 5-13
Selecting Rungs From the Ladder
COMMAND: Mark Non-Sequential Rung
HOTKEY: [Alt][F5]
MENU: View ; Add Rung to List
You can easily select the rungs to be displayed non-sequentially from within the Ladder Editor, while
you are looking at the logic. To do this, position the cursor on the rung to be selected and enter the
Mark 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 the
first "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 can
use this marking technique very quickly and will not have
to use the full power (and additional setup required) of the
Non-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 the
Selected Display option and view only the selected ladder logic rungs in the order they were
marked. 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 change
the name of each of the five list windows, insert/change the rung numbers in the lists, or delete a
list 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". The
currently 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 1
list window with entries in it. Otherwise, although
TOPDOC knows which list you have selected, if all the
names are blank, you will not be able to easily tell which
list will display.
To enter a new "list name" or change the current "list name", press [Alt][X]. An entry window will
open and prompt you to enter a name. Input the name, then press [Enter].
CHAPTER 5 LADDER EDITOR OVERVIEW
SoftPLC Corp., Inc. 28 July 2000 5-14
Insert Rung Numbers
The rungs to be displayed may be specified or changed by entering the rung numbers in the "list
window". To do this, press [Ins] while the cursor is positioned on the "list window" name. This will
position the cursor on the first rung number entry field. Input the rung number and press [Enter] to
accept it. The cursor will move to the entry field for the second rung. You may enter up to 8 rung
numbers per "list window" in this same manner.
You can enter rung numbers in any order from any valid rungs in the current program file. The
rungs do not have to be in ascending order and you can even enter the same rung number more
than once!
Table 5-2 summarizes the list window editing commands. If you enter a rung number, then decide
you do not want that entry, you can type over it to remove from the list. If you enter a rung number
that can't be found in the current program, the cursor will remain positioned on the entry until you
enter 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-2
List Window Edit Commands
When you have entered all of the numbers for the rungs you want to display, press [F9] to accept
the 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 clear
the rung numbers fields leaving the cursor on the "list window" name. Responding with No will
place the cursor back on the "list window" name.
CHAPTER 5 LADDER EDITOR OVERVIEW
Pub. No. TDZ-MN1 July 28, 2000 5-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 when
you select Selected Display .
To select another list, press [Enter] while the cursor is located on the desired list name (at the top
of the list windows).
SAVE
The Save option allows you to save rung numbers entered into the five "list windows" and their
respective names as a disk file that can later be retrieved. The contents of the entire Rung Display
Menu will be saved.
Select Save from the Non-Sequential Display Menu. A window will open prompting you to enter
a <PATH> and <FILE>, with the default being the name of the current PLC program. The file is
given an .NCR extension.
LOAD
The Load option allows you to load a rung display configuration that has been previously written
to disk with the Save option.
Select Load from the Non-Sequential Display Menu. A window will open prompting you to enter
a <PATH> and <FILE>, with the default being the name of the current PLC program. When you
enter the filename, the rung display configuration will be loaded.
Pub. No. TDZ-MN1 July 28, 2000 6-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 these
commands while in operate mode in the Ladder Editor.
THE POSITION COMMAND
COMMAND: Position on rung number
HOTKEY: [Alt][P]
MENU: Position ; Position on Rung Number
The Position command moves the cursor to a specified rung. When you enter this command, you
are 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-1
Rung Number Entry Shortcuts
If the rung number you enter does not exist, the cursor will be positioned on the first "bad" character
in 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 when
you are in operate mode.
CHAPTER 6 POSITIONING COMMANDS
SoftPLC Corp., Inc. 28 July 2000 6-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-2
Cursor Movement Commands
NOTE: The [PgUp] and [PgDn] keys move the cursor up or down
the number of rungs you specified in the Editor
Configuration (Chapter 5).
THE FIND COMMANDS
COMMAND: Find Instruction/Address
HOTKEY: [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 display
and operate mode. The Unlabeled Parameter option has to do with the address labels database
and is described in Chapter 15.
CHAPTER 6 POSITIONING COMMANDS
Pub. No. TDZ-MN1 July 28, 2000 6-3
Find locates and positions the cursor on the next occurrence of the specified search criterion in the
program. 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-1
Find Command Menu Window
If you select Yes , TOPDOC searches again for the next occurrence. If you select No, you are
returned to operate mode. Once the end of program is reached, TOPDOC goes back to the
beginning 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 an
instruction/address combination. After you select Instruction , the instruction entry command
buffer is opened on line 2.
Enter the instruction mnemonic you want to search for. The command buffer works exactly as
during instruction entry (Chapter 7). You can enter the mnemonic directly or press [Enter] to use the
pull-down mnemonic menus, if desired.
If you want to specify particular address(es) or other parameters, also enter them into the command
buffer. 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 the
address, tagname, label or constant you want to search for.
NOTE: When entering the parameter, the commands in Table 6-1
can be used for typing shortcuts.
As TOPDOC searches, the cursor will be positioned on the first occurrence of that address. You can
then search again or abort (as described previously).
TOPDOC will search for the parameter in all instructions, including those in multi-address
instructions and embedded in files. However, TOPDOC searches based on the type of address
CHAPTER 6 POSITIONING COMMANDS
SoftPLC Corp., Inc. 28 July 2000 6-4
entered. If you enter a bit address, all uses of the bit are found. However, if the word part of the bit
is used in the program, TOPDOC will not find those occurrences. More information on TOPDOC
address 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 the
parameter 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-3
Wildcard Search Examples
The Parameter specification is "object" sensitive. If you enter a bit type address, TOPDOC will only
search 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*:*/*)
Pub. No. TDZ-MN1 July 28, 2000 7-1
CHAPTER 7
INSTRUCTION LEVEL EDITING
This chapter explains how you can insert/change the data associated with an instruction (without
using the Data Table Editor) and how to change, delete, or insert (add) instructions to a ladder
program.
NOTE: When instruction level changes are made to an existing
rung (ie: instructions or branches are inserted, deleted, or
changed), sections of the power bars adjacent to that rung
will be displayed with "R's" instead of the solid power bar
line. This is to indicate that a replacement of the original
logic may have occurred. The rung may be completed (or
assembled) and the power bars restored by pressing [F9].
Offline, or online in program mode, you can also restore
the power bars by moving the cursor off the rung.
INSERTING DATA INTO INSTRUCTIONS/CONFIGURING PID AND
MSG
COMMAND: Insert Data
HOTKEY: [Ins][D]
MENU: Data ; Edit Instruction Data
You can change the data associated with instructions that reference data table values, like
timers/counters, PID, MSG, etc. You do this with the Insert Data command. To use the insert data
command, 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. For
complex instructions using integer control files (ie: PID or MSG), a special Editor appears which lets
you 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 field
in these screens. Press [F1] if you are unsure of what to enter.
DELETING AN INSTRUCTION
COMMAND: Delete Instruction
HOTKEY: [Del][I]
MENU: Ladder ; Instruction Edits ; Delete Instruction
CHAPTER 7 INSTRUCTION LEVEL EDITING
SoftPLC Corp., Inc. 28 July 2000 7-2
To use the Delete Instruction command, position the cursor on the instruction to be deleted and
enter/select the command. The instruction is deleted, but any data table values or address labels
associated with the instruction address(es) are not affected.
CHANGING AN INSTRUCTION
COMMAND: exchange Instruction
HOTKEY: [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 the
command. The current mnemonic, address(es) and parameters for the instruction are displayed in
the command buffer on line 2.
Make the required changes to the mnemonic, address(es), and/or parameters. To save typing, you
can use any of the command buffer editing commands (Table 7-1), the Scroll Recall feature, and
the Instruction Entry Shortcuts described later in this chapter. Two of the most commonly used
editing 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 and
parameters.
INSERTING AN INSTRUCTION
COMMAND: Insert Instruction After
HOTKEY: [Ins][6]
MENU: Ladder ; Instruction Edits ; Right Insert
COMMAND: Insert Instruction Before
HOTKEY: [Ins][7]
MENU: Ladder ; Instruction Edits ; Left Insert
To use these commands, position the cursor and enter/select the command to insert an instruction
in the desired direction. A command buffer is displayed on line 2 and you are prompted to enter the
instruction mnemonic, instruction address(es), and parameters.
After the instruction entry is complete, you are returned to operate mode unless you are on the first
horizontal path of a new rung. In this case, you are prompted to enter another instruction. Press
[Esc] to return to operate mode.
CHAPTER 7 INSTRUCTION LEVEL EDITING
Pub. No. TDZ-MN1 July 28, 2000 7-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 on
line 2. The command buffer is simply an area where you enter multiple responses, separated by
commas 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-1
Command Buffer Display Example
Line 1 contains a message describing what you are to enter in the current field(s). When you
complete a response by filling the entire field, pressing [Enter] (which inserts a "," for you), or by
entering 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 is
inserted. If any responses are invalid, the cursor is positioned in the first invalid field, and a
message is displayed on line 1. You can correct the response(s) using any of the key sequences
listed in Table 7-1.
Optional entries (such as Timer/Counter Presets and Accumulator values) are shown in the message
on line 1 enclosed in [ ]. Pressing [Enter] when only optional entries remain will accept the entire
line, and enter the current data table values for the optional parameters.
NOTE: When entering instructions, use the addressing
conventions per the Quick Reference Guide. In TOPDOC,
you need to precede file addresses with a "#". When only
a file address can be used in the instruction, you need not
enter it, but TOPDOC may insert it when the instruction is
redisplayed.
CHAPTER 7 INSTRUCTION LEVEL EDITING
SoftPLC Corp., Inc. 28 July 2000 7-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 entry
Accept 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-1
Command Buffer Editing Commands
INSTRUCTION ENTRY SHORTCUTS
This section describes several additional features provided by TOPDOC (besides those listed in
Table 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] keys
to 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 the
command 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 yourself
to see how it works.
CHAPTER 7 INSTRUCTION LEVEL EDITING
Pub. No. TDZ-MN1 July 28, 2000 7-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 for
I11/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 Timer
address,enters Time base and thus TON for T4:5.
Table 7-2
Example: Using Scroll Recall
No Leading Zeroes
When entering addresses, leading zeroes are not required. For example:
instead of I001:000/01, use I1:0/1
instead 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/1
Instead 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 a
variety 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)
CHAPTER 7 INSTRUCTION LEVEL EDITING
SoftPLC Corp., Inc. 28 July 2000 7-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 rung
before you can insert the branch itself.
HINT: If you need to insert a branch between the power bar and
the first instruction on a rung or to the left of an instruction,
you must enter "Roaming Insert" mode which is described
later in this chapter.
DELETING A BRANCH
COMMAND: Delete Branch
HOTKEY: [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 Branch
HOTKEY: [Ins][B]
MENU: Ladder ; Instruction Edits ; Insert Branch
To insert a branch, position the cursor to the first instruction you want to branch around and
enter/select the Insert Branch command.
This inserts a branch with a "flexible" right side. You can use [6] and [7] to increase/decrease the
scope of the range of instructions enclosed by the branch. See Figure 7-2 for an example branch
insertion.
Pressing [Enter] inserts the branch and causes TOPDOC to prompt for entry of an instruction to be
placed 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 moved
or changed to encompass a different group of instructions. To modify a branch, you must change
the 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 *
CHAPTER 7 INSTRUCTION LEVEL EDITING
Pub. No. TDZ-MN1 July 28, 2000 7-7
* * * *
* . ) ) ) ) ) ) - *
(a) Result of entering/selecting "Insert Branch" Command
when 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-2
Inserting a Branch
ROAMING INSERT MODE
COMMAND: Roaming Insert
HOTKEY: [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 enter
roaming insert mode, enter/select the Roaming Insert command when you are on the horizontal
circuit 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 this
cursor.
You can use [6] and [7] to move the cursor on the current horizontal circuit path. Vertical movement
is 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 by
pressing [Enter] or [I]. The instruction is inserted at the cursor location and you can proceed with
normal instruction entry.
Inserting Branches: You can insert branches by pressing [B], which inserts a branch with a flexible
right 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.
CHAPTER 7 INSTRUCTION LEVEL EDITING
SoftPLC Corp., Inc. 28 July 2000 7-8
*I:000 " I:000 T4:000 T4:002 O:000 *
/ ) ]/[) ) ) ") ) ] [) ) ) ) ]/[) ) ) ) ]/[) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ( )) ) 1
* 00 " 01 EN EN 00 *
(a) Result of entering/selecting Roaming Insert Command
when 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-3
Roaming Insert Mode
Pub. No. TDZ-MN1 July 28, 2000 8-1
CHAPTER 8
RUNG LEVEL EDITING
This chapter describes single rung editing, including Inserting a Rung and Deleting a Rung, as well
as multi-rung editing (block range copy/move/delete).
INSERTING A RUNG
COMMAND: Insert Rung After
HOTKEY: [Ins][9] or [Enter]
MENU: Ladder ; Rung Edits ; Insert Below
COMMAND: Insert Rung Before
HOTKEY: [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 desired
direction. You are placed into insert mode and a blank rung is displayed. You can now insert the
instructions.
TOPDOC continues to prompt for entry of instructions on the current horizontal path until you enter
an output instruction. To enter additional instructions or branches, you will need to use the
Instruction Entry commands (Chapter 7). To enter branches, you MUST enter the instruction(s) you
want 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 and
delete an unfinished rung, press [Esc].
HINT: Offline, or online in program mode, you can also assemble
rungs by either moving the cursor off the rung with any of
the positioning commands or entering another Insert Rung
command.
DELETING A RUNG
COMMAND: Delete Rung
HOTKEY: [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 be
deleted and enter/select the command.
CHAPTER 8 RUNG LEVEL EDITING
SoftPLC Corp., Inc. 28 July 2000 8-2
If the rung has a comment associated with it the comment is also deleted. Data table values and
address 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 range
can be a single rung or a group of contiguous rungs within a program. You can select a range of
rungs and delete, move, or copy them into the same file.
NOTE: You can also move and copy rungs to any other program
loaded into memory using the offline multi-file editing
capability (Chapter 11) with the same commands
described below.
MARKING A RANGE OF RUNGS
COMMAND: Range Mark
HOTKEY: [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 command
when 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 the
desired set and use the mark command again to define the range end. The rungs in the range are
shown in a different color, based on the Color Configuration.
NOTE: If the range consists of a single rung, you only need to use
the mark command once, not twice.
You can mark a range in either direction - up or down from the current rung. However, END OF
PROGRAM 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 previously
defined range.
COPYING A RANGE OF RUNGS
COMMAND: Copy Range
HOTKEY: [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 placed
above the rung where the cursor is positioned when you enter the Copy command.
CHAPTER 8 RUNG LEVEL EDITING
Pub. No. TDZ-MN1 July 28, 2000 8-3
To use the Copy command, define the range to be copied with the mark command, move the cursor
to the rung after the desired location of the identical rungs, and enter the command. The Copy
command 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 marked
after a Copy command is executed.
DELETING A RANGE OF RUNGS
COMMAND: Delete Range
HOTKEY: [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 and
enter the command. All the rungs in the range are removed from the program. The cursor does not
have 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 Range
HOTKEY: [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 location
to a new location. The rungs are placed above the rung where the cursor is positioned when you
enter the command.
To use the Move command, define the range to be moved, position the cursor to the rung after the
desired 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 Range
HOTKEY: [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 use
the Unmark command. You can unmark a range at any time, from any position in the program.
Pub. No. TDZ-MN1 July 28, 2000 9-1
CHAPTER 9
PROGRAM FILE EDITING (SUBROUTINES)
This chapter describes Program File (Subroutine) level editing, including how to insert a new
Subroutine Program and delete an existing Subroutine Program.
INSERTING A SUBROUTINE FILE
COMMAND: Insert File
HOTKEY: [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 OF
PROGRAM 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 new
subroutine will be re-numbered.
You can then insert rungs into the new subroutine program.
DELETING A SUBROUTINE FILE
COMMAND: Delete File
HOTKEY: [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 place
the cursor on the last rung of the program to be deleted (the END OF PROGRAM statement and
enter/select the Delete File command.
HINT: You can quickly delete all the rungs in a subroutine by
marking them (with the mark command) and then using
the delete range command. (See Chapter 8.)
Pub. No. TDZ-MN1 July 28, 2000 10-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 ON
and OFF, perform contact histograms and change the operating mode of the PLC. This chapter
describes these latter Online Only functions in detail.
WARNING: Online operations are potentially dangerous. It's important
that you heed all warnings in this Chapter before using
TOPDOC 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 program
monitoring/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 PLC
Station number. Enter these, and providing communications are OK, you can begin the selected
function.
The first time you enter the Channel/Station either from the online or menu options, these values
will be saved in a file called DH.CFG. This file is created in the subdirectory you specified for
configuration data when you installed TOPDOC (default is \TDZ). This file is used to display default
Channel/Station values from then on until you change them.
ONLINE PROGRAM EDITING CONSIDERATIONS
WARNING: If it is necessary to make program changes while the PLC
is in the remote run mode, be sure that the consequences
of the changes are thoroughly understood beforehand. If
not, unpredictable and/or hazardous machine operation
could occur. Damage to equipment and/or injury to
personnel could result.
CHAPTER 10 ONLINE OPTION
SoftPLC Corp., Inc. 28 July 2000 10-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 to
remote 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) Cannot
change Data Table size
Table 10-1
PLC Mode Limitations
SAVING PROGRAM AND DOCUMENTATION CHANGES
When Online, the program information source is the PLC. All documentation (labels, rung
comments, and cross reference) is resident only on disk. When program changes are made, you
must 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 your
disk based copy of the program, an Upload must be
performed to save the new information. This is an
important step to ensure you have a backup of the PLC
program in the event of PLC hardware problems.
CAUTION: If you add/delete rungs while online, you should upload the
program to disk. Otherwise, the comments may not be
able to match up with the ladder if you try to do offline
programming or print reports. If this happens, refer to
Chapter 27 for details on the comment re-synchronization
process 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 used
depend on the color configuration you are using (Chapter 2). When the PLC is running, the power
bars also display in the "true" color.
CHAPTER 10 ONLINE OPTION
Pub. No. TDZ-MN1 July 28, 2000 10-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 display
reminder (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 this
chapter.
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 EXAMINE
ON/OFF instruction
[-] Reset a Bit (off) Turn OFF the bit corresponding to the current EXAMINE
ON/OFF instruction
[Alt][T] Forces ; Force Table Force Table
[Ins][+] Forces ; Insert Force ON Force ON the bit corresponding to the current bit
instruction
[Ins][-] Forces ; Set Force OFF Force OFF the bit corresponding to the current bit
instruction
[Del][+] Forces ; Delete Force ON Remove Force ON
[Del][-] Forces ; Remove Force OFF Remove Force OFF
Table 10-2
Online Commands
CHANGING THE PLC OPERATING MODE
COMMAND: PLC Mode Change
HOTKEY: [F2]
MENU: Online ; PLC Mode Change
CHAPTER 10 ONLINE OPTION
SoftPLC Corp., Inc. 28 July 2000 10-4
You can change the operating mode of the PLC processor with the mode change command. This
command can be used only if the PLC keyswitch is in the REMOTE position (for SoftPLCs with
hardware 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 illustrate
the 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 the
mode 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 the
Data 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 NOT
act like a force. Therefore, if you try to change the status of a bit in the I/O image tables the I/O
scan could override your change. The program could override any change, or it might not. Both are
potentially hazardous as there is no indication that the bit status has been changed, as there is when
a force is used.
WARNING: If it is necessary to change the status of a bit, be sure that
the consequences of the change are thoroughly
understood beforehand. If not, unpredictable and/or
hazardous machine operation could occur directly or
indirectly as a result of changing the bit status. Damage
to 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: [-]
CHAPTER 10 ONLINE OPTION
Pub. No. TDZ-MN1 July 28, 2000 10-5
MENU: Online ; Reset a Bit (off)
You can change the ON/OFF status of any bit referenced by an examine closed (XIC) or examine
open (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 bit
is 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 in
detail in Chapter 12. If you are in a Binary Format display, you are in "Bit Manipulation" and the only
valid values are 0 (off) and 1 (on).
CAUTION: If input image table bits are forced, the value shown in the
Data Table Editor reflects the forced condition. If output
image table bits are forced, the value in the Data Table
Editor reflects the actual logic state as determined by the
specific 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. This
section describes these functions.
WARNING: If it is necessary to change a word value (which in turn
changes the status of the bits in the word), be sure that the
consequences of the change are thoroughly understood
beforehand. If not, unpredictable and/or hazardous
machine operation could occur directly or indirectly as a
result of the change. Damage to equipment and/or injury
to personnel could result.
WARNING: When the address of an instruction whose data is to be
changed duplicates the address of other instructions in the
program, the consequences of changing the data for each
instruction should be thoroughly explored beforehand.
You can use the On-screen Cross Reference display
function to do this easily, Chapter 13.
CHAPTER 10 ONLINE OPTION
SoftPLC Corp., Inc. 28 July 2000 10-6
CHANGING DATA VALUES FROM THE LADDER
In all PLC operating modes other than Run Mode, you can change the data associated with
instructions that use data table values, like timers and counters or instructions that have special
displays such as PID and MSG.
You use the Insert Data command to change the data associated with an instruction. Refer to
Chapter 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 are
described in detail in Chapter 12.
CAUTION: If input image table bits are forced, the value shown in the
Data Table Editor reflects the forced condition. If output
image table bits are forced, the value in the Data Table
Editor reflects the actual logic state as determined by the
specific 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 the
forces are initiated, they must be Enabled from the Force Table.
NOTE: You can also use the Force Table offline to pre-set forces
for downloading to the PLC. The Force Table is preserved
on upload/download.
WARNING: When an energized output is being forced off, keep
personnel away from the machine area. Accidental
removal of force functions could cause damage to
equipment and/or injury to personnel.
WARNING: Disconnecting the computer from the PLC while forces are
enabled is a potential hazard as there is no way of
knowing what has been forced ON or OFF without
TOPDOC'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
CHAPTER 10 ONLINE OPTION
Pub. No. TDZ-MN1 July 28, 2000 10-7
state (ON or OFF) below the instruction in the ladder display. Figure 10-3 is an example of the
Ladder display with forces.
6444444444444444444444444444444444444444444444444444444444444444444444444447
5 Mode:Run Forces:ENABLED F10=Menu Rung:PO/2 5
5 C:\TDZ\SPLC\DEMO 5
K) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) M
5 *I:110 +) TON ) ) , 5
5 / ) ] [) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 1T4:0 / (EN)1 5
5 *ON 10 *Base 1.0* 17 * 5
5 * *PR 011/ (DN)1 5
5 * *AC 011* 15 * 5
5 * . ) ) ) ) ) ) ) ) - * 5
Figure 10-3
Ladder Editor Force Display
FORCING FROM THE LADDER DISPLAY
Table 10-3 lists the commands used for forcing functions. To use the commands, position the
pointer 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 before
you 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-3
Ladder Editor Forcing Commands
CHAPTER 10 ONLINE OPTION
SoftPLC Corp., Inc. 28 July 2000 10-8
FORCE TABLE
COMMAND: Force Table
HOTKEY: [Alt][T]
MENU: Online ; Forces ; Force Table
The Force Table allows you to view and change the forces in a tabular fashion. Entering/selecting
the 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 , Partial
Remove and Quit . Quit or [Esc] return you to the ladder display. The other options are
described 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-4
Force Table
To move around the Force Table or insert/remove individual forces, you must select the Edit
option.
The Data Table Editor also has a force table display/editor from within the I/O image tables. Refer
to 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 to
the 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.
CHAPTER 10 ONLINE OPTION
Pub. No. TDZ-MN1 July 28, 2000 10-9
The bit address at the current cursor location, and its label (if one exists), will be displayed in the I/O
Description window on the right side of the display. This is useful to ensure you are positioned in
the 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 Force
Table 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-4
Force Table Positioning Commands
CHAPTER 10 ONLINE OPTION
SoftPLC Corp., Inc. 28 July 2000 10-10
Forcing
Table 10-5 lists the forcing commands. These are the same commands you can use to force I/O
from 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-5
Force 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 until
you enable them from the Force Table Menu. To do this, select the Activate option. This will
enable 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 remains
unchanged 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 before
removing them. This will allow you to see program
operation without forces, yet still be able to quickly re-
enable the forces if necessary without having to
individually set them again.
CHAPTER 10 ONLINE OPTION
Pub. No. TDZ-MN1 July 28, 2000 10-11
PARTIAL REMOVE OPTION
The Partial Remove option is used to remove groups of forces by type. When you select Partial
Remove , a menu appears. Each option corresponds to the group of forces you can remove by
type. 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 Histogram
HOTKEY: [Alt][H]
MENU: Online ; Contact Histogram
With the Contact Histogram feature, you can monitor a history of data table values. You will find
this feature extremely valuable for troubleshooting. Online, you can monitor, print, and save the
history of a single bit or any combination of up to 16 bits in a word. Offline, you can view and print
a previously saved histogram.
Sample Histogram displays are shown in Figures 10-5. The top of the display shows the addresses
being monitored, and status information about the Histogram function. In the data section, column
1 contains the elapsed time from when the histogram started, column 2 shows the time between
state changes, and the remaining columns show the bit status/word value changes for each entry.
CHAPTER 10 ONLINE OPTION
SoftPLC Corp., Inc. 28 July 2000 10-12
64444444444444444444444444444444444HISTOGRAM444444444444444444444444444444444447
5 Monitor Load Output Format Browse Quit 5
5 Monitor changing bit values 5
5) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 5
5 Bit Address: T004:000.ACC/00 5
5 Output: Console 5
5 Started on: 1/5/92 at 10:25:46 a.m. Status: Running 5
5) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 5
5 ELAPSED TIME * DELTA TIME * BIT VALUE 5
5) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 3) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 3) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 5
5 00:00:00.00 * 00:00:00.00 * OFF 5
5 00:00:00.98 * 00:00:00.98 * ON 5
5 00:00:01.98 * 00:00:01.00 * OFF 5
5 00:00:02.97 * 00:00:00.99 * ON 5
5 00:00:03.96 * 00:00:00.99 * OFF 5
5 00:00:04.98 * 00:00:01.02 * ON 5
5 * * 5
Figure 10-5(a)
Sample Bit Histogram Display
64444444444444444444444444444444444HISTOGRAM444444444444444444444444444444444447
5Monitor Load Output Format Browse Quit 5
5Start monitoring transitions of one or more bits 5
5) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 5
5 Word Address: T004:000.ACC Mask: 11111111 00011111 5
5 Output: Console 5
5 Started on: 1/5/92 at 10:26:26 a.m. Status: Running 5
5) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 5
5 ELAPSED TIME * DELTA TIME * BIT VALUE 5
5) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 3) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 3) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 5
5 00:00:01.38 * 00:00:01.00 * 00000000 ...11001 5
5 00:00:02.38 * 00:00:01.00 * 00000000 ...11010 5
5 00:00:03.38 * 00:00:01.00 * 00000000 ...11011 5
5 00:00:04.38 * 00:00:01.00 * 00000000 ...11100 5
5 00:00:05.38 * 00:00:01.00 * 00000000 ...11101 5
5 * * 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 in
this section. To reduce the number of keystrokes and offer you maximum flexibility, some of the
TOPDOC Contact Histogram menus can be accessed from multiple points. As always, the Quit
option allows you exit the histogram function and return to the ladder editor.
CHAPTER 10 ONLINE OPTION
Pub. No. TDZ-MN1 July 28, 2000 10-13
64444444444444444444444444444444444HISTOGRAM444444444444444444444444444444444447
5Monitor Load Output Format Browse Quit 5
5Start monitoring transitions of one or more bits 5
5) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 5
5 Word Address: T004:000.ACC Mask: 11111111 11111111 5
5 Output: Console 5
5 Started on: 1/7/90 at 09:44:46 a.m. Status: Running 5
5) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 5
5 ELAPSED TIME * DELTA TIME * HEX OCTAL DECIMAL 5
5) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 3) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 3) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 5
5 00:00:00.00 * 00:00:00.00 * 0033 000063 51 5
5 00:00:00.30 * 00:00:00.30 * 0034 000064 52 5
5 00:00:01.29 * 00:00:00.99 * 0035 000065 53 5
5 00:00:02.30 * 00:00:01.01 * 0036 000066 54 5
5 00:00:03.30 * 00:00:01.00 * 0037 000067 55 5
5 00:00:04.29 * 00:00:00.99 * 0038 000070 56 5
5 * * 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. When
you 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 in
a 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, or
decimal display format, masked bits are treated as "0" value and the displayed value is
calculated from the binary equivalent. Most times you would want a mask of all "1"s, except in
cases such as an I/O word or a timer/counter control word where you may want to mask out
certain bits.
After you enter the desired address (and mask), TOPDOC displays the Output Options Menu. These
options are described in the "OUTPUT OPTION" section below.
Once the output selection has been made, the Histogram Menu will be displayed on the screen and
the histogram function will commence. The Histogram menu options are described in the following
sections.
CHAPTER 10 ONLINE OPTION
SoftPLC Corp., Inc. 28 July 2000 10-14
OUTPUT OPTION
The Output option allows you to select, or change the previously selected, destination for the
histogram. This menu includes the Console , File and console , and the Printer and console
options.
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 options
were previously selected, selecting Console will stop
TOPDOC 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 data
to a <FILE>.HST. All the data currently in the computer memory buffer, along with any further data
gathered, 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 the
histogram 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 any
data currently in the computer memory buffer along with any further data gathered until you stop the
histogram or change the Output destination.
NOTE: Before selecting the Printer and Console option, be
sure your printer configuration is set up correctly.
If the printer cannot keep up with the data being gathered, the histogram may stop because of an
overflow. An alternative is to run the histogram to the Console alone until you see the desired
data appearing. At that point, you could use the Output option to select to begin printing and
viewing 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, select
Browse from the menu. This option will stop the action on the screen. At this point you can use
any of the commands in Table 10-6 to scroll through the contents of the data buffer.
CHAPTER 10 ONLINE OPTION
Pub. No. TDZ-MN1 July 28, 2000 10-15
Although the screen update is stopped, the histogram data will continue to be gathered. To return
to 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-6
Browse Mode Positioning Commands
HINT: If the data is changing extremely quickly and/or you have
a slow computer, the data buffer may get full during
Browse . 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 computer
catch up.
FORMAT OPTION
The Format option does not apply to Bit Addresses. Word data can be viewed in two different
modes. With the Format option, you can toggle between Binary (Figure 10-5(b)) display or a
combination display of Hex, Octal, and Decimal (Figure 10-5(c)). All data can be viewed in either
mode 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 you
select 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 time
it was started. You will be automatically put in the Browse mode and can use any of the positioning
commands to view the histogram data. Press [Esc] to bring up the Histogram menu, which will allow
you to change the display format, etc.
NOTE: If you were monitoring another histogram, it will be
terminated when you Load a previously saved histogram
file.
CHAPTER 10 ONLINE OPTION
SoftPLC Corp., Inc. 28 July 2000 10-16
PRINT OPTION
Printing a histogram report can be achieved with the Print option. The report indicates if it was
printed 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 select
View Histogram from the Utility Manager Menu, and enter/select the histogram filename. The
histogram file will be loaded to the screen. From this point forward, the View Histogram option
performs the exact same functions as the Load option performs Online. Refer to the section above
on the Load option for more information.
CHAPTER 10 ONLINE OPTION
Pub. No. TDZ-MN1 July 28, 2000 10-17
TOPDOC for SoftPLC by SoftPLC Corp. 4.4
source : \TDZ\SPLC\UPLD2 page 1
address: T004:140.ACC
mask : 11111111 11111111
started: 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 40
00:00:00.78 00:00:00.69 00000000 00101001 0029 000051 41
00:00:01.77 00:00:00.99 00000000 00101010 002A 000052 42
00:00:02.76 00:00:00.99 00000000 00101011 002B 000053 43
00:00:03.80 00:00:01.04 00000000 00101100 002C 000054 44
00:00:04.79 00:00:00.99 00000000 00101101 002D 000055 45
00:00:04.89 00:00:00.10 00000000 00000000 0000 000000 0
00:00:05.84 00:00:00.95 00000000 00000001 0001 000001 1
00:00:06.88 00:00:01.04 00000000 00000010 0002 000002 2
00:00:07.87 00:00:00.99 00000000 00000011 0003 000003 3
00:00:08.86 00:00:00.99 00000000 00000100 0004 000004 4
00:00:09.90 00:00:01.04 00000000 00000101 0005 000005 5
00:00:10.89 00:00:00.99 00000000 00000110 0006 000006 6
00:00:11.88 00:00:00.99 00000000 00000111 0007 000007 7
00:00:12.86 00:00:00.98 00000000 00001000 0008 000010 8
00:00:13.91 00:00:01.05 00000000 00001001 0009 000011 9
00:00:14.90 00:00:00.99 00000000 00001010 000A 000012 10
00:00:15.84 00:00:00.94 00000000 00001011 000B 000013 11
00:00:16.88 00:00:01.04 00000000 00001100 000C 000014 12
00:00:17.86 00:00:00.98 00000000 00001101 000D 000015 13
00:00:18.85 00:00:00.99 00000000 00001110 000E 000016 14
00:00:19.84 00:00:00.99 00000000 00001111 000F 000017 15
00:00:20.88 00:00:01.04 00000000 00010000 0010 000020 16
Figure 10-6
Sample Histogram Report
Pub. No. TDZ-MN1 July 28, 2000 11-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 chapter
pertains to features available ONLY with the Offline Editor.
Offline editing allows you to create and document PLC programs without needing the PLC
equipment. 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 sections
of 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 this
chapter.
@ The Dbase option is used for editing the address label database. This option is described in
Chapter 16.
@ The Ladder option loads the Offline Ladder Editor. Most Ladder Editor functions are described
elsewhere 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. Part
VII of the manual also describes the Emulation commands available within the offline Ladder
Editor.
THE LADDER OPTION
You use the Ladder option to maintain your ladder logic, rung comments, data table values and
configuration, and address labels. You can also use it to create a new program, by entering a new
program name at the <PATH>/<FILE> prompt.
After you select Ladder and enter the <PATH> and <FILE> of your program, the ladder editing
window is displayed. If you entered a new program name, the cursor is on the END OF PROGRAM
statement and the program header configuration window will be displayed. If you select an existing
program, the cursor is on the first rung. In either case you are in operate mode.
CHAPTER 11 OFFLINE EDITING
SoftPLC Corp., Inc. 28 July 2000 11-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 is
automatically created/updated. When you create a new program Offline, you must enter the
Program 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 4
for 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 configure
the Program Header, the Ladder Editor is displayed.
You can also use the Header option from the offline editor File menu to modify a Program Header
for an existing program. You cannot use the Header option until the program has been created
with 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 be
0.
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 you
are using. Press [Enter] at this field to get a menu listing of the available choices, then enter
the letter corresponding to your choice (or use the [9] and [8] keys, then press [Enter]). This
should 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 physical
chassis) 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. This
description 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 the
Header option to correct the Program Header before downloading. If you do change the Program
Header, be sure to save the program to disk before exiting the Editor.
CHAPTER 11 OFFLINE EDITING
Pub. No. TDZ-MN1 July 28, 2000 11-3
SAVING YOUR PROGRAM
COMMAND: Save/Write Program to Disk
HOTKEY: [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 the
copy in memory to disk. There are 3 ways you can do this with TOPDOC, each is described in this
section.
HINT: If you Save before Verify , you will need to Save
again. Otherwise the file will not be marked as "Verified
OK", and you will get a message when you download it.
NOTE: You cannot save a program to a new name including
saving it to a floppy disk, using either of the above
methods. To save to a new name, you must use the
Editor "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 be
saved to disk under the <PATH> and <FILE> displayed on line 2.
HINT: When editing large programs or making a large number of
changes in a program, you should frequently save your
work to disk. Otherwise, a power failure or other event
could cause you to lose your work. Make [Alt][W] your
favorite 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 saving
any changes made, a window is displayed that asks if you want to save before continuing. If you
were editing multiple files, you are asked if you want to save each file in turn.
CHAPTER 11 OFFLINE EDITING
SoftPLC Corp., Inc. 28 July 2000 11-4
PROGRAM VERIFICATION
COMMAND: Verify
HOTKEY: [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 exit
and 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 the
program 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 automatically
asks 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 error
is encountered, TOPDOC takes you to the Ladder Editor and positions the cursor on the instruction
causing the error.
A window describing the problem is displayed. If instructed, press [F1] to get a help message
describing the error. Press any other key to clear the message. You can now use any of the Ladder
or Data Table Editor commands to correct the problem or press [Esc] to go to the menu to correct
Program Header problems.
CAUTION: You should not rely on the verification step to ensure that
your program will produce desired results for your
application. You are the only one who can determine
whether your PLC program will meet your application
needs.
CHAPTER 11 OFFLINE EDITING
Pub. No. TDZ-MN1 July 28, 2000 11-5
CORRECTING ERRORS
This section contains hints on correcting certain types of errors. Programming errors, such as
duplicate 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 the
selected PLC type, you should return to the Editor Menu, then select Header from the File menu
to 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 easiest
way 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 the
end of the command buffer, then [Enter] to accept as is.
CAUTION: Ensure that the instruction addresses are correct before
doing this so you don't create an unnecessarily large Data
Table.
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: ReName
HOTKEY: [Alt][N]
MENU: File ; Rename Program
From within the Offline Ladder Editor, you can use the rename command at any time to change the
name 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 contain
any changes you make during this editing session. The copy of the program file with the old name
remains on disk but is not updated with changes.
When you reName a program file, the rung comment and database files for the old program name
are 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 DOS
copy or rename commands (as appropriate for your situation).
CHAPTER 11 OFFLINE EDITING
SoftPLC Corp., Inc. 28 July 2000 11-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 label
or constant) with another. When you enter/select the Interchange command, a menu window
appears with the options All , Range , and Quit . The first two options are described below. The
Quit option returns you to operate mode.
THE ALL OPTION
When you want to globally replace all occurrences of a parameter with another parameter you use
the All option. Even addresses used to indicate the beginning of a file can be replaced. After you
select All , the parameter entry window is displayed.
THE RANGE OPTION
The Range option allows you to replace all occurrences of a parameter with another parameter
within a selected range of rung numbers. When you select Range , you must enter the starting and
ending numbers of the rungs in which you want to replace the address. You can specify any size
range, 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 , the
parameter entry window is displayed. If you say No , do not use the marked range, you can enter
the starting and ending rung numbers of the range, just as if you had not marked a range in the
ladder 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 replace
and (b) the specification of the desired new parameter(s).
CHAPTER 11 OFFLINE EDITING
Pub. No. TDZ-MN1 July 28, 2000 11-7
The Interchange command uses "object types". This means that Bits are different than words. You
cannot replace a Bit address with a word address, nor can you replace Timer Bits, Timers, Timer
Words, and/or Timer Files with one command. You need to invoke the Interchange command once
for 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 to
save keystrokes. You can also use wildcards in the parameter specification, like in the Find
command (Chapter 6).
USING WILDCARDS
You can use an * (asterisk) as a Wildcard in your parameter specification. In the Parameter Search
specification, 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 the
value in that particular part of the parameter value. For example, N:400/* would mean to leave the
bit 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 both
indirect 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 individually
confirm 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, a
menu with options Yes , No and Quit is displayed on line 1. You select whether you want
CHAPTER 11 OFFLINE EDITING
SoftPLC Corp., Inc. 28 July 2000 11-8
to exchange this parameter ( Yes ), skip this occurrence ( No ), or abort the replacement
process ( Quit ).
2) If you select No , each matching occurrence of the parameter is replaced automatically
without prompting.
Once the end of program is reached, TOPDOC goes back to the beginning of the program and
replaces 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 and
simultaneously edit them. You can move and copy ranges of rungs between files and switch
between files at random.
Up to 16 program files, which can be entire programs or program sections/templates, can be
loaded 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 memory
all 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 to
disk does NOT unload it from memory.
SWITCHING BETWEEN LOADED FILES
COMMAND: Load Previous File Load Next File
HOTKEY: [F7] [F8]
MENU: File ; Previous Workfile File ; Next Workfile
The above commands are used to cycle the Ladder Editor display between the various loaded
files. The current filename is displayed on line 2. TOPDOC maintains a list of loaded files, in
the order they were loaded. The list is treated as a circle. For example, if you are on the last file
and 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 offline
editor menu option.
CHAPTER 11 OFFLINE EDITING
Pub. No. TDZ-MN1 July 28, 2000 11-9
MULTIPLE FILE HANDLING
Under the Editor File option are three options which make using the multi-file editing features
easier. 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 of
all the files you have loaded, in the order they were loaded, is displayed. When you are finished
viewing 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 has
been 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 be
loaded, you are returned to the File menu. Open can not be used to create a new program. You
must use the Ladder option to create new program files.
NOTE: If you plan on editing only a single program, you do not
need to use the Open option. When you select
Ladder , the program you select is automatically loaded
into 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 the
program file from memory. You should Close files to free computer memory when you are
finished with them in your editing session.
If you attempt to Close a program file you have changed, you are asked if you want to verify
the 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. The
difference is that you can move and copy marked ranges of rungs between different files. This
way, you can quickly build a new file from common control sequences you have developed
previously.
DATA TABLE: If rungs are moved or copied across files, the data table values are NOT
automatically copied UNLESS you specified this in the Editor configuration
(Chapter 5). You must use the multi-file capabilities of the Data Table Editor
CHAPTER 11 OFFLINE EDITING
SoftPLC Corp., Inc. 28 July 2000 11-10
to copy groups of values. In addition, Data Table is not created nor is file
type checking done. The Verify will identify any problems of this type.
COMMENTS: Rung comments ARE copied or moved with their associated rungs to the
target file.
LABELS: Address labels are NOT copied or moved across when multi-file editing
UNLESS you specified this in the Editor configuration (Chapter 5). To easily
copy 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 which
contains 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, you
can use the [F7] and [F8] keys to switch between the various data tables, just as in switching
between programs in the Ladder Editor.
You can also use the Copy Range command to copy data table values from one program to
another. First select the range, switch to the desired program and data table location, and press
[Alt][C] to copy the values (Chapter 12).
Pub. No. TDZ-MN1 July 28, 2000 12-1
CHAPTER 12
DATA TABLE EDITING
This chapter describes the SoftPLC Data Table and Data Watch Window Editors which you use
to set, edit, and monitor values in the PLC data table. With the Data Table Editor you can also
view/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 PLC
program, the data table in the PLC memory is configured and values are stored as you specified
in TOPDOC.
NOTE: Certain data table values can be set during ladder
instruction entry and do not need to be re-entered in the
Data Table Editor. You can initialize word values using
the equal sign. For more information on entering
constants 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, or
online when the PLC is in program mode. That is, whenever you use an address in an
instruction the data table is automatically expanded to include the addresses used. You do not
need to separately create data table files.
NOTE: If you are Online to the PLC, the data table size can
only be changed if the PLC is in PROGRAM or
REMOTE PROGRAM mode.
LOADING THE DATA TABLE EDITOR
COMMAND: Data Table Editor Data Table Zoom
HOTKEY: [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, the
Data Table Editor is loaded.
@ If you use the Data Table Editor command ([Alt][D]), the cursor will be positioned at either
the beginning of the Output section, or at the last cursor location (if you had loaded the Data
Table Editor previously in this editing session).
@ If you use the Data Table Zoom command ([Alt][Z]), the cursor will be located at the current
instruction's address. If you are positioned on a multi-address instruction, a parameter
selection menu will appear, allowing you to select the desired address to position on in the
Data Table Editor.
CHAPTER 12 DATA TABLE EDITING
SoftPLC Corp., Inc. 28 July 2000 12-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 positioned
on 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
CHAPTER 12 DATA TABLE EDITING
Pub. No. TDZ-MN1 July 28, 2000 12-3
Data Table Editor Commands
EDITOR CONFIGURATION
COMMAND: Editor Configuration
HOTKEY: [Alt][E]
MENU: View ; Configure Editor
There are a number of Data Table Editor configuration options which are set through the Editor
configuration 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-1
Data Table Editor Configuration Window
AUTO ADVANCE
The Auto Advance feature lets you configure the Data Table Editor to edit a single value at a time
or 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 the
cursor. After the edit, you can enter any valid command.
CHAPTER 12 DATA TABLE EDITING
SoftPLC Corp., Inc. 28 July 2000 12-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-2
Auto Advance Action
DATABASE INFORMATION
You can select to have Address Labels displayed in the Data Table Editor and/or Watch
Windows. If this feature is turned ON, the tagname and address label text for the current
address element is displayed at the upper right corner of the Data Table Editor screen (Figure
12-2). Note the following:
1) The selection of database display ON or OFF in the Data Table Editor will change the
current 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 "Display
next higher address label" will determine whether a label is displayed or not. You can use
the Label Editor to find whether a displayed label is for the current address element or a
higher level address of which the element is a part. This feature is described further in
Chapters 5 and 19.
3) Choosing to display the database information may cause the Editor to seem slower online
with a slower computer because the information in the database file must be retrieved from
disk before it can be displayed on the screen. If this is occurring, you can use the
Positioning commands to move throughout the Data Table rather than scrolling, or you can
turn the database display off until you reach the desired location.
CHAPTER 12 DATA TABLE EDITING
Pub. No. TDZ-MN1 July 28, 2000 12-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-2
Data Table Label Display
DEFAULT DATA FORMATS
For most SoftPLC data file types, you can set the default data format and number of displayed
columns. This default will be used the first time you load the data table, or when a format has
not 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 list
of available formats will appear in a selection window when you press [Ins] on any field.
NOTE: Because TOPDOC supports enhanced displays of
greater than 80 columns width, you are not prevented
from entering a number of columns greater than what
could be displayed for the current display. If you do this,
the display will automatically adjust to display the
number of columns possible.
EDITOR DISPLAY
The Data Table Editing window is displayed after you select to load the Data Table Editor from
the 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 element
address of the cursor.
CHAPTER 12 DATA TABLE EDITING
SoftPLC Corp., Inc. 28 July 2000 12-6
The lower part of the screen contains the data values. The format of the data will vary based on
the 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-3
Data Table Editing Window
MENU DISPLAY [F10]
A number of "HotKey" commands are available from within the Data Table Editor to allow you to
quickly 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 editing
functions. 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 the
Ladder Editor menus (see Chapter 5 for details).
CHAPTER 12 DATA TABLE EDITING
Pub. No. TDZ-MN1 July 28, 2000 12-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. The
first column shows the word address corresponding to the value in the second column. By adding
the number at the top of the columns to the value in the first column, you can determine the word
address corresponding to the value at any location on the screen. In Binary displays, the rightmost
digit is bit 00.
For example, in Figure 12-5 the value "11111111 11011111" in the third column and fourth line of
the 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-5
Reading Data Table Values
CHAPTER 12 DATA TABLE EDITING
SoftPLC Corp., Inc. 28 July 2000 12-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: Format
HOTKEY: [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, a
selection box appears with the options as per Table 12-3. Each option corresponds to a data display
format. 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 informing
you of that when you enter the command.
NOTE: In the ASCII display mode, any word values that
correspond to a nondisplayable ASCII character are
displayed as the hexadecimal code for the value preceded
by a backslash.
If you change the display format of a file, the new setting is saved so long as you do not exit the
Ladder Editor. You can load/unload the Data Table Editor multiple times, move around or edit
Ladder Logic, etc. without losing your format settings. All files of the same data type are affected
by this command.
CHAPTER 12 DATA TABLE EDITING
Pub. No. TDZ-MN1 July 28, 2000 12-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-3
Data Value Display Formats
NON-SEQUENTIAL DATA DISPLAY/DATA WATCH WINDOWS
COMMAND: Data Watch Window
HOTKEY: [Ctrl][D]
MENU: View ; Watch Window
This section describes TOPDOC's Watch Window feature, used to display Non-Sequential data
values. With this feature you can display lists containing non-consecutive data table addresses
either within the Data Table Editor, or in a window within the Ladder Editor. This is an extremely
useful troubleshooting and monitoring tool.
Each Watch Window can contain any number of data table bit or word addresses. The contents of
a Watch Window list can be named and saved to disk for later retrieval.
CHAPTER 12 DATA TABLE EDITING
SoftPLC Corp., Inc. 28 July 2000 12-10
In the Data Table Editor, the Watch Window is a full screen display. In the Ladder Editor, the Watch
Window size is determined by the setting in the Ladder Editor Configuration (Chapter 5). In either
case, when you select to bring up the Watch Window function, you will see a display such as that
shown in Figure 12-7(b).
NOTE: Watch Windows are automatically created when you use
the Insert Data function ([Ins][D]) from the Ladder Editor
when positioned on most instructions. The Watch Window
will contain all the addresses used in the instruction,
except for control and status bits. In this case, the menu
in Figure 12-7 is not displayed unless you press [Esc] to
exit the window, because TOPDOC automatically puts you
into 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

CHAPTER 12 DATA TABLE EDITING
Pub. No. TDZ-MN1 July 28, 2000 12-11
644444444444444444444444444444444444444444444444444444444444444444444444444444444447
5 Mode:operate F10=Menu P2/0 5
5 > C:\TDZ\SPLC\PIDTEST 5
K) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) M
5 Enable the PID instruction every 0.25 second. 5
5 * * 5
5 * T004:000 +) TON ) ) ) ) , * 5
5 / ) ) ) ) ]/[) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 1 T004:000 / (EN)1 5
5 * DN * Base .01 * * 5
5 * * PR 10 / (DN)* 5
5 * * AC 5 * * 5
5 * . ) ) ) ) ) ) ) ) ) ) - * 5
5 * * 5
5 * N007:000 T004:000 +) PID ) ) ) ) ) ) ) ) ) ) ) ) ) ) , * 5
5 / ) ) ) ) ] [) ) ) ) ) ) ) ) ) ) ) ] [) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 1 PID / 1 5
5 * 01 DN * CTRL: PD013:001 ** 5
5 * * PROC VAR: N007:001 ** 5
5 64444444444444444Data Watch Window: F1 for Help, F10 for Menu4444444444444444447 5
5 5Edit Load Unload Save Delete Quit 5 5
5 5Insert or delete to/from current list 5 5
5 5) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 5 5
5 5CNTRL OUT 1950 DEC 5 5
5 5PV 2049 DEC 5 5
5 5K 990.000 N/A 0<=K<=100 Constant used to simulat5 5
5 5SETPOINT 50.0000 N/A 5 5
5 5N707:000 100 DEC 5 5
5 5 5 5
5 94444444444444444444444444444444444444444444444444444444444444444444444444444448 5
944444444444444444444444444444444444444444444444444444444444444444444444444444444448
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 the
address or a Tagname according to the following rules below. The 2nd column displays the current
value in the format displayed in the 3rd column. The rest of the display contains the address label
text, 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 Address
Label" set to NO, the first column displays the tagname for the address and label text if they
exist. Otherwise, the first column displays the address.
3) If Database display is ON, and the Ladder Configuration has "Display Next Higher Address
Label" set to YES, the first column displays the tagname for the address and label text if they
exist. Otherwise, the tagname and label for the next highest level address of which the current
address is a part will be displayed. If no database records exist for any related address, the
address will be displayed in the first column.
EDIT OPTION
CHAPTER 12 DATA TABLE EDITING
SoftPLC Corp., Inc. 28 July 2000 12-12
The Edit option allows you to select addresses for the list, change values, and perform most of the
functions available from within the sequential Data Table Editor. Table 12-4 lists the Watch Window
Editor commands. The Data Change, Position, View, and Special commands operate identically
to 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-4
Data 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 Window
list 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 which
contains any changes you have made since you Loaded
the original.
CHAPTER 12 DATA TABLE EDITING
Pub. No. TDZ-MN1 July 28, 2000 12-13
LOAD OPTION
The Load option allows you to select a list stored on disk. TOPDOC will display a list box
which 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 it
is 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 data
table. These commands are also all available from the [F10] menu option Position . For faster
searching in large data table files, the [PgUp], [PgDn], [Ctrl][Home], and [Ctrl][End] key
sequences and the Position command, [Alt][P], can be used to quickly locate the desired word
address.
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 the
data table. When you reach the first or last file, continuing to press the function key wraps
around 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
CHAPTER 12 DATA TABLE EDITING
SoftPLC Corp., Inc. 28 July 2000 12-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 table
addresses. This section describes them.
LADDER TO DATA TABLE
COMMAND: Data Table Zoom
HOTKEY: [Alt][Z]
MENU: Data ; Zoom to Data Table
The Data Table Zoom command takes you from a ladder instruction to a selected instruction address
in 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 Data
HOTKEY: [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 uses
a PD control block, this command will take you into the Data Table Editor, positioned on the MG or
PD 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 a
special configuration editor for the instruction.
DATA TABLE TO LADDER
COMMAND: On-Screen Cross Reference Display
HOTKEY: [Alt][S]
MENU: Special ; On-Screen CrossRef
If you access the On-Screen Cross Reference Display from within the Data Table Editor, then select
Show Xref to display the cross reference for the currently selected address, you will see a list of
rungs using that address. Position the cursor on the desired rung, then press [Alt][P]. You will be
positioned on the selected rung in the Ladder Editor. Refer to Chapter 13 for more details on this
feature.
CHANGING VALUES ONE AT A TIME
CHAPTER 12 DATA TABLE EDITING
Pub. No. TDZ-MN1 July 28, 2000 12-15
COMMAND: Change a value
HOTKEY: [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. Enter
the desired new value, then press [Enter] to accept it or [Esc] to abort any changes. The command
buffer operates like the one in the Ladder Editor, the same editing commands can be used (Table
7-1).
For complex data structures, such as the Status File, MG and PD data types, some values are
selected from a list box rather than entered into the command buffer. Normally these are indicated
by a "9" displayed after the entry field. When you select to change any of these fields, the list of
options will be displayed. Cursor to the desired choice and press [Enter] to select it. TOPDOC will
modify the appropriate data table values based on your selection. See the next section for more
details.
NOTE: The value you enter will be in the same format as the
current display mode. If you are in the ASCII display
mode and any word values correspond to a nondisplayable
ASCII character, TOPDOC will display the hexadecimal
code for the value preceded by a backslash (\). You can
change the value to a displayable ASCII character, but
you cannot enter a nondisplayable character. To enter a
hexadecimal value, use the Format command to change
the current display mode.
After you insert the value(s), the current Auto Advance setting in the Editor Configuration
determines what happens next. See the "AUTO ADVANCE" section earlier in this chapter for more
details.
WARNING: If you are Online to a running PLC, the data table values
are continually being updated. However, values in the
command buffer/entry window are not. Do not use the
command buffer values to make process decisions as the
values may have changed between when you brought up
the 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 and
for 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 the
structure. Line 4 displays the actual file/word/bit address associated with the cursor location. A short
description 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 provides
details about that element and how the data should be entered and used.
CHAPTER 12 DATA TABLE EDITING
SoftPLC Corp., Inc. 28 July 2000 12-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
CHAPTER 12 DATA TABLE EDITING
Pub. No. TDZ-MN1 July 28, 2000 12-17
6444444444F3=Prev,F4=Next, Datafile Editor=F1 for Help, F10 for Menu44444444447
5 Program: C:\TDZ\SPLC\SAMPLE Desc. text: 5
5 Section: CONTROL File: 6 Tagname: 5
5 5
5 Address: R006:000.LEN 5
5 > 5
5+) ) ) ) 0) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) , 5
5*ELEM* LEN POS EN EU DN EM ER UL IN FD *5
5/ ) ) ) ) 3) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 15
5* 0* 20 0 0 0 0 0 0 0 0 0 *5
5* 1* 0 0 0 0 0 0 0 0 0 0 *5
5* 2* 272 141 1 0 0 0 0 0 0 1 *5
5* 3* 2 2 0 0 1 0 0 0 0 0 *5
5* 4* 3 0 0 0 0 0 0 0 0 0 *5
5* 5* 3 0 0 0 0 0 0 0 0 0 *5
5* 6* 45 44 1 0 1 0 0 0 0 0 *5
5* 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 Menu44444444447
5 Program: C:\TDZ\SPLC\SAMPLE Desc. text: 5
5 Section: STRING File: 11 Tagname: 5
5 5
5 Address: ST011:002 5
5 > 5
5+) ) ) ) 0) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) , 5
5*ELEM*LEN STRING *5
5/ ) ) ) ) 3) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 15
5* 0* 24 this is a string of text *5
5* 1* 58 This is also a string of text with a bit more words in it. *5
5* 2* 0 *5
5* 3* 0 *5
5* 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 contains
detailed 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 Faults
HOTKEY: [Alt][J]
MENU: Special ; Clear Faults
CHAPTER 12 DATA TABLE EDITING
SoftPLC Corp., Inc. 28 July 2000 12-18
Selecting this option brings up a menu with the options All Faults , Minor Faults , and Major
Faults . The first option clears all fault bits in both the minor and major fault words. The next two
options clear all fault bits in the corresponding fault words, minor or major. You can also clear
individual faults by changing the bit from a 1 to a 0. The TOPDOC help messages provide details
on the cause of the fault.
I/O Status (Partial Rack Configuration)
COMMAND: I/O Status
HOTKEY: [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 only
contains 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 data
display is the actual value without the force for Output bits (ie: the value it will be when the force is
removed) and the forced state for Input bits. If the display format is anything other than Binary, the
Forced status is not displayed.
COMMAND: Force Table
HOTKEY: [Alt][T]
MENU: Special ; Force Table
You can load the Force Table from within the Data Table Editor for the current section (Output or
Input) 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 values
using the range copy and set value commands. A range is any group of contiguous data table words
in a single data table file. (The range does not need to be a rectangular area on the screen.) Range
commands are not available for files with large structure types (ie: Status, PD, and MG).
CHAPTER 12 DATA TABLE EDITING
Pub. No. TDZ-MN1 July 28, 2000 12-19
Table 12-6
Data 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 Range
HOTKEY: [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 the
cursor 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 and
enter 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 Range
HOTKEY: [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 table
to another location. The same command is used for Data Table Editing as in Ladder Diagram
Editing.
After you have selected the range, position the cursor on the first word where the values are to be
copied and enter the command.
CAUTION: TOPDOC does not restrict you from copying values across
data table files with different data types. You are
responsible for ensuring that the values you are copying
are in a format that makes sense in the target file.
For example, copying floating point values (which take 2 words each) into
the I/O image tables will normally not make sense, but is allowed by
TOPDOC. You have the power to copy values across files with different
data 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
CHAPTER 12 DATA TABLE EDITING
SoftPLC Corp., Inc. 28 July 2000 12-20
single word type data file such as integer, each multi-word value replaces
several values in the single word data type file.
THE SET VALUE COMMAND
COMMAND: Set Range to a Value
HOTKEY: [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 enter
the desired value into the command buffer on line two. Enter the value and press [Enter]. All of the
words in the defined range are set to the entered value. Set Value operates in any of the display
modes. The value you enter must be in the same format as the current display mode.
THE MAP CONTROL OPTION
COMMAND: Map Control
HOTKEY: [Alt][M]
MENU: Special ; Map Control
You use the Map Control function to manually control/view the data table size. You can add and
delete 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 in
numerical 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 file
number, 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 map
control mode and return to the Data Table Editor.
6444444444F3=Prev,F4=Next, Datafile Editor=F1 for Help, F10 for Menu44444444447
5 Program: G:\TDZ\SPLC\OSCLJP2 5
5 Section: OUTPUT File: 0 Words In File: 128 5
5 Memory: 796 words used in 178 datatable files 5
5 5
5 MAP CONTROL 5
5+) ) ) ) 0) ) ) ) ) ) ) ) ) ) ) 0) ) ) ) ) ) ) ) ) ) ) 0) ) ) ) ) ) ) ) ) ) ) 0) ) ) ) ) ) ) ) ) ) ) 0) ) ) ) ) ) ) ) ) ) ) 0) ) ) ) ) ) ) ) ) ) ) , 5
5*FILE* 0 * 1 * 2 * 3 * 4 * 5 *5
5/ ) ) ) ) 3) ) ) ) ) ) ) ) ) ) ) 3) ) ) ) ) ) ) ) ) ) ) 3) ) ) ) ) ) ) ) ) ) ) 3) ) ) ) ) ) ) ) ) ) ) 3) ) ) ) ) ) ) ) ) ) ) 3) ) ) ) ) ) ) ) ) ) ) 15
5* 0* O:177 * I:177 * S:127 * B003:000 * T004:000 * C005:000 *5
5* 6* R006:000 * N007:116 * F008:000 * N009:039 * BT010:000 * N011:000 *5
5* 12* unused * unused * unused * unused * unused * N017:046 *5
5* 18* unused * unused * unused * unused * unused * unused *5
5* 24* unused * unused * unused * unused * unused * unused *5
5* 30* unused * unused * unused * unused * unused * unused *5
5* 36* unused * unused * unused * unused * unused * unused *5
5* 42* unused * unused * unused * unused * unused * unused *5
CHAPTER 12 DATA TABLE EDITING
Pub. No. TDZ-MN1 July 28, 2000 12-21
5* 48* unused * unused * unused * unused * unused * unused *5
5* 54* unused * unused * unused * unused * unused * unused *5
5* 60* unused * unused * unused * unused * N064:039 * unused *5
5* 66* unused * unused * N068:039 * unused * unused * unused *5
5* 72* unused * unused * unused * unused * unused * N077:061 *5
5* 78* unused * unused * unused * unused * unused * unused *5
5. ) ) ) ) 2) ) ) ) ) ) ) ) ) ) ) 2) ) ) ) ) ) ) ) ) ) ) 2) ) ) ) ) ) ) ) ) ) ) 2) ) ) ) ) ) ) ) ) ) ) 2) ) ) ) ) ) ) ) ) ) ) 2) ) ) ) ) ) ) ) ) ) ) - 5
94444444444444444444444444444444444444444444444444444444444444444444444444444448
Figure 12-9
Map Control Display
After using Map Control to change the data table size offline, you should use the Ladder Editor
Verify command to ensure all the file instructions reference existing addresses in the new data table
setup.
HINT: The Ladder Editor exchange command, followed by
[Enter], can also be used to re-enter the same address
information, and create the necessary data table area(s)
since data table memory is automatically allocated during
instruction entry.
MAP CONTROL POSITIONING COMMANDS
Table 12-7 lists the commands you can use to position the cursor on different data table sections
and files in map control mode.
Table 12-7
Map 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
CHAPTER 12 DATA TABLE EDITING
SoftPLC Corp., Inc. 28 July 2000 12-22
Table 12-8 lists the commands you can use to change the data table size. Each command is
described in this section.
CHAPTER 12 DATA TABLE EDITING
Pub. No. TDZ-MN1 July 28, 2000 12-23
Table 12-8
Map 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 File
HOTKEY: [Del]
MENU: Data ; Delete File
To delete a data table file, position the cursor on the unwanted data table file and press [Del]. You
are asked to confirm that you want to delete the data table file. Select Yes or No . Yes deletes
the data table file. No retains the data table file.
INSERTING A DATA TABLE FILE
COMMAND: Insert File
HOTKEY: [Ins]
MENU: Data ; Insert File
To insert a data table file, press [Ins]. After you press [Ins], you are prompted for entry of the new
address. 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 Size
HOTKEY: [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 size
is to be changed and enter the command. You are prompted for entry of the HIGHEST USED
ELEMENT. Enter the new largest address you want to allow.
THE RECLAIM OPTION
COMMAND: Reclaim
HOTKEY: [Alt][R]
MENU: Special ; Reclaim
The Reclaim function can be used to delete areas of the data table that are not referenced by
instructions in the program and to create data table areas referenced but not yet created.
CHAPTER 12 DATA TABLE EDITING
SoftPLC Corp., Inc. 28 July 2000 12-24
After you enter the Reclaim command, a caution window is displayed. You can select Yes to
continue or No to abort. After the reclaim process is complete, you are returned to the Data Table
Editor Menu.
CAUTION: You need to be aware of two potential problems before
using Reclaim. You may want to make a backup copy of
the program before using Reclaim.
1) There is no way of knowing what elements SoftPLC indirect addresses(es) will be eventually
pointing to.
2) If you change a SoftPLC control file length which is used to specify the length of an instruction
file then the new value, if greater than the old value, could require a larger data table file than
what had been previously created. In either case, you can use the Map Control function to
override the reclaimed areas.
HINT: Offline (or Online if the PLC is in PROGRAM mode), the
Ladder Editor eXchange command ([Alt][X]) can also be
used to create the necessary data table area(s) since data
table memory is automatically allocated during instruction
entry. Simply press [Alt][X], then [Enter] to re-enter the
same instruction, addresses, and parameters.
PART IV
DOCUMENTATION
LABELS/COMMENTS
Pub. No. TDZ-MN1 July 28, 2000 13-1
CHAPTER 13
CROSS REFERENCING
Before you use the Ladder Diagram, Usage, or Address Reports, or use the On-Screen Cross
Reference display feature, you need to generate the address usage cross references for the
program. You can use the Cross Ref option found under the main menu Utilities option to
generate the cross reference files. These functions also provide a way for you to generate the Cross
Reference if the file does not exist, or is older than the current program workfile - without having to
go to the menu.
The cross reference information includes a list of how and where (by rung number) each data table
address is used in the PLC program. Multi-word instructions list references for all addresses used
in 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 percent
complete is displayed in the status window during cross reference generation. When the
process is complete, you are returned to the Utilities menu.
NOTE: If you have made any changes to the ladder diagram
program since the last time you generated the cross
reference files, you need to generate the references again
before printing the Ladder Diagram, Usage, or Address
Reports or using the on-screen cross reference display
feature. Otherwise the reports/display may not be
accurate. A message will be displayed to warn you of this
if the program .LOB file is more recent than the cross
reference file. You will have the option to continue, if
desired.
READING THE CROSS REFERENCES
The cross references are generated for the data objects defined in Table 13-1. These data objects
are 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 so
comprehensive. In addition to exact matches in the ladder logic where an address is used,
CHAPTER 13 CROSS REFERENCING
SoftPLC Corp., Inc. 28 July 2000 13-2
TOPDOC knows that there is an inter-relationship between different addresses. For example, a
Timer is made up of 3 words, each of which is made up of 16 bits, and the Timer itself may be part
of a Timer File. Whenever any bit, word, timer, or the timer file is used in the program it could affect
the other related objects. The "See Also" references generated by TOPDOC provide information
on these related data objects.
Table 13-1
Cross 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 with
the 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 address
is 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 but
not altered, such as an XIC instruction bit. The write references ("WR") signify that data at an
address could be altered by the program, such as an OTE instruction bit.
CHAPTER 13 CROSS REFERENCING
Pub. No. TDZ-MN1 July 28, 2000 13-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 the
Address Report to see where the address is used. The "OVERLAPS" references list files used in
instructions 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 *
CHAPTER 13 CROSS REFERENCING
SoftPLC Corp., Inc. 28 July 2000 13-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 references
in the Ladder and Data Table Editors and to quickly locate areas where an address is used in a
program. This feature reads information from the Cross Reference files generated by the Cross Ref
option.
ACCESSING THE DISPLAY
COMMAND: On-Screen Cross Reference
HOTKEY: [Alt][S]
MENU: Special ; On-Screen CrossRef
When you enter this command, TOPDOC displays the Cross Reference display window for the
current address at the cursor position (Figure 13-1). In the Ladder Editor, if the cursor is positioned
on an instruction that uses more than one address, TOPDOC brings up the Parameter Select Screen
and allows you to choose the address to be displayed.
6444444444444444444444444444444444444444444444444444444444444447
5 BIT WRD TMR Quit 5
5 Find bit references 5
K) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) M
5 PARAMETER: T004:000 5
K) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) M
5 T004:000/12 * T004:000/DN 5
5 T004:000/DN * TIMER DONE? 5
5 T004:000/TT * 5
5 T004:000/EN * When timer 5
5 T004:000.ACC/00 * times out 5
5 T004:000.ACC/01 * bit goes from 5
5 T004:000.ACC/02 * '0' to a '1' 5
5 T004:000.ACC/03 * 5
5 T004:000.ACC/04 * 5
944444444444444444444444444444444444444444N444444444444444444448
Figure 13-1
On-Screen Cross Reference Display Window
CHAPTER 13 CROSS REFERENCING
Pub. No. TDZ-MN1 July 28, 2000 13-5
ON-SCREEN CROSS REFERENCE MENU
The On-Screen Cross Reference menu has two or three choices. The first, Show XRef , allows you
to examine the cross reference information for the current instruction address. The second, New
Parameter , allows you to enter a new address. If the cross reference information is older than the
program logic or data, a third option Xref displays, which allows you to regenerate the cross
reference files.
SHOW XREF MENU OPTION
The Show XRef option checks the Cross Reference file and generates a menu based on the
available 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 address
selected and the information in the Cross Reference Files. Refer to Table 13-2 for additional
reference types.
Table 13-3
Address 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 the
cross reference information for the address.
If the selected menu option object is of a different type than the address, TOPDOC will display a list
of addresses that match both the object type and the address selected. You can then scroll through
the 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 keystrokes
are shown in Table 13-4. After you select an address, TOPDOC displays a new menu containing
the object type selections for the new address.
When positioned on any cross reference item in the list, you can "zoom" to that rung or next
occurrence of that address with the Position command, [Alt][P].
CHAPTER 13 CROSS REFERENCING
SoftPLC Corp., Inc. 28 July 2000 13-6
Table 13-4
On-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 with
the previous address displayed. You can enter a new address or edit the existing entry using any
of the Command Buffer Editing commands in Table 7-1.
Once the new address is entered, you are returned to the menu.
Pub. No. TDZ-MN1 July 28, 2000 14-1
CHAPTER 14
THE TOPDOC DATABASE
A TOPDOC database is a dBaseIV format file (.dbf) that contains address labels for data table
addresses. 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 database
files, 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 labels
at a time.
Alternatively, you can enter address labels one at a time in the Ladder Editor using the Label Editor
command 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 the
database 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 can
use 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-1
shows the Database Editor. Chapters 15 and 16 describe how to enter and edit address labels.
6444444444Entry Window4444444447
5 5
K) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) M
5 O:000/00 PARAMETER 5
5 MS1 SYMBOL 5
K) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) M
5 Motor XREF O/R 5
5 Starter <Y/N> N 5
5 5
5 FLD DWG # 5
5 DWG-1 5
94444444444444444444444444444448
Figure 14-1
Database Manager Window
CHAPTER 14 THE TOPDOC DATABASE
SoftPLC Corp., Inc. 28 July 2000 14-2
PARAMETER
The 15 character PARAMETER field is used for the data table address, program, or jump label
which owns the database label. You enter the data table address you want to be described as you
would when entering an instruction address.
The Database recognizes different types of addresses as shown in Table 14-1. The format of the
address you enter implies the address type, as shown in Table 14-1.
Table 14-1
SoftPLC 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 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) -
CHAPTER 14 THE TOPDOC DATABASE
Pub. No. TDZ-MN1 July 28, 2000 14-3
NOTE: You do not have to enter labels for every data table
address. If no label is found for a specific address during
Ladder Diagram printing, the label for the next higher level
address 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 for
the 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 data
table 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. You
can 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. For
storage points, you may want to enter nicknames that shed particular meaning on a point. Tag
names 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 action
the 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 Report
above 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 referencing
information on the Ladder Diagram Report for the current address. Enter [Y] to override the cross
reference information or [N] to include cross referencing.
This field is provided because sometimes an address is used over and over. For example, a
control/counter may be re-used many times in a series of file operations. To avoid all the references
to 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 include
cross referencing for the address.
FIELD DRAWING NUMBER (FLD DWG #)
CHAPTER 14 THE TOPDOC DATABASE
SoftPLC Corp., Inc. 28 July 2000 14-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/O
points, which are sometimes documented on separate field wiring drawings. This field can be used
for the name of the field drawing on which the device associated with a real I/O address can be
found.
On the Ladder Diagram Report, the value in this field is output below instructions with input or output
section 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 input
instructions using the address. The Field Drawing Number is only printed if the address is not used
as an output on another rung.
REINDEXING DATABASE FILES
The Database index files allow address labels to be located quickly without forcing TOPDOC to
search through the entire Database to find a specific record.
To ensure the fastest update time or to recover from certain Database related errors, you should
periodically reindex your Database files. You should reindex your Database whenever a large
number of deletions have been made, if you can't retrieve an address label, or if a power outage
occurred during Database modification.
The Reindex option on the Utilities Menu is used to reindex a Database file. When you select this
option, you are prompted for entry of a <PATH> and <FILE>. Then TOPDOC reindexes the
Database and recreates the index file. After the reindex is complete, you are returned to the Utilities
Menu.
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 not
properly create the TOPDOC index file format.
OTHER DATABASE FUNCTIONS
Since TOPDOC uses a common file format, dBASEIV *.dbf files, for its Database records, this
information can also be used in a number of different ways. A Database Utility program is included
with 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
CHAPTER 14 THE TOPDOC DATABASE
Pub. No. TDZ-MN1 July 28, 2000 14-5
When you copy rungs in a program during multi-file editing, the address labels are not copied
automatically unless you have specified this in the Editor Configuration (see Chapter 5). You must
use Windows Explorer or the DOS copy command to copy the Database and index files for re-use
in 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>.AN5
copy \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 read
dBaseIV compatible files such as a TOPDOC Database file. With these other packages, you are
able to use TOPDOC Database files for other purposes such as custom reporting, maintenance of
a 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 important
that you first examine the potential consequences. Specifically, but not exclusively, you must not
alter 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 particular
software package for other potential consequences.
NOTE: If you sort a Database file using another software package
you must reindex it using the Utilities menu Reindex
option before you will be able to use it with TOPDOC.
Pub. No. TDZ-MN1 July 28, 2000 15-1
CHAPTER 15
DATABASE EDITING FROM LADDER
AND DATA TABLE EDITORS
This chapter describes how you can create and edit address labels during ladder editing. Chapter
14 described address labels and the TOPDOC Database. This chapter also describes how you can
use the Ladder Editor Find command to search for addresses without labels.
ACCESSING THE DATABASE EDITOR
COMMAND: Label Database Editor
HOTKEY: [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 Editor
command. Position the cursor on an instruction using the address for which you want to create/edit
an 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 invoke
the Label Editor command.
NOTE: If an address label is displayed above the instruction or at
the top of the Data Table Editor, but the Database editing
window is blank when you invoke the Editor, the "Display
next higher label" function is probably turned on. Refer to
Chapter 5 for more information on this feature.
If you have not previously created the Database file for this program file, a window appears asking
you 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 enter
the command again.
THE DATABASE EDITOR DISPLAY
After you invoke the Label Editor, the type of instruction determines what happens next. If the
instruction 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 window
is displayed in the upper left corner of the screen. This window contains all of the addresses used
in the instruction.
CHAPTER 15 DATABASE EDITING FROM THE LADDER AND DATA TABLE EDITORS
SoftPLC Corp., Inc. 28 July 2000 15-2
NOTE: The cursor in the address selection window is initially
positioned on the address whose label will be displayed on
the screen and is the only label that will be printed on less
than 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 by
pressing [Enter]. The default selection is the instruction's "main" address, which is the label that will
be 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 , and
View 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-1
Database Editing Window in Ladder Editor
The location of the Editing window will change depending on the location of the instruction on the
screen when you invoke the Editor. If the instruction is an output, the Editing window displays on
CHAPTER 15 DATABASE EDITING FROM THE LADDER AND DATA TABLE EDITORS
Pub. No. TDZ-MN1 July 28, 2000 15-3
the left lower corner of the screen. If the instruction is an input, the Editing window displays on the
right lower corner of the screen. This will allow you to view the actual instruction on the rung while
it 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 the
Database file and you return to the menu. You can then select another option or press [Esc] to
return 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-address
instructions).
THE DELETE OPTION
You can remove an address label from the Database file with the Delete option. After you display
an existing address label, select Delete from the menu.
The address label is removed from the Database and the entry fields are immediately cleared. You
are then returned to the menu for selection of another option. Press [Esc] to return to the Ladder
Editor.
THE VIEW LAST OPTION
You can see the last edited address label using the View Last option. If you are documenting
addresses with similar functions, you can use the View Last option to preview the last entry to
determine 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 through
viewing, press any key to return to the menu.
NOTE: View Last only displays entries made in the current
editing session. If you have exited the Ladder Editor,
View Last cannot be used to find entries made in prior
editing sessions.
THE USE LAST OPTION
CHAPTER 15 DATABASE EDITING FROM THE LADDER AND DATA TABLE EDITORS
SoftPLC Corp., Inc. 28 July 2000 15-4
The Use Last option inserts the last edited address label for the current instruction address. This
is an easy way of documenting addresses with the same or similar descriptions. If there are only
minor differences between two labels, you can select Use Last and then select Edit to make the
changes.
When you select Use Last , the values for the last entered address label are entered into the
database for the current address. Then this menu is redisplayed. You can select Edit to make any
necessary changes, select any other option, or [Esc] to return to the Ladder Editor.
NOTE: Use Last only displays entries made in the current
editing session. If you have exited the Ladder Editor, Use
Last cannot be used to find entries made in prior editing
sessions.
SEARCH FOR UNLABELED PARAMETER
COMMAND: Find Unlabeled Parameter
HOTKEY: [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 you
document 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 that
has no address label in the Database.
From the Ladder Editor, enter the Find command, [Alt][F], and then select Unlabeled Parameter
from 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 locate
those as undocumented.
The Database editing window and menu are then automatically displayed. You can create an
address label or not (as previously described in this chapter). You can then search again for the
next 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.
Pub. No. TDZ-MN1 July 28, 2000 16-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 and
edit 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 one
to 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 which
exist for addresses not used in the program.
6444444444444444444444444444444Database Manager444444444444444444444444444444447
5Edit Add Create Blanks Delete Unused Quit 5
5Edit existing database entries 5
5) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 5
5 FILE: \TDZ\PLC5\DEMO0RUN.dbf 5
5 64444444444444444444444447 5
5 5O:023/15 5 5
5 5O:023/17 5 644444444444Entry Window44444444444475
5 5I:022/10 5 5 55
5 5I:022/12 5 5 55
5 5T004:000/12 5 5) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 55
5 5T004:000/DN 5 5 I:022/10 PARAMETER 55
5 5T004:000/TT 5 5 START TEST TAGNAME 55
5 5T004:000/EN 5 5) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 55
5 5T004:000.ACC/00 5 5 A test input XREF O/R 55
5 5T004:000.ACC/01 5 5 for beginning <Y/N> <N> 55
5 5T004:000.ACC/02 5 5 free running 55
5 5T004:000.ACC/03 5 5 timer FLD DWG # 55
5 5T004:000.ACC/04 5 5 55
5 94444444444444444444444448 94444444444444444444444444444444444485
94444444444444444444444444444444444444444444444444444444444444444444444444444448
Figure 16-1
Database Manager
CHAPTER 16 DATABASE EDITING - THE DBASE OPTION
SoftPLC Corp., Inc. 28 July 2000 16-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-1
Address 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 (displayed
in the Database Entry Display). Table 16-2 lists the commands you can use in the address window.
Table 16-2
Address 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 Label
Text, XREF O/R (Cross Reference Override), and the FLD DWG # (Field Drawing Number) are
discussed 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.
CHAPTER 16 DATABASE EDITING - THE DBASE OPTION
Pub. No. TDZ-MN1 July 28, 2000 16-3
While located in the Label Text Field, you can use the commands listed in Table 3-1. If you enter
a 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 Label
Text Field. Enter Y or N. [Enter] or [9] to move the cursor to the FLD DWG # (Field Drawing
Number) area.
Enter the FLD DWG # in the 11 character field. Use [F9] or [Enter] to exit the entry window and
save OR press [Esc] to exit and abort.
HINT: You can press [F9] at any time to save the record and
display 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 list
is not displayed.
If the address you enter already has a label, the information will be displayed. If the address you
enter does not have a label, the blank fields are displayed. You may create or modify the label or
press [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 you
select Insert , the label is saved, the entry fields are cleared, and you are prompted to enter another
parameter.
THE CARRY OPTION
The Carry option enters the displayed address label into the database and retains the text in the
window as a template for the next address label.
After the address label is saved, the PARAMETER field is incremented by one to the next available
address of the same object type (ie: bit, word). You can then use the new address, change the
address 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
CHAPTER 16 DATABASE EDITING - THE DBASE OPTION
SoftPLC Corp., Inc. 28 July 2000 16-4
The Abort option does not save the displayed address label in the Database. You can use this
option if you do not want to keep the current address label. If a label existed previously, this option
does not delete it, only the changes are aborted. The database entry window is redisplayed after
you 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 the
Database Manager. If you forget to save the currently displayed address label when using the
Insert 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 of
database 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 the
database is empty. The [Esc] key will return you to the Database Manager window to use the Add
option or Quit the Database Editor.
When you select Edit , two windows are displayed, an address list and the entry window. On the
left 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 the
screen, the Database Entry window is displayed. The Entry Window contains the address label for
the address indicated by the cursor. As the cursor moves through the address list, the corresponding
Database 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 you
to insert a new address label. The cursor moves to the Entry Window PARAMETER field. Enter
the 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, the
cursor returns to the address window positioned on the newly inserted address. You can then use
any commands in Table 16-2.
DELETING A RECORD
To delete a Database record use the [Del] key. Position the cursor on the address corresponding
to 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.
CHAPTER 16 DATABASE EDITING - THE DBASE OPTION
Pub. No. TDZ-MN1 July 28, 2000 16-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 next
address in the window. If you select No , the label will remain and the cursor will be positioned on
that address in the window.
CHANGING AN ADDRESS LABEL
To change an existing address label, position the pointer on the address whose label is to be
changed 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 to
the address window.
THE EDIT OPTION
The Edit option allows you to change an address label's record but not its address. When Edit
is 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 the
address 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 the
database record will be copied. Enter the address and press [Enter]. The database record will be
copied to the new address and the cursor will return to the address window, positioned on the
address you copied from.
THE ADDRESS OPTION
The Address option allows you to change the address for an existing Database record. Unlike
Copy, the Address option does not create a new record.
Select Address from the Entry Window Menu and enter the new address, followed by [Enter]. The
database record is now associated with only the new address. The cursor is returned to the address
window, positioned on the new address.
THE CREATE BLANKS OPTION
The Create Blanks option will automatically create blank database records for addresses used in
the 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 then
be exported to a database, spreadsheet or word processing program for entry (for example).
CHAPTER 16 DATABASE EDITING - THE DBASE OPTION
SoftPLC Corp., Inc. 28 July 2000 16-6
CHAPTER 16 DATABASE EDITING - THE DBASE OPTION
Pub. No. TDZ-MN1 July 28, 2000 16-7
THE DELETE UNUSED OPTION
The Delete Unused option automatically removes all records in the database that exist for
addresses not used in the program.
Pub. No. TDZ-MN1 July 28, 2000 17-1
CHAPTER 17
RUNG COMMENT EDITING
This chapter describes how you can create and modify rung comments with the Rung Comment
Editor. You can create new comments, copy comments from other areas of the program or from
external 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 comment
can be up to 195 characters per line and several hundred lines long, up to 32 Kbytes in size (about
3 to 8 pages of text). When a rung is copied, moved, or deleted, the comment is also affected. You
can 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 rung
moves, 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 corresponding
rung 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 can
center your comments over the printed rung by setting the tab width in the Rung Comment Editor
during 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 your
comment lines do not exceed the number of characters you use for your Ladder Report or they will
be truncated.
You can select to not print comments on the Ladder Report. If you do this, subtitles will also not
print.
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 the
display of comments on and off in the Ladder Editor.
CHAPTER 17 RUNG COMMENT EDITING
SoftPLC Corp., Inc. 28 July 2000 17-2
2) The Editor configuration determines the number of comment lines to be displayed, the location
of the lines, and the tab width to be used in comment display. This is described in more detail
in 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 Editor
HOTKEY: [Alt][R]
MENU: Text ; Rung Comments
You can only edit the comment for the current rung in the Ladder Editor. Position the pointer on the
rung associated with the comment you want to enter/change.
Enter/select the Rung Comment Editor Command to display the Comment Editor menu and editing
buffer. 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 later
sections of this Chapter.
CHAPTER 17 RUNG COMMENT EDITING
Pub. No. TDZ-MN1 July 28, 2000 17-3
Table 17-1
Comment 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 screen
for editing comments except for the top two lines. You are automatically placed into insert mode
and positioned at the upper left corner of the editing window. You can now enter or change the
comment text.
Line 2 displays a <FILE>. This is the default <FILE> given to your comment should you decide to
save it to disk. The default name is composed of the <PATH> for the program file and the rung
number. For example, rung P2/5 would have default <FILE> of "\TDZ\SPLC\P2/5.TXT". You can
change the default <FILE> using the reName command ([Alt][N]).
Line 1 displays status information including the current line and column number, the remaining
number of bytes (out of the 32 Kbytes allowed) and the total number of lines used. Line 1 also
displays the current mode of operation and an optional command buffer, which appears when
additional information is required for a selected command.
Using the Rung Comment Editor is similar to using any text editor or word processor. The Rung
Comment Editor does not automatically wrap to the next line, you must press [Enter] to go to the
next line.
You can use the [Ins] key to toggle between insert and exchange (overstrike) modes. The difference
between the two modes is that in insert mode characters are added and in exchange mode new
characters overwrite the existing ones.
CHAPTER 17 RUNG COMMENT EDITING
SoftPLC Corp., Inc. 28 July 2000 17-4
All of the editing commands listed in Table 17-2 and the positioning commands listed in Table 17-6
are available in both insert and exchange modes.
Table 17-2
Rung 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 insert
commands, delete commands, and miscellaneous other commands. There are also 3 commands
used for general editing purposes. Each is described in this section.
CHAPTER 17 RUNG COMMENT EDITING
Pub. No. TDZ-MN1 July 28, 2000 17-5
Insert Commands
Table 17-3 lists the insert commands and explains how to use them.
Table 17-3
Comment 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-4
Comment 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.
CHAPTER 17 RUNG COMMENT EDITING
SoftPLC Corp., Inc. 28 July 2000 17-6
Table 17-5
Comment Editor Special Function Commands
?4444444444; 4444444444444444444444444444444444444444444444444444444444444444444444444444444444
44444@
* KEYS 5 DESCRIPTION
*
G4444444444>4444444444444444444444444444444444444444444444444444444444444444444444444444444444
44444I
* [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 Comment
Editor 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 these
commands.
Table 17-6
CHAPTER 17 RUNG COMMENT EDITING
Pub. No. TDZ-MN1 July 28, 2000 17-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 entered
except 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 use
the 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 a
range of lines) on the screen. Each occurrence is shown with its line number location. You
can 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 the
entire comment by pressing [Enter], or you can search within a range of lines. Details on
selecting 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 a
character string in the comment.
CHAPTER 17 RUNG COMMENT EDITING
SoftPLC Corp., Inc. 28 July 2000 17-8
For both search commands, the Rung Comment Editor prompts for "Search mask:" on line 1. You
must enter the character string you wish to search for. To search again for same string, enter the
command and press [Enter] when prompted for "Search mask:".
You can use the "?" character as a wildcard character in your "Search mask:". For example, to
search for all occurrences of the words "their", "there", or "these" enter "the??" as the "Search
mask:".
INTERCHANGE COMMAND (SEARCH/REPLACE)
The interchange command, [Alt][I], searches for a character string and replaces it with another
character string (global search and replace).
After you press [Alt][I] a "Search, line#s:" prompt appears on line 1. You can search and replace
throughout the entire comment by pressing [Enter] or you can search and replace within a range of
lines. 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:", the
replacement character string. Enter the new character string you want.
The Rung Comment Editor finds the first occurrence of the "Search mask:", highlights the line, and
displays 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 Rung
Comment Editor searches for the next occurrence. If "n", the highlighted occurrence will remain the
same and the Rung Comment Editor searches for the next occurrence. If "a", all occurrences are
replaced 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, to
replace 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 the
cut and paste features of the Rung Comment Editor. A range can be a single line or a group of
contiguous 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
CHAPTER 17 RUNG COMMENT EDITING
Pub. No. TDZ-MN1 July 28, 2000 17-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 desired
set of lines. Next, using the positioning commands, move the cursor to the last line of the desired
set 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 the
range as highlighted on the screen.
NOTE: If the range only consists of a single line, you only need to
press [Alt][K] once, not twice.
You can define only one range at a time. To define a new range, you need to Unmark the previously
defined 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 using
the numbers of the comment's lines. To do so, at the "Line #s:" prompt, enter the line numbers
corresponding to the desired range (separated by a comma) and press [Enter]. This causes the
Rung 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 are
placed above the line where the cursor is positioned.
CHAPTER 17 RUNG COMMENT EDITING
SoftPLC Corp., Inc. 28 July 2000 17-10
To use the copy command, define the range to be copied, move the cursor to the line after the
desired 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 marked
after a copy command is executed.
Deleting a range
You can remove a defined range of lines using the delete range command, [Del][K]. Simply define
the range and press [Del][K]. All the lines in the range are removed from the comment. The cursor
does not have to be located within the range to use this command, you can be on any line in the
comment.
Moving a range
With the move command, [Alt][M], you can physically move a range of lines from their old location
to 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 the
desired new location, and press [Alt][M].
Unmarking a Range
You must unmark a range, defined with [Alt][K], before you can mark another. The Unmark
command 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 you
also delete the comment. In addition, the Comment Editor Menu option Delete can be used to
remove the comment without disturbing its associated rung.
To use the Comment Editor to delete a comment, position the pointer on the rung containing the
desired comment in the Ladder Editor. Bring up the Rung Comment Editor. The comment is
displayed 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-
CHAPTER 17 RUNG COMMENT EDITING
Pub. No. TDZ-MN1 July 28, 2000 17-11
2). We recommend you name your files with a .TXT extension so they can be easily loaded into
TOPDOC later.
After you select Write , a prompt appears on line 1 "write file (Y/N)". If you enter [Y] (for yes), the
file is saved with the name on line 2 and you are returned to the menu. If you enter [N] (for no), you
are returned to the menu.
The Write option is extremely useful. You can use it to save comments for later re-use in other
programs 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 external
text file on your computer disk (created using TOPDOC, another editor, or a word processing
program). With the Comment Editor, you can use other comments or external files as new
comments 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 Write
option), 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 less
than 32 Kbytes in size. Most program editors create compatible text files and most word processing
programs 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 the
current comment. When you select View , a menu with the options File or Rung Comment is
displayed.
With File , you can look at any external text file. If you select this option, you are prompted to
supply 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 select
this 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 the
screen. You can use the space bar to start and stop the scrolling or press any key to abort. When
all the text has been displayed, press any key to return to the menu.
CHAPTER 17 RUNG COMMENT EDITING
SoftPLC Corp., Inc. 28 July 2000 17-12
THE LOAD OPTION
You can use the Load option to import an external text file or a rung comment saved as a text file
into an empty editing window. After you select Load , a menu with the options File or Rung
Comment is displayed.
With File , you can look at any external text file. If you select this option, you are prompted to
supply 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 saved
with a .TXT extension.
The Rung Comment Editor then copies the specified external text file and returns you to the menu
for selection of another option. The original external text file is not affected by any changes you
make 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 new
comment. 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 external
text file to the current comment. When you select Append , a menu with the options File or
Rung Comment is displayed.
With File , you can insert any external text file before the current cursor location. If you select this
option, 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 the
current cursor location. If you select this option, you are prompted for the rung number of the
desired 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 defined
subtitles 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 begun
and the subtitle is printed on line 5. The remainder of the comment (if any more text exists) and the
CHAPTER 17 RUNG COMMENT EDITING
Pub. No. TDZ-MN1 July 28, 2000 17-13
rung are then printed as usual. The same subtitle is printed on each page until a new subtitle is
encountered.
The Ladder Editor displays subtitles as they are entered in the Comment Editor. Subtitles do not
affect 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 be
capitalized 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 any
other comment text on the line containing the subtitle. You can have multiple subtitles within a
single comment, if desired.
Figure 17-1 shows a comment with an example of a subtitle and Figures 17-2 show the result on the
Ladder 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-1
Sample Rung Comment Subtitle
TOPDOC for SoftPLC by SoftPLC Corp. 4.4
source : \TDZ\SPLC\1TDZDEMO
created: Wed Apr 18 14:23:04 1999 THIS IS A DEMO PROGRAM page 1
printed: 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
CHAPTER 17 RUNG COMMENT EDITING
SoftPLC Corp., Inc. 28 July 2000 17-14
TOPDOC for SoftPLC by SoftPLC Corp. 4.4
source : \TDZ\SPLC\1TDZDEMO
created: Wed Apr 18 14:23:04 1999 THIS IS A DEMO PROGRAM page 2
printed: 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. This
program allows you to manipulate the TOPDOC Rung Comment File (.CMT), or a General
Comment Format File (.GCT).
Using this program you can use other editors to create your rung comments, move rung comments
from 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.
PART V
REPORTS
THIS PAGE INTENTIONALLY LEFT BLANK
CHAPTER 17 RUNG COMMENT EDITING
Pub. No. TDZ-MN1 28 July 2000 18-1
CHAPTER 18
DOCUMENTOR OVERVIEW
This chapter provides an overview of the TOPDOC Documentor, including general printing
procedures that apply to each report and printer setup. No matter which report you choose to
print, 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 from
the Main Menu option Document and include:
Ladder This option prints the LADDER DIAGRAM REPORT which includes the ladder
logic with cross reference information, rung comments, and address labels. This
report is described in Chapter 19.
Address This option prints a detailed ADDRESS REPORT which prints for each data
table address used in the program, the current value, address label, and cross
reference information. This report is described in Chapter 20.
Usage This option prints the address USAGE REPORT which is a detailed map of the
data table that lists how each address is used in the program. This report is
described in Chapter 21.
Table This option prints the DATA TABLE REPORT which lists the values in the data
table and is described in Chapter 22.
Database This option prints the DATABASE REPORT which lists the address labels and is
described in Chapter 23.
Batch This option is also available to print multiple reports at one time. This is
described 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 of
the report options.
The printer setup provides the information that allows TOPDOC to communicate with your printer
and configure the report output format. Once you enter this information, you do not need to
provide it again. However, you can change it at any time using the Setup option on the
CHAPTER 17 RUNG COMMENT EDITING
SoftPLC Corp., Inc. 28 July 2000 18-2
Document Menu, or the Printer option from the main menu Setup option. Figure 18-1 shows
the Printer Configuration Editor.
644444444444444444444444444444444PRINTER SETUP4444444444444444444444444444444447
5Port Device setup Format Report setup Save Quit 5
5Select printer output device or file 5
K) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) M
5 Printer output device/filename : 5
5 LPT1 5
5 5
5 Print using IBM graphics set? : Y 5
5 Does printer supply LF with CR?: N 5
5 5
5 Number of lines per page : 59 5
5 Width of the report : 125 5
5 Left margin of the report : 4 5
5 5
5 Print right power bar? : Y 5
5 Center address labels : Y 5
5 Left margin of the comments : 6 5
5 Tab character translation width: 2 5
5 Suppress blank line after rung: N 5
94444444444444444444444444444444444444444444444444444444444444444444444444444448
Figure 18-1
Printer Configuration Editor
After you enter the required information, select Save to write the configuration to disk, then select
Quit to return to the Menu.
CAUTION: If you do not Save , your printer configuration will NOT be
saved to disk when you exit.
NOTE: TOPDOC does not utilize the windows printer drivers. If
you do not have your printer manual, or your printer
doesnt allow settings from a control panel, you may not be
able to properly setup your printer for the ladder report. In
this case, you should print to a disk file and use another
program to load the report and output it using the Windows
printer support. An application note is available on the
SoftPLC website and on your CD that describes how to do
this.
SELECTING THE OUTPUT DEVICE/COMMUNICATION PORT
You use the Port option on the printer Setup Menu to select the computer hardware device for the
output. 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 it
connected to using one of the first 6 options.
The LPT1, LPT2, and LPT3 options are for parallel printers. Other than the cable specified by
the printer manufacturer there are no other special requirements for using parallel printers.
CHAPTER 17 RUNG COMMENT EDITING
Pub. No. TDZ-MN1 28 July 2000 18-3
The PRN , COM1 , and COM2 options are normally used for serial printers. You can also use the
COM1 and COM2 options to send output to any connected device that can interpret ASCII
information.
You can use the Disk File option to send the output to an ASCII text file. You may want to output
to a disk file if your printer is temporarily unavailable or you want to view the report from disk. If you
select Disk File you must specify the <PATH> and <FILE> to send the output to. TOPDOC
attaches an extension of ".PRN" to the <FILE> when a report is printed.
CAUTION: Each time you print a report to a specific <FILE>, the new
data is appended to the end of the file. This file can
quickly become very large. For this reason, you should be
sure to delete the file when you are finished with the data
and to ensure there is sufficient disk space before
selecting to print to a disk file.
DEVICE SETUP
You use the Device Setup option to input information about your specific printer model. This
information 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) required
to setup the proper output configurations. Up to 40 codes can be entered. After you enter the last
code, press [F9] to exit back to the Printer Setup Menu. These codes can be found in your printer
manual.
NOTE: Do not press the [Esc] key while entering the code(s).
Also be sure to enter the hexadecimal equivalent(s) of the
character(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). For
laser printers the required codes will vary, depending on the amount of configuration you can do at
the 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 codes
for printing legal size paper. These codes are: 1B, 26, 6C, 33, 41. The pitch size, graphic
characters, and landscape orientation can be set at the printer front panel by selecting internal font
number 21.
PRINT IBM GRAPHICS SET?
You use the IBM Graphics option to indicate whether your printer supports IBM graphics
characters (select Yes ) or not (select No ). Refer to your printer manual to determine the correct
response.
CHAPTER 17 RUNG COMMENT EDITING
SoftPLC Corp., Inc. 28 July 2000 18-4
Unless your printer is a laser printer, you should select No . Even if your printer supports IBM
Graphics characters you may want to select No to speed up the output of the report on a dot matrix
printer. The IBM Graphics set produces output with solid lines instead of broken lines, which looks
nice 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 a
carriage return character or not. Select Yes if it does issue a linefeed, or No if it does not. Refer
to your printer manual to determine the correct selection.
You would normally select No for most printers. If your reports print with double spacing, reverse
your 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 to
minimize 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 value
in-between. Selecting these options will accommodate either 8-1/2 x 11 inch or 11 x 14-7/8 inch
paper.
Set the width at 125 Chars when using 8-1/2 x 11 inch paper when the printer is in compressed
mode. To print the same amount of information without operating the printer in compressed mode
would 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 in
compressed 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 you
select Custom , only 1 label will print for each instruction on the Ladder Report, similar to the output
for the 125 character width selection.
NOTE: If you are printing the Ladder Diagram Report, rung size
needs to be considered when selecting report width. Refer
to Chapter 19, Ladder Diagram Report, for details on logic
limitations.
CHAPTER 17 RUNG COMMENT EDITING
Pub. No. TDZ-MN1 28 July 2000 18-5
MARGIN
The Margin option allows you to set the value for the left margin. The report will be printed starting
in the column designated.
The left margin would normally be set from 0 to 6. If printouts are to be placed in a folder or
notebook, 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 of
the Ladder Diagram Report. You have the option to set tabs and margins for use within the report
and center the address descriptors. You may also choose not to print the right power bar.
NOTE: We recommend that you read Chapter 19, Ladder
Diagram 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 the
Ladder Diagram Report or not. Select Yes (for yes, print the power bar) or No (for no, do not print
the power bar). If you select No , Ladder Diagram Reports are printed much faster on dot matrix
and line printers since the printer does not need to move the carriage across the page as many
times. 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 rung
comments will be printed on the Ladder Diagram Report beginning in the column number designated
here plus the left margin value. (Refer to the LEFT MARGIN section above). This Comment
Margin only pertains to the position of the rung comments on the Ladder Diagram Report, and not
on 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 tab
characters it encounters in a rung comment when printing the Ladder Diagram Report.
CHAPTER 17 RUNG COMMENT EDITING
SoftPLC Corp., Inc. 28 July 2000 18-6
SUPPRESS BLANK LINE
This option lets you determine whether to (Yes) suppress printing of the blank line between the cross
reference 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 on
each page of the report. Line 1 identifies the version of TOPDOC used to print the report. Line 2
contains 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 program
description, 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 certain
troubleshooting cases, the Date Created and Date Printed
on the reports is useful information. The date and time
come from the operating system. Be sure they are correct
before 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 and
type 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 size
paper 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 you
see 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 the
printing process again as if it had not been stopped. Abort returns you to the menu. This
command is extremely useful in case of paper jam or other printer problems.
Pub. No. TDZ-MN1 28 July 2000 19-1
CHAPTER 19
THE LADDER DIAGRAM REPORT
The Ladder Diagram Report includes the program's ladder logic, address descriptors, rung
comments and selected cross reference information. To print this report, you use the Ladder
option 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 allows
you to select several report options and parameters. Each is described in Table 19-1.
Table 19-1
Ladder Report Options
?44444444444444444444444; 444444444444444444444444444444444444444444444444444444444444444444444
444@
* 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 program
has been edited since the last time the cross reference was run. If there is no cross reference file
OR it is older than the program *.LOB file, you will be asked whether you want to cross reference
the program before printing the report. If Yes , TOPDOC will cross reference the program and print
CHAPTER 19 THE LADDER DIAGRAM REPORT
SoftPLC Corp., Inc. 28 July 2000 19-2
the report. If No , the report will print with the current cross reference file (or without the cross
reference, 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 asked
if 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 of
information on the Ladder Diagram Report: the ladder logic (instructions), address labels, rung
comments, and cross reference information.
LADDER DIAGRAM INSTRUCTIONS
The ladder diagram instructions are printed as they appear in the Ladder Editor display. The rung
numbers 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, if
a rung comment (or a rung and comment combination) is very large, the comment and rung may
be divided across pages. Also, if the rung is too wide for a single line, TOPDOC will do a form-feed
and 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 last
saved to disk.
RUNG SIZE LIMITATIONS
The maximum number of instructions per horizontal path that can be printed on the Ladder Diagram
Report 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 contains
information pertaining to the number of Relay type and Block Instructions that can be printed on the
Ladder Diagram Report for each width selection, using a 16.6 pitch font.
CHAPTER 19 THE LADDER DIAGRAM REPORT
Pub. No. TDZ-MN1 28 July 2000 19-3
Table 19-2
Bit 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 and
the selected Left Margin of the Report. Rungs that extend beyond the physical limitations of the
report 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, fewer
instructions may be printed on the Ladder Report to provide room for the labels when rungs have
block 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 issued
and 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 Diagram
Report 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 labels
printed 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 be
printed on the Ladder Diagram Report. If 125 is selected for the report width, for each instruction
CHAPTER 19 THE LADDER DIAGRAM REPORT
SoftPLC Corp., Inc. 28 July 2000 19-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 next
higher level address type(s), if they exist, is used according to the object ranking scheme in Table
13-1. For example, if a bit address (such as T4:003.EN) has no address label, the address label for
the timer part of the bit address (T4:003) is printed on the Ladder Diagram Report. Similarly, if a
word 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 191
Address Labels/Output Cross References
for Different Report Width Formats
CHAPTER 19 THE LADDER DIAGRAM REPORT
Pub. No. TDZ-MN1 28 July 2000 19-5
CROSS REFERENCE INFORMATION
This section describes the type and location of the cross reference information on the Ladder
Diagram Report.
OUTPUT INSTRUCTION ADDRESS CROSS REFERENCES
Output instruction address(es) cross references are printed below each rung. Refer to Chapter 13
for definitions of the cross reference types. Cross Reference information for output instructions that
use multiple addresses will be printed for each address. See Figure 19-1 for an example of Output
Cross Reference information for multiple addresses.
If you entered a [Y] in the CROSSREF OVERRIDE field of the label for an address used in an output
instruction, 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's
addresses are used elsewhere in output instructions, the number of the rung which could last have
affected 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 DRAWING
NUMBER is printed below the instruction.
If neither of the two conditions above apply, nothing is printed below the input instruction. See
Figure 19-2, rung P2/1 for an example of each case.
CHAPTER 19 THE LADDER DIAGRAM REPORT
SoftPLC Corp., Inc. 28 July 2000 19-6
Figure 19-2(a)
Ladder Diagram Report Example
CHAPTER 19 THE LADDER DIAGRAM REPORT
Pub. No. TDZ-MN1 28 July 2000 19-7
Figure 19-2(b)
Ladder Diagram Report Example
CHAPTER 19 THE LADDER DIAGRAM REPORT
SoftPLC Corp., Inc. 28 July 2000 19-8
Figure 19-2(c)
Ladder Diagram Report Example
CHAPTER 19 THE LADDER DIAGRAM REPORT
Pub. No. TDZ-MN1 28 July 2000 19-9
Figure 19-2(d)
Ladder Diagram Report Example
CHAPTER 19 THE LADDER DIAGRAM REPORT
SoftPLC Corp., Inc. 28 July 2000 19-10
Figure 19-2(e)
Ladder Diagram Report Example
CHAPTER 19 THE LADDER DIAGRAM REPORT
Pub. No. TDZ-MN1 28 July 2000 19-11
Figure 19-2(f)
Ladder Diagram Report Example
Pub. No. TDZ-MN1 28 July 2000 20-1
CHAPTER 20
THE ADDRESS REPORT
This chapter describes the Address Report. The Address Report is a comprehensive report which
prints each data table address used in the program, its value, address label, and the cross reference
information. 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 , and
Quit is displayed. Quit returns you to the Documentor menu. All prints the report for the entire
data table.
Range prints the report for a selected type of cross reference objects. The report is printed in
address order within each cross reference object type in the order listed in Table 20-1. Chapter 13
describes the Cross Reference information and how to read it.
When you select Range , a data entry window is displayed. You must enter the desired starting
data table address, ending data table address, and the number you want to assign to the first page
of 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 every
bit 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 ). Figure
20-1 shows the title page.
TOPDOC checks to see if the program has been edited since the last time the cross reference was
run. If there is no cross reference file OR it is older than the program *.LOB file, you will be asked
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 print and you return to
the menu.
CHAPTER 20 THE ADDRESS REPORT
SoftPLC Corp., Inc. 28 July 2000 20-2
Table 20-1
Objects 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 the
meaning 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 the
address.
VALUE The column headings(s) describe the information in the column. The data in
the column is normally the address value, except for output and input
CHAPTER 20 THE ADDRESS REPORT
Pub. No. TDZ-MN1 28 July 2000 20-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 address
label.
LABEL TEXT The data in this column is the value of the five text description fields from the
address 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.
CHAPTER 20 THE ADDRESS REPORT
SoftPLC Corp., Inc. 28 July 2000 20-4
Figure 20-1(a)
Address Report Example
CHAPTER 20 THE ADDRESS REPORT
Pub. No. TDZ-MN1 28 July 2000 20-5
Figure 20-1(b)
Address Report Example
CHAPTER 20 THE ADDRESS REPORT
SoftPLC Corp., Inc. 28 July 2000 20-6
Figure 20-1(c)
Address Report Example
CHAPTER 20 THE ADDRESS REPORT
Pub. No. TDZ-MN1 28 July 2000 20-7
Figure 20-1(d)
Address Report Example
Figure 20-1(e)
Address Report Example
Pub. No. TDZ-MN1 28 July 2000 21-1
CHAPTER 21
THE USAGE REPORT
You use the Usage option on the Documentor Menu to print the Usage Report. This report is a
map of the entire data table (or a selected range of addresses) that lists how each address is
used 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 the
Documentor 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 the
printout.
The data table files are printed in order. If you want to print values from non-adjacent files you
must print the report multiple times with a different range selection each time. For example, if
you only want to print values from the output file and binary file 3 of the data table, you would
first select a range of addresses in output file 0, and then after the report is printed, select again
and print the desired addresses from file B3.
TOPDOC checks to see if the program has been edited since the last time the cross reference
was run. If there is no cross reference file OR it is older than the program *.LOB file, you will be
asked 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 print
and 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 an
example of the Usage Description Table. This section describes how to use and read this report.
CHAPTER 21 THE USAGE REPORT
SoftPLC Corp., Inc. 28 July 2000 21-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 address
was used in reference to a file. (See Table 21-2(a))
WORDS The first column under the WORDS heading may contain a Word Character
indicating the element type (ie: Timer, Counter, Control). The second column
indicates how the address was used in reference to a word (ie: control word, preset
word, 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 the
highest 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 the
printed label text is specifically referencing. The usage with the highest priority will
determine 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 the
address 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.
CHAPTER 21 THE USAGE REPORT
Pub. No. TDZ-MN1 28 July 2000 21-3
Table 21-1
Interpretation of Usage Report Characters
?44444; 444444444444444444444444444444444444444444444444444444444444444444444444444444444444444
44@
*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 be
printed for the address on the Ladder Report if
documentation exists for the higher level object the
address may be a part of. Refer to Chapter 19 for more
details.
USAGE REPORT CHARACTERS
Tables 21-2 illustrate the File, Word, and Bit Characters used in the Usage Report. Refer to Table
21-1 for the meaning of upper and lower case letters used for Usage Report Characters.
CHAPTER 21 THE USAGE REPORT
SoftPLC Corp., Inc. 28 July 2000 21-4
Table 21-2(a)
File Characters
?444444444; 44444444444444444444444444444444444444444444444444444444444444444444444444444444444
44@
*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 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) -
CHAPTER 21 THE USAGE REPORT
Pub. No. TDZ-MN1 28 July 2000 21-5
Table 21-2(c)
Bit Characters
?444444; 44444444444; 44444444444444444444444444444444444444444444444444444444444444444444444444
44444@
* CHAR 5 ELEMENT 5 DESCRIPTION
*
G444444>44444444444>44444444444444444444444444444444444444444444444444444444444444444444444444
44444I
*(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-3
Meaning 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".
CHAPTER 21 THE USAGE REPORT
SoftPLC Corp., Inc. 28 July 2000 21-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-1
Usage 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 indicating
that 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. (A
lowercase "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-2
Usage Report Example 2
To use the information provided in the report example for address T004:000, look on the first page
of the report or Table 21-2(b) under Word Characters. The "T" indicates that the address is used
in an instruction that references a timer. Since the "T" is uppercase, this indicates that
documentation 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-3
Usage Report Example 3
CHAPTER 21 THE USAGE REPORT
Pub. No. TDZ-MN1 28 July 2000 21-7
To use the information provided in the report example for address B003:006, look on the first page
of the report (Table 21-2(a)) under File Characters. The "o" indicates that the address is used in
more 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 lowercase
entries, 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 an
uppercase 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 an
instruction 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 Text
printed. 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 Key
column indicates that the Label Text for the "WRD" usage will be printed.
NOTE: In the Files column, documentation is acknowledged only
for file starts (S).
CHAPTER 21 THE USAGE REPORT
SoftPLC Corp., Inc. 28 July 2000 21-8
Figure 21-4(a)
Sample Usage Report (Page 1)
CHAPTER 21 THE USAGE REPORT
Pub. No. TDZ-MN1 28 July 2000 21-9
Figure 21-4(b)
Sample Usage Report
CHAPTER 21 THE USAGE REPORT
SoftPLC Corp., Inc. 28 July 2000 21-10
Figure 21-4(c)
Sample Usage Report
Figure 21-4(d)
Sample Usage Report
CHAPTER 21 THE USAGE REPORT
Pub. No. TDZ-MN1 28 July 2000 21-11
Figure 21-4(e)
Sample Usage Report
Figure 21-4(f)
Sample Usage Report
Pub. No. TDZ-MN1 28 July 2000 22-1
CHAPTER 22
THE DATA TABLE REPORT
You use the Table option on the Documentor Menu to print the Data Table Report. This report lists
the address values for the entire data table or a selected range of addresses. A title page is also
available 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> of
the 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 the
Documentor 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 data
entry 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 must
print the report multiple times with a different range selection each time. For example, if you only
want to print values from the output file and binary file 3 of the data table, you would first select a
range of addresses in output file 0, and then after the report is printed, select again and print the
desired 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 word
values in the default format for the current data table file type. The first column identifies the
CHAPTER 22 THE DATA TABLE REPORT
SoftPLC Corp., Inc. 28 July 2000 22-2
address which contains the value in column two. To determine the address which contains the
values 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 report
format is customized to clearly identify the meaning of each value in the data table file (see Figures
22-1).
Figure 22-1(a)
Data Table Report Examples
CHAPTER 22 THE DATA TABLE REPORT
Pub. No. TDZ-MN1 28 July 2000 22-3
Figure 22-1(b)
Data Table Report Examples
Figure 22-1(c)
Data Table Report Examples
CHAPTER 22 THE DATA TABLE REPORT
SoftPLC Corp., Inc. 28 July 2000 22-4
Figure 22-1(d)
Data Table Report Examples
Figure 22-1(e)
Data Table Report Examples
Figure 22-1(f)
CHAPTER 22 THE DATA TABLE REPORT
Pub. No. TDZ-MN1 28 July 2000 22-5
Data Table Report Examples
Pub. No. TDZ-MN1 28 July 2000 23-1
CHAPTER 23
THE DATABASE REPORT
You use the Database option on the Documentor Menu to print the Database Report which lists
all (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 the
Documentor 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 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 the printout.
The labels are printed in address order by type. Table 14-1 defines the object types and the order
printed. Bits are printed first, followed by words, files, timers, counters, etc.. For example, if you
specify a beginning address of O:010/00 and an ending address of O:013 every bit in all files of the
data 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, FIELD
DRAWING NUMBER, and CROSSREF OVERRIDE values entered into the Database for the
address.
CHAPTER 23 THE DATABASE REPORT
SoftPLC Corp., Inc. 28 July 2000 23-2
Figure 23-1
Database Report Example
Pub. No. TDZ-MN1 28 July 2000 24-1
CHAPTER 24
BATCH REPORTING
The Batch option allows you to print multiple reports in one printing session. A Table of Contents
may 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 this
section.
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-1
Batch Menu
THE CHOOSE OPTION
The Choose option allows you to select and specify the reports you want to print. After selecting
Choose from the Batch Print Menu, a cursor appears in the report selection list. You can move the
cursor using the [8] and [9] keys. Press [Enter] when the cursor is on the name of a report you want
to 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 report
parameters (Figure 24-1). Pressing [Ins] moves the pointer to the Options window so you can enter
the appropriate values. Press [Esc] to return to the report selection list or press [Enter] after the last
CHAPTER 24 BATCH REPORTING
SoftPLC Corp., Inc. 28 July 2000 24-2
option value has been entered to return the cursor to the report selection list. Continue selecting
reports 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 OF
REPORTS" section describes this report.
THE PRINT OPTION
The Print option sends all the selected reports to the device specified in the Printer Setup. Refer
to 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 retrieve
them for printing or further selecting. The selections are saved with the <PATH> and <FILE> of your
program with an .OPT extension.
Load brings a previously saved selection of reports from the disk into memory. You can then
select Choose (to edit) or Print .
SUMMARY OF REPORTS
Another report option available with Batch is the Table of Contents. If the Table of Contents is
selected and checked along with at least one other report, a Summary of Reports document will be
generated. 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 comes
from the program header.
REPORT INFORMATION
The second section is Report Information. It contains the Report Width, lines per page, and if the
IBM 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 report
starts on, and the starting and ending addresses or rungs selected to be printed.
CHAPTER 24 BATCH REPORTING
Pub. No. TDZ-MN1 28 July 2000 24-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
*
CHAPTER 24 BATCH REPORTING
SoftPLC Corp., Inc. 28 July 2000 24-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-2
Table of Contents Summary Report Example
PART VI
UTILITIES
THIS PAGE INTENTIONALLY LEFT BLANK
Pub. No. TDZ-MN1 28 July 2000 25-1
CHAPTER 25
THE DIFFERENCE DETECTOR
The Diff option, found under the Main Menu option, Workfiles , accesses the TOPDOC Difference
Detector which is described in this chapter. The Difference Detector finds differences between two
copies of the same program or similar programs on the hard disk. It compares a baseline copy to
another 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 store
on 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 data
tables 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 you
to the Main Menu.
The other three options specify where you want the difference output to go. Console displays
the report on the screen. Printer sends the report to the printer. File stores the report as a
text file on disk. If you select File , you are prompted for the <PATH> and <FILE> to store the
output. The <FILE> is given an extension of ".DFT".
NOTE: The printer configuration file from "Setup" is not used by
the Difference Detector. Output to a File goes to the
specified <FILE> and output to a printer is sent without
CHAPTER 25 THE DIFFERENCE DETECTOR
SoftPLC Corp., Inc. 28 July 2000 25-2
any of the escape codes or other settings entered into the
configuration file.
5) After you select the output device as described in step 4, the Difference Detector locates and
reports the differences. After all the differences have been found, you are returned to the Main
Menu.
While the Difference Detector is running, you can use the [Ctrl][Break] key sequence to abort and
return 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 on
the 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 are
included on the report. The report is divided up into "difference sections" which are clearly indicated
on the report. Each "difference section" contains all of the consecutive rungs that are different in
a given area of the programs. The "A" or "B" on the left edge of the rung indicates whether the rung
came 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 those
rungs 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 to
matching rung logic, so even if the rung numbers are different, the logic comparison is made
correctly.
CHAPTER 25 THE DIFFERENCE DETECTOR
Pub. No. TDZ-MN1 28 July 2000 25-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
CHAPTER 25 THE DIFFERENCE DETECTOR
SoftPLC Corp., Inc. 28 July 2000 25-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-1
Difference Report Example
Pub. No. TDZ-MN1 28 July 2000 26-1
CHAPTER 26
PROGRAM EXPORT/IMPORT OPTIONS
This chapter describes the Workfiles menu options Export and Import . These options are used
to perform program file format conversions between the formats used by TOPDOC, the PLC, and
the Allen-Bradley 6200 or RSLogix software.
NOTE: TOPDOC for SoftPLC includes PLC-5 upload
capability. Therefore, you could directly connect
to 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 file
extension:
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 with
TOPDOC are also in this format.
2) .PC5 These files are complete memory images in Allen-Bradley's ASCII program text
format used with 6200 versions 4 and later or RSLogix software. You can convert
to/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 text
file (<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 can
also be run from the operating system command line. Doing so gives you additional flexibility and
CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS
SoftPLC Corp., Inc. 28 July 2000 26-2
options not available when the utility is run from the menu. We suggest you read this entire section
before using this option.
The Ladder Decompiler (ldcomp5.exe) is a utility program that converts a file in SoftPLCs binary
format (.LOB) into a text file in Allen-Bradley's ASCII format (.PC5). This text file is a representation
of processor memory that includes data table, ladder program file, force table, and configuration
table sections. Once the PC5 file is created, it can be directly edited with a text editor or used with
the Allen-Bradley 6200 or RSLogix software.
NOTE: The Decompiler operates on new format LOB files.
Before using the utility from the command line, you
currently must convert the old LOB format files to the new
LOB format using another conversion program. If you run
the decompiler from the TOPDOC menus, this conversion
is run automatically.
Before running the Ladder Decompiler you must have an LOB format file of the program. These
are automatically created with the TOPDOC offline package or can be created after doing an upload
with 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 now
want 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-5
program 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 be
written over by the decompiler without a warning message.
You may want to rename or make a backup copy of the
existing 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 extended
documentation.
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 the
decompilation is complete.
NOTE: If you need to use the "no comments" capability in your
decompilation, you MUST run the utility from the
command line. The menu does not allow you to pass
options to the decompiler.
CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS
Pub. No. TDZ-MN1 28 July 2000 26-3
CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS
SoftPLC Corp., Inc. 28 July 2000 26-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 word
and bit definitions for the Processor Status file, PID, Block Transfer, Timer/Counter/Control. This
switch makes the resulting *.PC5 file larger, so use it only if you need to edit the words and bits of
the files mentioned.
The -c Switch
The -c switch is normally NOT used. When you run the Decompiler with the -c option, you do not
get comments in the resultant <filename>.pc5. This makes <filename>.pc5 smaller, but difficult
to 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 extension
MUST 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 programs
for 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 need
to 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 be
written over by the decompiler without a warning message.
You may want to rename or make a backup copy of the
existing PC5 files prior to running LDCOMP5.
CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS
Pub. No. TDZ-MN1 28 July 2000 26-5
CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS
SoftPLC Corp., Inc. 28 July 2000 26-6
LADDER DECOMPILER OUTPUT
A successful decompile creates a PC5 format file that can be loaded into a text editor, word
processor or the Allen-Bradley 6200 software.
Decompile errors should only occur if the LOB file is invalid or is a TOPDOC old format. As the
decompiler runs, error messages will display on the screen.
If an error occurs during decompiling, the name of the current file being decompiled is printed along
with the current line number and an error message. The line where the error was found is usually
printed BELOW its corresponding error message. A '^' points to the location in the current line where
the 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 now
want to convert to archive format.
2) Destination archive file: This is the name you want to give to the version of the PLC program
you 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 the
conversion process, the Workfile and archive file names and the program header description are
displayed. 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 for
information on the Convert Documentation option.
IMPORT OPTIONS
CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS
Pub. No. TDZ-MN1 28 July 2000 26-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 4
and 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. This
utility can also be run from the operating system command line. Doing so gives you additional
flexibility and options not available when the utility is run from the command line.
NOTE: If you are simply converting a program exported from
6200 software, you can skip the section entitled
"ADVANCED FEATURES". If you are using text to generate
the program, you most likely will want to use the full
capabilities of the Ladder Compiler. In this case, you
should carefully read all sections of this manual related to
the 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 for
information 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 SoftPLCs binary format (.LOB). This text file is a representation of SoftPLC processor
memory 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 Programming
2) File Inclusion capability
3) 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 during
compilation, 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, then
Import . 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:
CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS
SoftPLC Corp., Inc. 28 July 2000 26-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 program
you 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 of
TOPDOC. Press any key to return to the menu when the conversion is complete.
NOTE: TOPDOC uses the "redefine" capability in the compilation
when you run the Ladder Compiler from the menu. If you
do NOT want the "redefine" capability, you MUST run the
utilities from the command line. The menu does not allow
you to pass options to the compiler. Refer to "THE -r
SWITCH" 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 than
once in the complete resultant file (the .pc5 file and any include files), you must use the -r switch
to 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 extension
MUST 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 programs
for 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 need
to also specify the PATH. For example:
CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS
Pub. No. TDZ-MN1 28 July 2000 26-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 be
written over by the compiler without a warning message.
You may want to rename or make a backup copy of the
existing 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 format
file. Currently, TOPDOC does not use this format. You
must run a separate utility program to convert the new
LOB file to old LOB format. If you run the compiler from
the TOPDOC menus, this conversion is done
automatically.
During compilation, the Ladder Compiler performs most of the same steps that TOPDOC does when
you are editing a program. Each address of each rung is checked for validity and if the address
does not exist, the compiler will create the data table for it automatically. If the insertion of a rung
requires data table updates, such as with the Block Transfer instructions, the updates are done by
the 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 with
the current line number and an error message. The line where the error was found is usually printed
BELOW its corresponding error message. A '^' points to the location in the current line where the
error was found. In the example below, a JSR mnemonic was incorrectly typed as a JR. This
resulted in the following errors:
Compiling conv2.pc5
conv2.pc5(1309): Error: invalid input "JR"
SOR JR 3 0 EOR
^
conv2.pc5(1309): Error: error in input area of rung
SOR 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 editor
and 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.
CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS
SoftPLC Corp., Inc. 28 July 2000 26-10
If you are running the compiler from the command line, by using the DOS redirection command, you
can 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/O
Module Configuration information present in the ASCII file.
The file will be compiled, but the information will be thrown
away.
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 subsequent
use of that symbol will be replaced by your definition text. The syntax used is a subset of that
supported by the C programming language. Whereas C supports parameters in a macro, the ladder
compiler 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 be
an alphanumeric character. Values can be any allowed text structures or SoftPLC addresses as
defined 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 symbol
ADDRESS1 can be used anywhere in the text, and the symbol will be substituted with "N7:0" by the
compiler before translation to TOPDOC .LOB format.
The compiler accepts a command line switch ( -r ) which, when present, allows you to redefine
symbols that have been previously defined. This way you can have different values for a particular
symbol name at different points during the compile process. The compiler always uses the most
recent definition of a symbol. If the switch is not present, redefinition of a symbol will be reported
as an error. See Figure 26-1 for an example of how symbol redefinition can be used.
Macro Programming
CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS
Pub. No. TDZ-MN1 28 July 2000 26-11
The #define keyword is not limited to addresses. The text of entire rungs may be defined into a
symbol, 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 at
the 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. The
Compiler is case sensitive and using all caps will eliminate potential problems, particularly when
multiple programmers are working on a project.
You may also consider using the address TAGNAME (from the TOPDOC database) as the Symbol
name. 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 to
valid SoftPLC addresses, values, or strings PRIOR to using them in another #define or #included
file. 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. Two
examples:
#include "symbols.txt"
#include <rungs.txt>
The included files can contain as little as a single word or as much as entire section definitions, such
as one or more data table files or ladder program files. With this facility, you can organize the
project into several files all included into one main file. Included files can include yet other files, and
so on. The maximum number of nesting levels is limited only by the FILES parameter setting in
your CONFIG.SYS file.
The syntax of the #include is:
CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS
SoftPLC Corp., Inc. 28 July 2000 26-12
#include <filename> OR #include "filename"
Filenames can be any valid DOS filename, provided the referenced file is in ASCII format. Of
course, to compile properly, the text file must be setup according to the Allen-Bradley PC5 file
specifications.
An environment variable is provided to allow you to specify a search path for the include files (see
below). 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 include
files not in the same directory as the PC5 file being compiled. You can use the INCLUDE variable
from the operating system command line using the SET command, or put the SET command in your
AUTOEXEC.BAT file so it is automatically executed upon computer system bootup.
The INCLUDE variable works like the PATH command. The syntax is:
SET INCLUDE=<path
1
>;<path
2
>;...<path
n
>;
For example, to allow include files in the \SPLC\TXTPGMS and \SPLC\NEWPGMS directories on
drive 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 down
on the amount of work needed to complete a project. For example, you may define repetitive rungs
in a file using symbols as addresses, define the addresses in other files, and then include different
addresses 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 changing
the include file that contains the definitions. Repetitive rungs can be easily constructed in this way,
using the -r command line switch.
CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS
Pub. No. TDZ-MN1 28 July 2000 26-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-1
Example Ladder Compiler Input File
MISCELLANEOUS CONSIDERATIONS
1) If you attempt to import a PC5 file that contains the #define or #include statements with the
Allen-Bradley 6200 software, you will get an "invalid syntax error" for each line containing one
of 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 files
simultaneously, you should redirect the output of errors to a disk file or printer. This will ensure
you have a complete record of any errors.
3) The Allen-Bradley PC5 format uses the % sign to identify comments in the file. The Ladder
Compiler can accept either the % sign, the C language /*...*/ structure, or a leading //,
terminated by end of line.
CHAPTER 26 PROGRAM EXPORT/IMPORT OPTIONS
SoftPLC Corp., Inc. 28 July 2000 26-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 and
you now want to edit with TOPDOC.
2) Destination Workfile: This is the name you want to give to the version of the PLC-5 program
you 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 the
conversion process the archive file and Workfile names and the program header description are
displayed. 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 for
information 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 directly
compatible with the standard .ACH file format as published
by Allen-Bradley. If you try to import this file into
TOPDOC without success, call SoftPLC Technical Support
for assistance.
Pub. No. TDZ-MN1 28 July 2000 27-1
CHAPTER 27
DOCUMENTATION CONVERSIONS AND
UTILITIES
This chapter includes information on converting program documentation (address labels and rung
comments) to/from TOPDOC format and other documentation software packages. It also describes
the documentation utilities included with TOPDOC that allow you to manipulate data files and text
files.
DOCUMENTATION CONVERSIONS
You can convert TOPDOC documentation files to text using the utility programs described in later
sections of this Chapter. You can also convert TOPDOC documentation files to Allen-Bradley 6200
format 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 this
section.
NOTE: If you have program documentation in the ASCII format
from another documentation software package (other than
the A-B 6200), you can import it into TOPDOC using a
series 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 ASCII
format, using the export to text procedure. Refer to the A-B documentation for the procedure on
how to do this.
With the IPDS ASCII files, you can now do the conversion into TOPDOC's file formats. The
conversion 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.
CHAPTER 27 DOCUMENTATION CONVERSIONS AND UTILITIES
SoftPLC Corp., Inc. 28 July 2000 27-2
You can run the utility from within SoftPLC TOPDOC using the Workfiles menu options Convert
Documentation , then IPDS Ascii to TOPDOC . Alternatively you can run the utility from the
DOS 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 AC
record (address comment) is not present for the same address. In this case, the IC record is
treated an AC record.
3) Rung comments must be associated with the main address, of the topmost, rightmost output
instruction of a rung.
NOTE: If there were no rung comments in the 6200 files, you will
get an error creating the .CMT file. This can be ignored as
the 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 TOPDOC
and 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 software
exports 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 your
default TOPDOC data directory with the same <FILE> name. The conversion will then be done
showing 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.
CHAPTER 27 DOCUMENTATION CONVERSIONS AND UTILITIES
Pub. No. TDZ-MN1 28 July 2000 27-3
You can run the utility from within TOPDOC using the Workfiles menu options Convert
Documentation , then TOPDOC to IPDS Ascii . Alternatively you can run the utility from the
DOS 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) optionally
takes command line arguments, one of which specifies that you want truncation to take place
during 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's
specifications. The options described above are needed to guarantee that those specifications
are not exceeded. We have allowed you to make truncation an option so you can convert from
TOPDOC to Allen-Bradley's text format file without losing text, for editing with a text editor. To
do 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 address
labels are 5 lines by 13 characters. When -d option is used, a smart algorithm is used to
minimize 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 for
the purpose the purpose
of showing of showing
how the -d how the -d
option works option wor
5) LABEL ADDRESSES: There are some differences in the way TOPDOC and Allen-Bradley 6200
software address files. If the TOPDOC address is #<addr>, the converted Allen-Bradley label
will be attached to word <addr>, not the file.
CHAPTER 27 DOCUMENTATION CONVERSIONS AND UTILITIES
SoftPLC Corp., Inc. 28 July 2000 27-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 characters
per line. When -r option is specified, only the first 6 lines are used and comment lines of more
than 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 TOPDOC
and 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 software
data 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 the
default 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, you
will 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 only
be 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 will
be 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 into
will be placed into <FILE2>.DUP.
-x Export dbffile <FILE1>.DBF to sdffile <FILE2>.PRN.
CHAPTER 27 DOCUMENTATION CONVERSIONS AND UTILITIES
Pub. No. TDZ-MN1 28 July 2000 27-5
-mn Merges sdffile <FILE1>.PRN with existing dbffile <FILE2>.DBF. When duplicates records
are located, the last occurrence of the address listed in the sdffile will be used, and duplicate
records into will be placed into <FILE2>.DUP.
-mo Merges sdffile <FILE1>.PRN with existing dbffile <FILE2>.DBF. When duplicate records
are located, the first occurrence of the address listed in the dbffile will be used, and
duplicate records will be placed into <FILE2>.DUP.
-rn Reindexes the dbffile <FILE1>.DBF. When duplicate records are located, the last
occurrence 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 first
occurrence 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 database
did 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 644444444444447
5 <FILE1>.DBF 5 5 <FILE2>.DBF 5
9444444L4444448 9444444L4444448
R R
DBF5 -x <FILE1> DBF5 -x <FILE1>
* *
9 9
644444444444447 644444444444447
5 <FILE1>.PRN 5 5 <FILE2>.PRN 5
944444L44444448 94444444L444448
. ) ) ) ) ) ) ) ) ) ) ) ) ) 0) ) ) ) ) ) ) ) ) ) ) ) ) ) ) -
R
DBF5 -i <FILE3>
*
9
644444444444447
5 <FILE3>.DBF 5
944444444444448
Figure 27-1
Merging TOPDOC Databases
The process of merging TOPDOC databases can be completed in three steps using the DBFx
program.
1) Converting the TOPDOC Database File to SDF (.PRN) Format
CHAPTER 27 DOCUMENTATION CONVERSIONS AND UTILITIES
SoftPLC Corp., Inc. 28 July 2000 27-6
The first step in merging database files is to convert the *.DBF files to ASCII SDF files (Standard
Delimited 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 with
any 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. This
can 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, and
EXAMPLE2.PRN into a file called FINAL.PRN. This method of combining files can be used
on 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 TYPE
command. This is done as follows:
TYPE EXAMPLE2.PRN >> EXAMPLE1.PRN
Entering this on the DOS command line will add the file EXAMPLE2.PRN to
EXAMPLE1.PRN. This method works with two files only. To combine more than two files
together, 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 TOPDOC
database *.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 which
of the -i options you use. The first is "n", which uses the newer (or last encountered) database
record when duplicate addresses are encountered. The second is "o", which uses the older (or
first 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 called
FINAL.DBF. If duplicate records are located, then the last usage of the address in the file
will be used, and a file called FINAL.DUP will be created containing all the duplicate records
located, but not used in the database file.
CHAPTER 27 DOCUMENTATION CONVERSIONS AND UTILITIES
Pub. No. TDZ-MN1 28 July 2000 27-7
DBF5 -io \TDZ\SPLC\TEMP \TDZ\SPLC\FINAL
In this second example, DBF5 will import the file TEMP.PRN to a database called
FINAL.DBF, but the first record of any duplicates will be used. FINAL.DUP will be created
containing 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 associated
memo file *.DBT, and database index file *.AN5. To use this database with TOPDOC, you only
need to run the Utilities option Reindex , then you are ready to use the database with the
TOPDOC Editor or Documentor.
THE COMMENT UTILITY
This section describes how to use the TOPDOC Comment Utility Program CMT5.EXE. With this
program, you can manipulate TOPDOC Rung Comment Files (*.CMT) and General Comment
Format 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 become
unsynchronized from their ladder logic rungs.
TOPDOC RUNG COMMENT FILES
The TOPDOC Rung Comment Files are stored in the same subdirectory as your Ladder Program
Files (*.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 allowing
TOPDOC to attach each comment to the proper rung.
Comments are merged with the Ladder Program by comparing the rung number and the first output
instruction 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 rung
comments to rungs. Mismatches are handled on a case by case basis, TOPDOC resynchronizes
from 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.
CHAPTER 27 DOCUMENTATION CONVERSIONS AND UTILITIES
SoftPLC Corp., Inc. 28 July 2000 27-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-2
Example 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 only
be 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 that
there are not any comments in an existing .CMT file
you want to keep, because this conversion deletes any
existing .CMT file before converting the .GCT file.
-x Convert <FILE>.CMT to <FILE>.GCT format.
CAUTION: Before doing this operation, you should verify that any
existing .GCT file does not contain information you
want to keep, because this conversion deletes any
existing .GCT file before converting the .CMT file.
NOTE: If you use the cmt5 -x option, and the program contains
instructions using the new MG, BT, PD data types, rung
comment mismatches will occur. In this case, remove the
CHAPTER 27 DOCUMENTATION CONVERSIONS AND UTILITIES
Pub. No. TDZ-MN1 28 July 2000 27-9
mnemonic from the .GCT file and use the merge option to
restore 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 automatically
performs 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 on
the disk, it displays the information on the screen. This allows you to read the comment file
without 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 easily
copy 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 SoftPLC
program 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 simply
remove the mnemonics or the conversion will not work!
HINT: If the two programs are "exactly" the same, you do not
need to do this step. A good way to check this is to run
the Difference Detector. If the Difference Detector finds
a 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.
CHAPTER 27 DOCUMENTATION CONVERSIONS AND UTILITIES
SoftPLC Corp., Inc. 28 July 2000 27-10
Creating Rung Comments Outside of TOPDOC
You can create rung comments outside of TOPDOC and then use the CMT program to merge the
comment file with the .LOB file. In this example, we will merge comments with a SoftPLC Program
file called MCDEMO.LOB.
1) Using any text editor, create a .GCT file with the same name as your .LOB file. The file needs
to be in the format shown in Figure 27-2. When you are creating the record header, leave the
three letter mnemonic field blank. This enables the .GCT file to be merged with the .LOB file
on 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 comments
to (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 a
possibility that another copy of TOPDOC will be unable to synchronize all the rung comments with
the .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 the
mismatched 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 to
the .GCT format you will not lose any comments. You do this by typing:
cd splc
rename MCDEMO.GCT MCDEMO.TMP
cd ..
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. This
will 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 GCT
records 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:
CHAPTER 27 DOCUMENTATION CONVERSIONS AND UTILITIES
Pub. No. TDZ-MN1 28 July 2000 27-11
CMT5 -i splc\MCDEMO
6) When this conversion is complete, run TDZ and load the file you have just recovered the rung
comments for into the editor (MCDEMO.LOB). The rung comments will be merged
automatically.
PART VII
SOFTWIRES
THIS PAGE INTENTIONALLY LEFT BLANK
Pub. No. TDZ-MN1 28 July 2000 28-1
CHAPTER 28
SoftWIRES OVERVIEW
This manual explains how you use SoftWIRES to perform PLC program emulation, simulation
and testing, using TOPDOC version 4.
WHAT IS SoftWIRES?
With SoftWIRES, you can run your control program logic offline within the computer for testing
or training. SoftWIRES executes the ladder diagram instructions identically to the PLC. You can
change data table and I/O values manually or have SoftWIRES automatically transfer data table
and I/O values between the control program and a program that models your process. By using
SoftWIRES, you no longer need to set up elaborate I/O simulation panels or spend time and
money testing on your actual plant equipment.
SoftWIRES is fully integrated into the TOPDOC offline Ladder Editor and is automatically
installed when you install TOPDOC. Your Software Sentinel and/or TOPDOC software package
must be enabled for SoftWIRES functionality in order to use the emulator and SoftWIRES
capabilities.
O.N.E. INTERFACE OVERVIEW
SoftWIRES also includes an O.N.E. (or "DF1 Interface") that processes Communication network
commands as part of the simulation. These commands can come from another computer
running software like graphics packages (ie: Wonderware InTouch, Citect, A-Bs RSView, etc.),
other A-B PLC's, and more. So long as the command packets are valid PLC-5 Data Highway
Read/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 interface
applications. You can also train operators on the operator interface application without needing
the PLC equipment and I/O or I/O simulator! The Interface is described with more detail in
Chapter 32.
Pub. No. TDZ-MN1 28 July 2000 29-1
CHAPTER 29
PROGRAM EMULATION
This chapter describes how SoftWIRES emulates, or executes, PLC ladder logic. Included are
the 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) is
closed loop testing. Program emulation is a powerful debugging and testing tool. The PLC
program logic is executed in the PC just as the PLC would run it. This allows you to test a
program before you download it to the PLC.
There are many advantages to program emulation. End users can save a lot of time and money
by finding programming problems at the engineer's desk instead of tying up (and potentially
harming) plant equipment. Systems Houses and Consultants have the ability to test programs
before installation at the client site.
Another advantage of emulation is in teaching personnel how PLC programs actually operate in
a 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, SoftWIRES
emulates the currently loaded program file. The SoftWIRES Emulator is nicely integrated with
the TOPDOC Editor providing a highly productive programming and debugging environment.
During program emulation, you can scroll through the ladder diagram and watch the program
running. SoftWIRES intensifies instructions that are true, just as the TOPDOC Online Editor
does when the PLC is in run mode. The data table is updated as the program runs and you can
see 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 simulate
live input status changes. The data table can be examined or altered at any time. You can
debug 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 (or
run mode) and single-step. Continuous mode operates as its name implies. The entire
program is executed just as if the PLC were running it. You can monitor and modify the data
table and turn individual bits on and off.
Single-step mode is a powerful debugging tool. You can execute the ladder diagram one rung at
a time, at your command. You can insert breakpoints at critical areas or upon a specific set of
CHAPTER 29 PROGRAM EMULATION
SoftPLC Corporation 28 July 2000 29-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: Emulation
HOTKEY: [Alt][E]
MENU: Special ; Emulate File
The Emulation command is used to access the program emulation feature from the TOPDOC
Ladder Editor. After you enter/select the command, SoftWIRES pre-scans the current loaded
program. This pre-scan checks the program much like the Editor Verify option, but adds some
additional checks. If no errors are found, Emulation begins. If the pre-scan finds any errors
which would cause run-time faults, a message is displayed and the rung containing the error is
brought up. You are back in the TOPDOC Editor operate mode at this time and can take the
necessary 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 or
emulate in continuous mode by pressing [C].
As the program runs, the instruction status (TRUE/FALSE) is indicated with color change, just as
it is when Online with a PLC. The current values of words will be displayed on the screen, as in
the case of the Counter and Timer instructions. You can also monitor the program's data table
values using the TOPDOC Data Table Editor. Table 29-1 lists the commands available during
program emulation.
You may also see a "DC" appear below bit instructions. This is a feature of SoftWIRES
simulation and can be ignored during simple emulation. For more information, refer to Chapter
30.
NOTE: If you choose to use the Data Table Editor to set word or
bit values, all of the Data Table Editor commands are
available. However, the Data Table values are
continually updated as the program runs, and values
you 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 the
SoftWIRES emulator, these files remain loaded but are
not accessible (via [F7]/[F8]).
CHAPTER 29 PROGRAM EMULATION
Pub. No. TDZ-MN1 28 July 2000 29-3
Table 29-1
Emulation 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 section
Go to last instruction in program section
Position command
Find command
Access Data Table Editor
Zoom to Data Table Editor

Turn ON/OFF the bit corresponding to the
current EXAMINE ON/OFF instruction
Insert new data into an instruction
Enter Single-Step mode
Enter Continuous Run mode
Restore cursor to next executable rung
Execute 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 to
different 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 have
complete 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 to
be executed. To execute a rung, the Next command ([N]) is used. Table 29-2 lists the single-
step execution commands.
CHAPTER 29 PROGRAM EMULATION
SoftPLC Corporation 28 July 2000 29-4
Table 29-2
Single-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 also
enter single-step mode from within SoftWIRES by pressing the [S] key at any time when in
continuous mode.
BREAKPOINTS
Breakpoints are locations in the program or specific conditions upon which you want to stop
continuous execution and enter single-step mode. You can mark certain rungs as breakpoints or
you can use ladder logic to automatically trigger single-step mode upon a certain set of
conditions.
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 the
Breakpoint occurred.
If you are in the Data Table Editor when a Breakpoint occurs, TOPDOC will display a message
that single-step mode has begun. You can continue editing the data table by pressing any key to
clear the message. Program execution will not begin until you return to the ladder display and
enter 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 when
the 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 the
rung and press [U].
Breakpoints are "sticky". What this means is that breakpoints remain marked until you unload
the 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 marked
rungs), and start the emulation again without having to remark breakpoints.
CHAPTER 29 PROGRAM EMULATION
Pub. No. TDZ-MN1 28 July 2000 29-5
The Breakpoint Instruction
Marked breakpoints can be used, for example, to stop continuous execution when a particular
subroutine is executed, such as a fault or shut-down routine. To do this, you would mark the first
rung 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 the
effects of a single scan.
A special output instruction with mnemonic BKP (for BreaKPoint) is also available. When a rung
containing this instruction is TRUE and the rung is scanned, single-step emulation mode is
entered. 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 used
the BRK mnemonic. Since SoftPLC support BRK as a
valid instruction, we have changed the mnemonic to
BKP 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 continuous
execution. If another true Breakpoint instruction is encountered while in single-step mode, it is
ignored, 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 the
PLC.
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 a
Timer/Counter Done bit to energize the Break instruction,
@ a certain set of I/O conditions exist which could cause a potentially dangerous or equipment
damaging situation,
@ the rungs of particular interest for the test are about to be scanned,
@ and many others.
Pub. No. TDZ-MN1 28 July 2000 30-1
CHAPTER 30
SoftWIRES SIMULATION
This chapter describes the concept of SoftWIRES, how SoftWIRES works, and how you can use
SoftWIRES as a testing and training tool. Unlike Emulation, which is open-loop, SoftWIRES
simulation provides for complete closed-loop testing.
ABOUT SoftWIRES
SoftWIRES lets you test your control program against a program that models your process. This
simulation, which includes feedback, lets you completely test your program without the need for
cumbersome wiring and the expense of test panels. In fact, SoftWIRES permits kinds of testing
that 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 and
analog, and permits on-screen verification of control programs, system model functions, and
logic states. You can test an entire program or a range of rungs and "single-step" to execute a
single rung at a time. You can preset program interrupts to flag the occurrence of pre-defined
events.
With SoftWIRES, testing can be done during development. You can design the system and your
control program simultaneously. Since the actual control and process equipment is not needed
for testing you reduce shop downtime and the risk of equipment damage during startup. By
reducing 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 is
where no model is used at all. This is the Emulator, an open loop testing situation where the
data values are manipulated by you using the Data Table Editor and contact and data
manipulation (refer to Chapter 29).
Another simple model is a Sequencer Output instruction. You can use this instruction to load a
predefined sequence of changing inputs into the control program data table. Your process model
program can consist of several of these Sequencer Output instructions with different sequencer
tables 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 gives
guidelines and sample models for different control logic sequences, both digital and analog
control.
CHAPTER 30 SoftWIRES SIMULATION
SoftPLC Corporation 28 July 2000 30-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 program
2) create a model program
3) 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 is
displayed. Quit returns you to the Editor Menu. Go begins the simulation and is described
later. 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 an
Environment before you can run SoftWIRES. The Environment option on the SoftWIRES
Menu is used to create/edit Environments. When you select Environment , another menu is
displayed with the options Edit , Load , Write , and Quit . Quit returns you to the
SoftWIRES 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 the
existing 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 menu
options Control , Process , Flow Sequence , Wiring Diagram , and Quit . An Environment
consists 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 the
standard Path/File Entry Window. Enter the name of the control program file.
CHAPTER 30 SoftWIRES SIMULATION
Pub. No. TDZ-MN1 28 July 2000 30-3
To enter the process simulation program name, select the Process File option. This will bring
up 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 the
specified 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 rungs
2) Output Scan - transfers outputs from the control to process
3) Process Program Scan - executes the process program rungs
4) Input Scan - transfers inputs from the process to control
5) Reset Field Outputs - sets all unforced outputs to zero
6) Flush Field Inputs - sets all unforced inputs to zero
The Flow Sequence you create determines, in part, how the simulation takes place. The Flow
Sequence is a powerful tool that can help make your simulation easier and can help you simulate
a 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 cursor
in the Flow Sequence window and you can make edits. [8] and [9] can be used to move the
cursor 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 above
the 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 of
choices. Within the list box, position the cursor on your desired selection and press [Enter]. This
will 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 you
specify which I/O is to be simulated, which is to be ignored, and allows you to force I/O points
ON 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" is
an input to the Control program (the factory to the PLC) and an "output" is an output to the
Process 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 input
addresses, backwards from a normal control program. The Wiring Diagram is the same size as
the I/O image table of the Control Program.
To edit the Wiring Diagram, select the Wiring Diagram option from the Environment Edit
Menu. This displays the Wiring Diagram display and a menu with options Edit , Bit/Word
CHAPTER 30 SoftWIRES SIMULATION
SoftPLC Corporation 28 July 2000 30-4
Toggle , Auto Advance , and Quit . Quit returns you to the Environment display. The
other options are described in this section.
The Wiring Diagram Editor can be used in word mode or bit mode. In word mode, the cursor is
16 bits (1 word) wide and you can modify all 16 bits of the word as a whole. In bit mode, the
cursor is 1 bit wide and you can modify each individual bit. The Bit/Word Toggle option is
used to toggle between word and bit editing modes.
The Auto Advance option operates like the Data Table Editor. If Auto Advance is ON, you can
edit 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 Wiring
Diagram is similar to using the Data Table Editor. The available commands are listed in Table
30-1.
NOTE: The Wiring Diagram editor can also be accessed from
the ladder display during program simulation by pressing
[Alt][S].
Table 30-1
Wiring 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 ladder
Return 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 using
the commands listed in Table 30-1. To change a word or bit value, press [Ins]. This displays a
menu with the options Connect , Disconnect , Force On , and Force Off. These options
correspond to the four states you can set for each I/O bit. As you cursor through the Wiring
Diagram, the Control Program label for that bit will be displayed if you are in Bit editing mode. If
you 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 the
control program. An output bit which is connected will have its value transferred from the control
program to the process program. A connected bit is displayed with an "=" in the Wiring Diagram.
CHAPTER 30 SoftWIRES SIMULATION
Pub. No. TDZ-MN1 28 July 2000 30-5
A bit which is Disconnected will not have its value transferred from the control program to the
test program and vice versa. A disconnected bit is displayed with a "." in the Wiring Diagram
and 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 Disconnect
or [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 an
output bit which is Forced ON will be set to 1 in the process program output image table. A
forced 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. An
output bit which is Forced OFF will be set to 0 in the process program output image table. A
forced off bit is displayed with "9" in the Wiring Diagram.
SoftWIRES forces act like PLC forces. Control program output bits which are forced will display
the true unforced value in the Data Table Editor. Control program input bits which are forced
display the forced value in the Data Table Editor. The forced ON or OFF condition is displayed
below the instructions in the ladder display. You can also force from the ladder display by
pressing [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-scan
to check the programs (refer to Chapter 29), and, if no errors are found takes you into single-step
execution mode, performing based on the Flow Sequence which is normally at the first rung of
the 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 Environment
Editor.
CHAPTER 30 SoftWIRES SIMULATION
SoftPLC Corporation 28 July 2000 30-6
Table 30-2
SoftWIRES 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 emulation
Breakpoints, etc., also applies to your SoftWIRES
simulation. By combining and using all these tools you
can perform easy yet sophisticated program tests.
Pub. No. TDZ-MN1 28 July 2000 31-1
CHAPTER 31
WRITING A PROCESS MODEL
This chapter gives guidelines on writing a process model. A process model can be as simple or
complex as you want. You can model the entire process controlled by the control program or
only critical portions.
The main thing to remember when writing a model is that in the process program you examine
output addresses and energize (or control) input addresses, which is essentially backwards from
writing control program logic. You are writing a program that explains to the PLC what the
process (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 process
program, which is simply an XIC followed by a SQO, feed various input conditions to your control
program.
For example, if a box is moving down a conveyor, the input conditions are related to time (ie: the
speed of the conveyor). So we could have a program that looks like Figure 31-1 to model our
conveyor process.
The Sequencer table values would contain the conditions of the inputs as product moves down
the conveyor, including normal cases, start-up, and error conditions such as jam-ups or conveyor
motor failure. The control program can then be tested to ensure it properly handles each
combination 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 * *
* . ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) - *
CHAPTER 31 WRITING A PROCESS MODEL
SoftPLC Corporation 28 July 2000 31-2
Figure 31-1
Process Model Using a Sequencer
By making the logic which drives the SQO more complex, you can easily do more sophisticated
testing without having to write a complete rung by rung process program. In this example, the
process model simply drives inputs. BREAKPOINT instructions can be inserted in the control
program 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 an
auxiliary contact.
This circuit normally would not require rungs in the process model other than to examine the
motor (XIC) and turn on the auxiliary contact (OTE). For demonstration purposes, let's get fancy
and assume we want to model the time delay from when the motor is energized to when the
auxiliary contact is locked on. Figure 31-3 depicts an example of this model. Rung 1 starts a
timer when the motor is turned on. Rung 2 turns on the auxiliary contact when the timer times
out.
The start and stop pushbuttons are manually controlled devices. There are two ways to simulate
this. The first is with the standard Flow Sequence of Process Scan, Input Scan, Control Program
Scan, Output Scan. In this case, we want to manually control the pushbuttons, so we want to
Disconnect these inputs in the Wiring Diagram. Any Disconnected input can be manipulated
from the ladder display with the [+] and [-] keys. If an input is Connected, then it normally cannot
be manipulated this way because its value will be established by the field (ie: the process
program). The motor and the auxiliary contact will be monitored/controlled by the process
program 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 does
an input scan. In this case, we must use Forcing to control the pushbuttons. The motor and
auxiliary contact must also be connected in the Wiring Diagram in this case.
CHAPTER 31 WRITING A PROCESS MODEL
Pub. No. TDZ-MN1 28 July 2000 31-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-2
The 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-3
The 3Wire Modeling Program
CHAPTER 31 WRITING A PROCESS MODEL
SoftPLC Corporation 28 July 2000 31-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 a
tank temperature application. Suppose an open tank is to be kept at constant temperature. The
wind and outside temperature affect the tank liquid temperature. A device measures the
temperature of the tank and a steam valve is controlled to maintain the constant desired
temperature.
This process can be modeled with a simple first order lag equation:
Y
n
= Y
n
-1 * (1-a) + a * X
n
,
where X
n
is the current analog sample, Y
n
is the output, and "a" is the tuning constant that you
adjust 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-4
First Order Lag Model
Pub. No. TDZ-MN1 28 July 2000 32-1
CHAPTER 32
SOFTWIRES O.N.E./COMMUNICATION DRIVER
One powerful capability of SoftWIRES is the ability to interface SoftWIRES to other devices that
communicate using the Allen-Bradley DF1 protocol (the "language" used by the Data Highway
and Data Highway Plus). These devices may be other computers running graphics software, like
Wonderwares InTouch, Intellution FIX, A-B RS-VIEW, other SoftPLCs, or A-B PLC's.
With this feature, you cannot only use SoftWIRES to test PLC logic and do ladder logic or
process simulations, but also use it to:
. create more sophisticated models which include graphics or the capabilities of the graphics
program;
. 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 to
the 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 on
the same TCP/IP network, or Data Highway Cards (eg: 1784-KTX), connected straight through
together (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 second
computer via (2) RS-232-C cables connected to a common Female/Female Null Modem
connector WITHOUT the need for a Communications Interface Module. You can use any null
modem 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 between
two COM ports in the same computer (if your graphics
software 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 Driver
Configuration .
The Driver Configuration option loads the O@N@E Configuration program ONECNFIG. This
program is described in detail in other TOPDOC documentation. Configure your
CHAPTER 32 SOFTWIRES O.N.E/COMMUNICATION DRIVER
SoftPLC Corporation 28 July 2000 32-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 each
active 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 and
PLC-5. Most of the time, this would be set to "Normal". Other valid values are 0-63. Refer to
the Allen-Bradley documentation for more information.
RUNNING THE SIMULATION
Once you have configured the hardware and communications software, you are ready to run the
simulation. Load the SoftWIRES Environment, then select the Go option from the SoftWIRES
menu. 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 be
processed. For example, if your graphics application sends the command to Set a Bit, it will be
set and you will see this reflected in both the graphics application and the SoftWIRES data table
and ladder displays!
Pub. No. TDZ-MN1 28 July 2000 33-1
CHAPTER 33
BLOCK TRANSFER
This chapter discusses how SoftWIRES emulates the Allen-Bradley Block Transfer instructions
and 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 model
programs to communicate with one another through fictitious intelligent I/O modules.
In the PLC, block transfers are carried out asynchronously with the program scan. SoftWIRES
Block Transfers are carried out synchronously with changes in the control flow.
Consider the case with a flow sequence consisting of CONTROL PROGRAM SCAN, OUTPUT
SCAN/TRANSFER, PROCESS SIMULATION, and INPUT SCAN/TRANSFER. In this context,
BTR or BTW instructions encountered in the control program will issue read or write request
messages based on module addressed and size of the transfer.
Following the OUTPUT SCAN/TRANSFER and immediately before starting the PROCESS
SIMULATION, reply messages for the simulation program will be received and the simulation
program's data table updated, but let's come back to this later. During the simulation program
scan, BTR or BTW instructions encountered will issue read or write request messages similar to
those in the control program. Following the INPUT SCAN/TRANSFER, and before starting the
CONTROL PROGRAM SCAN, outstanding requests from the simulation program and the control
program are compared looking for matches.
The matching process consists of looking for control program READ requests that have a
corresponding simulation program WRITE request, or control program WRITE requests that
have 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 the
same length. Once two requests have been matched, the corresponding reply messages are
generated waiting for the program to receive these replies.
Following the matching process and before the control program scan, the control program's reply
messages are received, and the data table is updated accordingly. If the reply was to a READ
request, then the data is copied into the data file, and the control structure is updated. If the
reply was to a WRITE request, only the control structure is updated. This receiving messages
and 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 begins
again.
CHAPTER 33 BLOCK TRANSFER
SoftPLC Corporation 28 July 2000 33-2
BTR/BTW INSTRUCTIONS IN THE CONTROL PROGRAM
This section identifies differences in control bit operation from PLC operation and SoftWIRES
emulator 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 takes
place at once and never lasts through a program scan.
NR - In SoftWIRES, if a control program request is not answered within 10 cycles through
the 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 program
request 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 first
request from the simulation program matching the Rack, Group, and Module will be matched to
this 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 the
perspective of emulating an I/O module. Thus a BTW instruction can almost be considered an
offer to give data to the control program, and a BTR instruction is an offer to take data from the
control program. In this context, the operation of the instructions are a little different in the
simulation program.
Figure 33-1 shows some example rungs that can be used in the process model to emulate an
intelligent I/O module that sends data to the control program.
The primary difference between simulation program requests and control program requests is
that simulation program requests are not allowed to remain outstanding through multiple control
flow sequence cycles. A simulation program request always gets a reply in the scan immediately
following the one the request was issued in. In this case, a "no response" return simply means
that 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 takes
place at once and never lasts through a program scan.
NR - In SoftWIRES, if a simulation program request is not answered in the matching
before the control program scan, NR is set with the DN bit.
TO - The time-out bit is not implemented.
CHAPTER 33 BLOCK TRANSFER
Pub. No. TDZ-MN1 28 July 2000 33-3
If a requested block length of 0 is entered into a simulation program BTR/BTW instruction, this
will be a meaningless request for the transfer of 0 words of data. Remember, the simulation
program 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-1
Sample Block Transfer Modeling Rungs
CHAPTER 33 BLOCK TRANSFER
SoftPLC Corporation 28 July 2000 33-4
PART IX PART IX
OPTIMIZATION & TROUBLESHOOTING OPTIMIZATION & TROUBLESHOOTING
THIS PAGE INTENTIONALLY LEFT BLANK
Pub. No. TDZ-MN1 28 July 2000 34-1
CHAPTER 34
OPTIMIZATION
This chapter contains system optimization hints. You can use this information to optimize the
performance of TOPDOC and improve your overall PLC program development and maintenance
process.
NOTE: In addition to this manual, we have prepared Application
Notes to address specific tasks, such as PLC program or
documentation conversion programs and additional
available utility programs. Our website lists the
Application notes available.
CUSTOMIZING YOUR TOPDOC INSTALLATION
This section describes ways to customize your TOPDOC installation, configuration, and the way
TOPDOC loads and runs.
CONFIG.SYS FILE SETUP
1) You should have a "FILES=20" (or a higher number) statement in your CONFIG.SYS file
to ensure you don't get file open errors. If installed properly, the TOPDOC installation
process automatically sets this in your CONFIG.SYS file. Refer to your DOS manual for
details on the CONFIG.SYS file and the FILES command.
2) If you did not use the subdirectory defaults when installing TOPDOC, you should increase
the allocated environment space by at least 2000 to accommodate the TOPDOC and O@N@E
environment 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 not
have 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 the
TOPDOC programs and related files, user configuration files, and user PLC application files. This
flexibility 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. See
the section entitled "USING ENVIRONMENT VARIABLES" for information on the SET command.
CHAPTER 34 OPTIMIZATION
SoftPLC Corp., Inc. 28 July 2000 34-2
By selecting directories other than the TOPDOC defaults, you can, for example: separate files used
by 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 user
can have their own configuration and application files by
specifying 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 default
is "\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, providing
they are not in conflict with each other (ie: telling
TOPDOC to do the same thing 2 different ways).
There are 2 categories of loading options: (1) video and color options and (2) entry points. Each
are 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
CHAPTER 34 OPTIMIZATION
Pub. No. TDZ-MN1 28 July 2000 34-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 the
Ladder Editors.
Height and Width Options
Computers with a "smart" VGA card can adjust the Ladder Editor display from 25 x 80 through 50
x 132 using the Height and Width options.
The Height option (-h
xx
) sets the number of displayed lines, where
xx
is a value from 25 to 50. The
Width option (-w
xxx
) 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:
-h
xx
-w
xxx
Example: TDZ -h43 -w132
The maximum values are a factor of the ability of the graphics card in your computer. If a value is
selected beyond the performance ability of the card, display problems will be apparent when you
attempt to run TOPDOC. Normally, adjustments to the height do not cause a problem, but the width
adjustments might.
NOTE: To adjust the width, you may first have to use the
appropriate setup procedure for your graphics card to
achieve the desired display. This procedure will be
described in your video card manual, and will most likely
entail running a utility program that came with the card.
After you perform the procedure, you can then use the
Height and Width options to tell TOPDOC what your
graphics 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 made
the last change to each program file with the use of an operating system Environment Variable
called "TD_ID". In the program header is a field called "Originator". Each time the program is
written to disk (after an upload or offline edit), the Originator Name is updated with the current value
of TD_ID. Refer to "USING ENVIRONMENT VARIABLES" for information on how to set the TD_ID
value.
HINT: The <Originator> will be in the program header regardless
of who is using the computer. This variable is global for
all TOPDOC packages installed on the computer,
regardless of PLC model. You can write a batch file that
asks for the user's name and sets this variable accordingly
CHAPTER 34 OPTIMIZATION
SoftPLC Corp., Inc. 28 July 2000 34-4
before loading TOPDOC if many people are using the
computer and the "Originator" value is important to you.
USING ENVIRONMENT VARIABLES
NOTE: The loading option codes for TDZ MUST be in lower case
letters. You can get a list of available loading options by
entering 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 the
command line to set the loading options and environment variables. The SET command is used
as follows:
SET <env var name>=<value>
In AUTOEXEC.BAT, the SET commands should be placed before any SHELL is loaded. By placing
the environment variable settings in AUTOEXEC.BAT, TOPDOC will always use the defined
configuration automatically.
HINT: If network users boot off a local workstation drive, each
user can have a different TOPDOC configuration by
modifying their individual AUTOEXEC.BAT files.
From the command line, SET commands can be entered manually on an individual basis, or you
can use a batch file to group them together, then run the batch file before loading TOPDOC. When
you install TOPDOC, we do this by creating a "RUNTDZ.BAT" which includes the necessary SET
commands for the installation option variables. By modifying RUNTDZ.BAT, you can further
customize your TOPDOC setup, either by adding additional variable settings or changing the
existing ones.
NOTE: If you use the RUNTDZ.BAT method, be sure to inform all
TOPDOC users to load with RUNTDZ so the variables get
properly set!
HINT: On a Local Area Network, you can customize each user's
TOPDOC configuration by having a unique batch file.
OPTIMIZING TOPDOC PERFORMANCE
This section describes ways to obtain the peak performance from TOPDOC.
INCREASING SCROLLING SPEED
CHAPTER 34 OPTIMIZATION
Pub. No. TDZ-MN1 28 July 2000 34-5
1) Turn Off Documentation: You can increase Ladder Editor scrolling speed by turning the Rung
Comments ([F4]) and Address Labels ([F6]) off until you locate the desired rungs. This will
especially help online when you have a slow hard disk or network because, although the
program is in the PLC, the documentation is on the disk.
2) Helpful Commands: Remember to use the powerful commands TOPDOC provides such as the
Find Commands ([Alt][F]), the Position Command ([Alt][P]), and On-Screen Cross Reference
Display ([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 of
Ladder 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 the
amount of paper used. Refer to Chapter 30 for details on using the Printer Configuration program
to 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 output
cross 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 cross
referencing 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, thus
causing a form feed to continue the logic on the next page.
@ If Center Descriptors? is set to "Yes", TOPDOC automatically bottom justifies and centers
address labels above the instruction. TOPDOC does not always print extra blank lines on the
report. Therefore, if your labels are all under 5 lines each rung will take less lines to print.
PART X PART X
APPENDICES APPENDICES
THIS PAGE INTENTIONALLY LEFT BLANK
Pub. No. TDZ-MN1 28 July 2000 A-1
APPENDIX A
TOPDOC FILES
This Appendix lists the files included with TOPDOC, and those created as you use TOPDOC to
perform various functions.
HINT: Before installing any TOPDOC updates, you should use
this section to determine what files to save and what files
to delete. Always check the TDZREAD.ME file on the
TOPDOC 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 the
subdirectory 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 this
manual. We highly recommend that you print this file out and read it
before installing the program.
HISTORY.TXT A text file containing an enhancement and bug fix listing for each TOPDOC
revision.
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 by
AB5UTIL.EXE.
TD5TOAB.EXE *TOPDOC to A-B 6200 Documentation Conversion, called by
AB5UTIL.EXE.
APPENDIX A TOPDOC FILES
SoftPLC Corp. Inc. 28 July 2000 A-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 ICOMs 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 your
computer 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 for
communications.
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.
APPENDIX A TOPDOC FILES
Pub. No. TDZ-MN1 28 July 2000 A-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 the
SoftPLC 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 over
TCP/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 be
in 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 environment
variables, which determine the location of the TOPDOC files, are set properly
when TOPDOC is loaded.
PRINTER.CFG The Printer Configuration file. This file contains the type of device and port you
are using for printing reports and the information needed to properly
communicate with your printer.
AB5EDIT.CFG The Editor Configuration file. This file contains the information about how you
want your rung comments displayed during ladder diagram editing and how
many 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 and
station number accessed by TOPDOC, which is used to display the defaults.
SWIRE.CFG The SoftWIRES configuration file which contains the communications setup.
APPENDIX A TOPDOC FILES
SoftPLC Corp. Inc. 28 July 2000 A-4
APPENDIX A TOPDOC FILES
Pub. No. TDZ-MN1 28 July 2000 A-5
PROGRAM AND DATA FILES
The following files store your PLC programs, associated documentation, and other data files. We
recommend you store these files in the default \TDZ\SPLC directory on your hard disk, but you can
store 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 can
be used with Allen-Bradley's 6200 Software (versions 4 and later) and with
SoftPLCs Ladder Compiler/Decompiler utilities.
<FILE>.XD2 A cross reference data file for the PLC program. These files are created when
you choose the Cross Ref menu option from the Utilities menu.
<FILE>.XI2 A cross reference index file. These files are created when you choose the
Cross Ref menu option from the Utilities menu.
<FILE>.DBF A Database file of address labels in dBASEIV format. These files are created
when you enter address labels with the Dbase menu option or by using the
Label 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 the
Rung Comment Editor.
<FILE>.GCT A file created when rung comment re-synchronization fails. Refer to Chapter
39 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 output
device in the printer configuration file.
<FILE>.DFT A file containing the difference report generated when using the Diff option on
the 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 it
to disk.
APPENDIX A TOPDOC FILES
SoftPLC Corp. Inc. 28 July 2000 A-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 was
interrupted by power outage or other major failures.
Pub. No. TDZ-MN1 28 July 2000 B-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 for
the process. The loop is placed in Software Manual mode, giving TOPDOC the ability to set the
Controller Output (CO). A step change is applied to CO, and then the Process Variable (PV) is
monitored 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 time
model. Most industrial processes fit into this category, but not all. An example of a process that
may not fit this model is a level loop. Some level control loops are not self regulating, meaning that
a step change in the controller output will result in a tank filling up rather than seeking a new steady
state 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 response
curve to a step change in controller output, with the process variable reaching a new steady state
value on its own. This is in contrast to a process which never reaches a final constant steady state
value, but rather wants to run away, or continue to increase, as some level loops do while the tank
continues to fill indefinitely.
ACCESSING THE PID AUTO-TUNE SCREEN
COMMAND: Autotune
Integer 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 instruction
and 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 in
the Data Table Editor (you can use [Alt][Z] from the instruction). Then, press [Enter] to access the
PID Status and Configuration screen. From this screen, enter the command to access the PID Auto-
tune function.
APPENDIX B PID AUTO-TUNING
SoftPLC Corp. Inc. 28 July 2000 B-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-tuning
process:
@ Enter the percentage step change that will be applied to the Controller Output (CO). TOPDOC
will apply a positive step change to CO if your loop is direct acting, or a negative step change
if 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 range
0-100%. That is:
CO + step < 100% for direct acting loops
CO - step > 0% for reverse acting loops
@ Select the tuning parameters with which you want to tune your loop. You can select a
combination of Proportional, Integral, and Derivative.
@ Enter Software Manual mode when you are ready. In SW Manual mode, the PID instruction
does 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 that
existed 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 feel
for the response time of the process you are controlling in order to make a full determination that
steady-state has been reached. You can use the PV field below the PID faceplate to monitor
changes 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 begin
monitoring the PV until you determine that steady-state has once again been reached. The rules
outlined 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 the
suggested tuning parameters. At this point, you will have a chance to apply the suggested
parameters 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 be
prompted whether you want to put the loop in AUTO mode, allowing the PID instruction to control
the Controller Output.
If you choose not to save the parameters, you will be prompted whether to place the loop in AUTO
mode using the original parameters, if it was previously in AUTO mode. If the loop was not
previously 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.
APPENDIX B PID AUTO-TUNING
Pub. No. TDZ-MN1 28 July 2000 B-3

S-ar putea să vă placă și