Вы находитесь на странице: 1из 129

SOFTWARE

PLC
REF. 9701 (in)
INDEX
1. Version 4.0. Modifications of the version 3.0 ................................. 1
2. Version 3.0 .......................................................................................... 7
2.1 Introduction ......................................................................................... 9
2.2. General description ............................................................................ 15
2.3. Options ............................................................................................... 17
2.3.1. Main menu ......................................................................................... 17
2.3.2. Utilities and configuration ................................................................. 19
2.3.3. Program editing ................................................................................. 24
2.3.4. Syntax control .................................................................................... 26
2.3.5. Reports ............................................................................................... 28
2.3.6. Command lines .................................................................................. 33
2.3.7. Display ............................................................................................... 43
2.3.8. Global - display and command line .................................................. 50
2.4. Conversion of mnemonic code to contact diagram.......................... 53
2.5. Examples of listing of the application .............................................. 59
2.6. Instruction editor ................................................................................ 67
2.6.1. Introduction ....................................................................................... 67
2.6.2. Selecting a program........................................................................... 68
2.6.3. Inside the editor ................................................................................. 69
2.6.4. How the commands operate .............................................................. 71
2.6.5. Advanced operation: editing commands .......................................... 80
2.7. Contacts editor ................................................................................... 83
2.7.1. Introduction ....................................................................................... 83
2.7.2. General description of the editor menus and commands ................. 87
2.7.3. Description of the editor functions ................................................... 93
2.7.3.1. Initial menu ........................................................................................ 93
2.7.3.2. Level 2 menu ..................................................................................... 98
2.7.3.3. Level 3 menu ................................................................................... 102
2.7.3.4. Level 4 menu ................................................................................... 107
2.7.3.5. Special function keys....................................................................... 124
2.7.4. SW funcion ...................................................................................... 127
pg-1
Version 4.0
Modifications of the version 3.0
pg-2
pg-3
The modifications in the new version (4.0) of the PLC64 program with respect
to the previous version (3.0) are described below.
.
* Installation and requirements
This new version is only for installation in hard disks. Therefore the option of
installation on floppy disks, present in the previous version, is not permitted.
Computer memory 640 Kb.
* Configuration
The configuration or parameter selection process incorporates the following
fields:
- Number of lines printed per page.
- Type of printer. Graphics or Non graphics.
* Directory Control Window
The structure and way of selecting files are retained. However only the following
appear in this window:
- Directories.
- Programs with .LST extension =Equation programs in PLC format.
- Programs with .PLC extension =Equation programs in user format.
- Programs with .LDS extension =Contact programs.
- Programs with . PL extension =Copies of equation programs
edited with the equation editor
- Programs with . LD extension = Copies of contact programs edited
with the contact editor
- Programs with .SBL extension =Symbol table.
pg-4
* Editing processes
Option 2 on the Main Menu (Program Editor), gives the following menu:
1.- Equation editor.
2.- Contact editor.
3.- Translator. LDS > LST.
4.- External editor.
1. Equation editor
Calls the EDIPLC equation editor.
2. Contact editor
Calls the EDILD contact editor.
3. Translator. LDS > LST
This process translates an equation program in plc format (.LST extension) into
a contact program, generating a file with the same name and the .LDS extension.
This new contact file can be used by the contact editor. The aim of this new utility
is to allow users who normally edit these programs in equations, to obtain a
version of these programs in contacts.
4. External editor
Calls the external editor which is defined in the configuration option.
pg-5
* Reports Option
The main new feature which this option has, is that depending on whether the
file selected for reports is an equation program (.PLC, .LST) or a contact program
(.LDS), it will generate source program listings and cross references in equations
or in contacts.
.
The list selection screen is as follows:
Source program......... N Contact Source - Page............ N
X-Ref. Inputs (I)........ N Contact Source - Comment ... N
X-Ref. Outputs (O) ... N PRN active (0-LPT1/1-LPT2) O
X-Ref. Marks (M) ..... N Graphics Printer ..................... S
X-Ref. Counters (C) . N Lines per page ........................ 72
X-Ref. Timers (T) ..... N Output device (P/I) ................ I
X-Ref. Records (R) ... N Listings between pages .......... 000:999
X-Ref. Rrd Bits ......... N Header: __________________________
As far as listings which can be generated are concerned the Contact Diagram
listing has been deleted, as the Source Program option will present the listing
according to the selected file format (equations or contacts).
As regards the printing parameters it should be pointed out that the file selected
is contacts (.LDS), two new options will be presented which refer to the contact
source listing, and these are:
- Source in contacts with paging ............. : N
- Source in contacts with commentaries .. : N
With the first of these you can indicate in the source listing in contacts if you want
to jump a page. With the second you can select the inclusion or not in the listing
of range commentaries.
pg-6
* X-Ref. of a contact program
The structure and sense content of the X-Ref of an equation program are
maintained. That is to say that they indicate in which ranges each of the
variables appear.
The range numbers in which each variable appears are classified into the
following groups:
Variable used as an enquiry expression, in normally open contacts.
/ Variable used as an enquiry expression, in normally closed contacts.
That means subject to the negation operation.
( ) Variable used as an action, in normally open contacts.
(/) Variable used as an action, in normally closed contacts. That means
subject to the negation operation.
pg-7
Version 3.0
pg-8
pg-9
2.1 INTRODUCTION
.
Before going on to describe the different options of the application we shall
indicate the elements which are necessary for its correct operation.
Configuration:
The minimum configuration needed to be able to run the program correctly is:
- An IBM PC/XT/AT microcomputer or a 100% compatible or IBM PS/2.
- Minimum RAM memory 512 Kb.
- Monochrome of graphics monitor, according to MDA, CGA, EGA or
VGA standards.
- Two disk units or one disk unit plus hard disk (the latter is more
recommendable).
- RS232C series output (one or two).
- Parallel outlet/Centronics for IBM-compatible printer.
- Operating system 3.x (3.0 or higher).
The Fagorplc program consists of three floppy disks in 5 1/4" format and with
a capacity of 360 Kb or three floppy disks of 3 1/2" and 720 Kb, labelled,
respectively, as disks no. 1 and 2.
As a safety precaution, you may, by means of the COPY command of the
Operating System, make a copy of both. Should the files be erased by accident
you may use the same command to restore the original contents of the disks.
pg-10
Installation:
Once the computer has been put into operation, when the Operating System
prompt appears, insert disk no. 1 in drive A and after the A> prompt type:
INSTALL<enter>
The installation program will run and ask you if you are using a hard disk or
floppy disks, the working language, working disk, ....
After answering these questions, the program will be ready for running.
Normally, this procedure will be carried out only once, unless you should wish
to change the language or installation disk.
Operation:
The Fagorplc program is designed to operate from a main menu, from where
the main options are selected. In some cases, these options can have others which
depend on them. These are called submenus. To choose a specific option, use
the cursor movement keys to place the cursor over the desired option which will
be shown in reverse video. Once the cursor is positioned over the desired option,
press <enter> to select. If you are in an option or submenu, the <Esc> key can
be used to return to the previous options or abandon same.
In addition, we have in each option or suboption, some specific data to fill in.
These pieces of data are called fields, e.g., the name of a program. When it is
necessary to fill in one of these you must press <enter> when finished.
You will use the alphanumeric keyboard of your computer throughout the
program. In addition, there is a series of function keys which we describe below:
Function keys:
These are placed either on the left or on the upper part of your keyboard. They
are numbered from F1 to F10, or from F1 to F12, normally. The following are
used in the program:
pg-11
<F1> Help. When this key is pressed, a reverse-video window will be
superimposed on the screen with the help text referring to the point
of the application in question. The size of this text is variable,
according to the option where it is situated. You may use the cursor
up, down, <PageUp>, <PageDown>, <Home>, <End> keys to
move through the text vertically, from the beginning to the end of
the help. When <Esc> is pressed, the help window disappears.
<F5> Line change. If you are using a microcomputer with two RS232C
series outputs, by means of this key you can indicate to the program
which of them the PLC is connected through, i.e., 1 or 2. Should
two PLCs be connected to the microcomputer, you would also tell
the program which one you wish to make the connection with.
Should you establish a line which does not exist or has no physical
connection with the PLC. When an attempt is made to connect to
it on the on-line options, a connection error would be displayed
on the screen of your computer.
Throughout the program you will see a message on the upper right-
hand part of your monitor a message indicating which line has been
chosen for communication: COM1 (series output one) or COM2
(series output two).
<F2> Load. In the Commands or Global options in the commands
window, F2 allows a program to be sent from the computer to the
RAM memory of the PLC.
<F3> Unload. For the above-mentioned options, F3 carries out the
opposite operation, i.e., it receives the program in RAM from the
PLC to the computer.
<F4> Display. In the global option of display and command line, it
actuates the display window, allowing access to the menu by means
of which the types of elements to be displayced are chosen.
"Special"keys:
.
<Esc>is the key which allows us to return from a submenu back to the main
menu, as we have described before. It also allows us to exit certain
options without running them.
pg-12
<Alt>+<t> makes the display window smaller by one row.
<Alt>+<g> makes the display window bigger by one row.
<tab> in the global option, changes the cursor from the display window
to the command line and vice versa.
Note: The + sign indicates that both keys must be pressed simultaneously to
obtain the specified action.
Structure of the application
Below, we offer a brief description of how the application is organised within
your computer. Distinction is made between users with two disk units or users
of hard disks.
-floppy disks-
The program disk must be in drive A.Drive B will be used as the working drive
for the application.
-hard disk-
A directory named plc64 which contains the Fagorplc application programs is
created in the disk selected in the installation program. The working programs
will be resident in any area you wish to choose.
-hard disk and floppy disks-
The working programs will bear two extensions: .plc and .lst.
The first is obligatory for those source files edited with the editor in question and
may be indicated in the parameter options which contain the source program.
The second corresponds to program files in PLC format generated from source
programs by the syntax verification option. Both can be transmitted to the PLC
and the reports themselves can be generated from the program.
pg-13
Connections:
.
According to the series output type of your computer, these will be the
following:
PLC AT Computer
9-pin male 9-pin male
connector connector
1 Shield
TxD 2 2 RxD
RxD 3 3 TxD
CTS 5 8 CTS
DSR 6 6 DSR
DTR 9 4 DTR
GND 7 5 GND
PLC XT or PS/2 Computer
9-pin male 25-pin male
connector connector
1 Shield
TxD 2 3 RxD
RxD 3 2 TxD
CTS 5 5 CTS
DSR 6 6 DSR
DTR 9 20 DTR
GND 7 7 GND
pg-14
pg-15
2.2 GENERAL DESCRIPTION
.
Among other features, the Fagorplc program allows you to communicate with
the Fagorplc, send and receive programs, display the running of these, generate
listings of contact diagrams on the source files written for the PLC, verify the
syntax of same, and obtain cross references of actuation elements.
pg-16
pg-17
2.3 OPTIONS
2.3.1 MAIN MENU
Let us suppose that you have installed the program according to the installation
program described in the introduction. Should you have any doubt, check this
point.
The way to call the program is by typing from the Operating System, once you
are situated in the right drive and directory:
Fagorplc<enter>- hard disk and floppy disks
The program loading procedure is initiated and the main menu of the application
appears (figure). From here, we can go to any point of same, and likewise, is
the last screen which we will see if we wish to leave the application.
What we have to learn first is the way to go to the different options and the keys
we must use to do this.
F1 -- Help F5 -- Line change Active Line -- COM1
Menu Options
1.- Utilities and Configuration
2.- Edit PLC program
3.- Syntax Control
4.- Reports
5.- Command Line with PLC
6.- Display
7.- Global (Monit + Commands)
8.- End of Program
Select an option
pg-18
As a general rule, those keys which do not have a specific meaning in the
application will remain inactive, i.e.,they will have no effect.series line
As in all menus the cursor up and down keys allow us to move vertically through
the menu. The specific position in which we find ourselves at a given moment
is indicated by the cursor, which appears as a horizontal bar in reverse video.
Movement through the menu is circular, i.e., when we reach the last item the
cursor will continue its movement at the top of the menu.
The function keys which are available at that moment are shown on the top line
of the screen. In this case <F1> and <F5>. By pressing these we shall obtain a
general help menu for this menu or a change of series output which we wish to
use for communicating with the PLC.
To exit from help, press <Esc>. The result of pressing <F5> appears in the upper-
right part of the screen, indicating the series line established.
To select a specific option, place the cursor on it and press <enter>. You can place
the cursor with the arrow keys or by typing the option number which appears
on the menu directly.
On the lower part of the screen, there is a message indicating what action you
must take.
In this menu <Esc> remains inactive. Therefore, to finish the program, you must
choose the End of Program option.
Let's go on to the first option: Utilities and Configuration.
pg-19
2.3.2 UTILITIES AND CONFIGURATION
This is the first option on the main menu. We are presented with a submenu, with
three sub-options. The last of these is to return to the previous menu, i.e., the main
menu. You can also return to the previous menu by pressing the <Esc> key.
Utilities:
The first option of this menu calls a series of DOS programs. To choose this, place
the cursor on the option and press <enter>.
By pressing <Esc> we return to the main menu.
- floppy disks -
Only these commands are available:
- Copy files.
- Directory.
- Execution of commands.
- Spooler control.
F1 -- Help F5 -- Line change Active Line -- COM1
Utilities and Configuration
1.- Utilities
2.- Configuration
3.- Previous Menu - <ESC>
Select an Option
pg-20
- hard disk -
Accessibility of all commands.
To select a command, place the cursor on this option and press <enter>.
Commands which belong to the Operating System itself have to be indicated
with the correct parameters, i.e., in the same order and exactly as specified in the
reference manual of the Operating System.
Apart from these, there are two special options which are as follows: Execution
of commands and spooler control, which we describe below:
Execution of Commands:
Allows any other DOS program you may have in your computer to be called
from the program.
F1 -- Help F5 -- Line change Active Line -- COM1
DOS Utilities
1.- File copy
2.- Backup
3.- Restore
4.- Directory
5.- Diskette formatting
6.- Execution of Commands
7.- Control Printing Spooler
8.- Pervious Menu <ESC>
Operating System Utilities
pg-21
In this option, if we type:
command<enter>
.
will make a temporary exit to DOS. In order to return to the program, you must
type:
exit<enter>
You must bear in mind that in order to run a program from DOS with this option,
the RAM memory required by the program you call must be be lower than that
left by the Operating System, the resident programs you may have installed and
the Fagorplc program. The way to calculate this is as follows:
- Memory occupied by the Operating System: 50Kb approx.
- Memory occupied by the Fagorplc program: 400Kb approx.
Therefore, if your computer has 512Kb of RAM memory you cannot call
programs which occupy more than 112Kb.
If the computer has 640Kb it will have 190Kb of RAM memory available. You
must bear in mind that the memory occupied by the Operating System depends
on the version you are using. On the other hand, the resident programs you might
have installed also take up part of the memory. A simple method to know the
amount of memory free for working is to use the DOS chkdsk command which
gives you this information. You may call it using this option and check that the
memory which is still free is sufficient to load the program you wish to run.
Lastly, remember that it is necessary to indicate the complete path in order to call
the program, unless this is indicated in the autoexec.bat start-up file. Should you
not do this, a wrong command message will be displayed.
pg-22
F1 -- Help F5 -- Line change Active Line -- COM1
Printing Spooler Control
1.- Display listings of the printing spooler
2.- Eliminate a listing from the printing spooler
3.- Eliminate all listing from the printing spooler
4.-Previous Menu <ESC>
Operating System Utilities
Spooler Control:
When making printouts, the PRINT command of the Operating System can be
used to establish a spool. This allows us to continue executing other options,
without waiting for the printer to finish the printout. This command can be
included in the auto start-up file, autoexec.bat, or be called just before calling
the Fagorplc program (consult the DOS reference manual for more information).
The Fagorplc program detects automatically if the spool is installed, in which
case, allows us to make the following operations, as sub-options:
- Display the files in the spooler:
This enables us to see which files are waiting to be printed.
- Eliminate one file from the spooler:
We can erase a file which is waiting to be printed. It will be sufficient to
indicate its name. The remaining files stay in the spooler.
- Eliminate the spooler:
We cancel all the files which are in the spooler waiting to be printed.
If the spooler is not installed, this option does not appear in the utilities
menu.
pg-23
Configuration: Second option on the menu. The default hardware elements of
the system and editor are established. To choose this option place the cursor over
it and press <enter>. By pressing <Esc> we return to the main menu.
.
We can move through the different lines on the screen by means of the cursor
up and down keys, or by means of the home and end keys. By pressing <Esc>
the option is exited without making any modification. If we press <enter> on
any line of the screen, the data which is being displayed is recorded and is
assumed, by default, in the application.
Active Series line:
By means of this we determine which will be the default communication line
with the PLC. We can choose between the first series port: COM1 or the second:
COM2, by typing 1 or 2.
Printer Active:
This establishes the parallel output with the printer for the report option. By
typing 0 the first output is chosen, 1 the second.
Active Unit:
This establishes the disk unit or disk activated to display directories.
Name of Editor:
This establishes the way to call the editor which is used to create the PLC
programs in the Edit PLC Program option. You must include the complete path
to call the editor, unless an auto start-up file, autoexec.bat, has already been
established.
For example, if we are using the Norton editor which is stored in the editor
directory of disk C, type:
c:\editor\ne
If, on the other hand, we use the edlin editor which is included in the Operating
System and this is stored in a DOS directory in disk C, type:
c:\dos\edlin
You may use either capital or small letters.
pg-24
F1 -- Help Active Line -- COM1
Name: test1.PLC_____ Name Size Date Hour
<PARENT> <DIR> 13-07-89 14:10
command.com 26075 18-03-87 12:00
english.msg 55897 16-06-89 08:42
fagorplc.bat 25 05-04-89 23:24
install.exe 26829 04-01-80 12:36
patch.exe 13395 02-12-88 12:06
plc64.exe 226779 24-05-89 10:07
plc64.par 39 13-07-89 14:10
test1.plc 77 13-07-89 14:20
test2.lst 4566 13-07-89 14:21
Select program to be edited, <ESC> to exit
2.3.3 PROGRAM EDITING
This is the second option on the main menu. In this option we will use the editor
which we have indicated in the configuration option for editing source
programs, which must bear the .plc extension or those which we may have
generated from the syntax verification option with the .lst extension.
If the source file is new, it will sufficient to type its name and extension in the
name window. The editor is called and is stored in the directory in which it has
been placed and which appears on the upper part of the directory window.
If the file is edited (.plc) or generated (.lst), you may use the directory window
to find it, as is described below:
To exit the option, type <Esc>.
C:\PLC64
pg-25
On the right, the directory window appears which displays the different files,
directories, ... of the unit indicated in the configuration option.
You can move through this window with the cursor up,down,<PageUp>,
<PageDown>, <Home>, <End>. Some names indicated between the < and >
symbols appear in the window with the <DIR> extension. These are the
subdirectories of the directory in which it is situated. By placing the cursor in
these and pressing <enter> we enter the directory of the chosen subdirectory.
To go from subdirectories back to the main directory we select the <PARENT>
<DIR>. The prompt for the unit and subdirectory in which we are moving is
shown at all times at the top of the window.
.
In the same way, we can select the name of the file to edit directly, just by typing
it - including its path, if we are in a different directory from the one we see in
the display window - directly in the name window. The <-DEL key may be used
to erase incorrect characters. Only names with the .plc or .lst extension will be
admitted.
For example: test1.plc or test1234.lst, etc.
Once the name of the file to be edited has been chosen, control is transferred to
the selected editor. When editing has been completed, by pressing a key, we
return to the edit option to be able to edit a new file.
On the top of your screen, the function key <F1> - help is indicated and which
is active at this point.
Of course, you can edit the .plc programs outside the Fagorplc application and
omit this point whenever you wish.
If you modify the .lst files directly you may generate syntax errors or incorrect
elements which do not have later representation in contacts, due to which,
normally, it is possible to modify the .plc source and then allow the .lst file to
be generated again by the syntax control.
When we have a program with the .lst extension (PLC format) which we wish
to modify, we can follow different procedures, one is to copy it immediately by
means of the copy command (in utilities, this is the file copy option), and to
another name with the ,lst extension, we modify it with the editor and check the
syntax, thereby maintaining the old file and the new .lst file.
pg-26
2.3.4 SYNTAX CONTROL
By means of this third option, a syntactical verification of the source file .plc will
be made.
The information on errors will appear on the screen or printer. As a result of the
verification, a PLC format file with the .lst extension is generated, with the same
name. This file is numbered, maintains the comments and is necessary for the
contact diagram report.
Once the option has been selected on the main menu, a similar screen to the last
option will appear, and the name field which appears on the upper left-hand part
of the screen must be filled in.
If <Esc> is pressed, we return to the previous menu.
To do this, we have two alternatives: select the file to be verified by means of
the directory window or type its name directly with the .plc extension and,
should this be necessary, with the complete path to find it. In both cases, once
the file name has been chosen or typed, the verification process commences by
pressing <enter>.
You will see a message on the lower part of the screen which asks if you wish
to see the result of the verification on the screen or printer.
If we press <S>, the screen will be selected.
If we press <P>, the printer which is indicated in parameters as system printer
will be selected.
pg-27
.
When working with the screen, should the verification report contain more
errors than the number of lines on the screen (25), we can move through the
screen by using the cursor movement keys.
In both cases, the verification report will indicate the number of the .plc program
in which the error has occurred and a message indicating its origin.
For a detailed description of programming syntax, refer to the PLC-Fagor
programming manual.
Once the verification has been completed, by pressing <Esc> we return to the
screen for this option, it being possible to choose another file to repeat the
process, or press <Esc> again to return to the main menu.
F1 -- Help Active Line -- COM1
Syntax errors
TEST1.plc ( 1) - Error : Incorrect Enquiry Operation.
TEST1.plc ( 5) - Error : Expression without action.
Detail of errors, Press <ESC> to exit
pg-28
2.3.5 REPORTS
By means of this option listings of the source program, contact diagrams and
cross references are obtained.
The first screen which we see in this option is identical to those of previous
options. We will use it to choose, either by directory window, or typing the name
directly, in the name window, the .plc or .lst file on which we wish to make the
reports and pressing <enter>. Should you type the name in directly, do not
forget to indicate the complete path where the file is found, should it be in a
different drive or directory from the default drive indicated in the configuration.
It is important to remember that to obtain the contact diagram, the file elected
must be in .lst format, i.e., generated by means of the syntax verification option.
If you wish to exit this option and return to the main menu, just press <Esc>.
Once the name of the file has been chosen, another window appears with the
name of different reports which we can make and the printer parameters.
F1 -- Help Active Line -- COM1
Selection of Reports
LISTINGS PARAMETERS
Source program.................. Y PRN active (0-LPT1/1-LPT2) .. 0
Contact diagram................. N Graphics Printer ........................ Y
X-Ref. Inputs <I> .............. Y Lines per page........................... 66
X-Ref. Outputs <O>.......... Y Output device (S/P) ................... P
X-Ref. Marks <M>............ N Listings between pages ............. 000:999
X-Ref. Counters <C> ........ Y
X-Ref. Timers <T>............ N
X-Ref. Records <R>.......... Y
X-Ref. Rrd Bits.................. N Header: __FOR L111 SPECIFICATION__
Selection of Listings and printer Options, <ESC> to exit
pg-29
The <enter> key indicates the running of reports, and therefore should not be
pressed until the reports it is wished to make have been established and their
parameters.
.
The cursor appears positioned on the first report: source program. A specific
report is chosen by pressing the <Y> key (capitals or small letters). The cursor
will be positioned directly on the following report. If you do not wish to make
it, press <N> (capitals or small letters). It is possible to move forwards or
backwards by means of the cursor up or down keys.
Having made the selection the cursor will be positioned on the first parameter.
In order to move on to the next parameter, without modifying it, just press the
cursor down key.
LPT1/LPT2: here, the default value established in the configuration is indicated.
If you wish to change the output, type 1 or 0 accordingly.
Graphics printer: in order to be able to represent the contact diagram, if your
printer does not have graphics characters, press N, otherwise the program will
assume that it is a graphics printer.
Lines per page: the default value is 66 lines, if you wish to modify this, type the
desired number of lines.
Output device: to indicate whether we want the report by screen, press <S>, or
by printer <P>.
Listing between pages: we indicate the number of the first and last page we wish
to include in the listing.
This last parameter, if it is the first time that we make the report, will be left with
the default values. On the other hand, if we have displayed it first on the screen
or made some modification which affects a part of the program, we can use it
to list the pages which have been changed or in which we wish to centre our
attention.
Lastly, there is a header field which allows us to put a heading on all the pages
of the listings.
The parameters which have been established are common to all the selected
listings, i.e., we cannot select a report by screen and another by printer, change
lines, etc., at the same time.
Once this data has been filled in, by pressing <enter> the generation of the
reports requested is begun. All the reports, except for the source file, generate
intermediate printer files with the .lis extension.
pg-30
If the printer is the output device: As the reports are generated, their name and
complete information will appear on a new screen. The order in which they are
generated is the one which appears on thereport selection screen.
Note: At any moment during the generation of reports, we can press <Esc>,
thereby cancelling the report which is being generated at that time, and
the process will continue with the next report. N.B. The time taken to
generate the different listings is proportional to their size and the speed
of the printer. So that work with the computer is interrupted the minimum
time possible, the installation of the spooler is recommended and which
was referred to in the chapter on utilities and configuration. Basically, this
spooler is a program which allows a number of files to be left resident in
the memory for printing, and permits the user to reinitiate the application
without having to wait for all the listings to be finished on the printer.
The DOS 3.x Operating System has the PRINT command which installs this
type of program. At the same time, and as we have said before, the Fagorplc
application detects the existence of this command and facilitates, by means of
the utilities and configuration option, the handling of different files on the
spooler.
If this utility is being used, remember that, once the reports to be issued have been
generated, it is possible to go to the spooler manager at any moment and eliminate
one or more reports directly.
Should the printer be accidentally unplugged, an output device error message
will appear. Once this is corrected, the printer will proceed normally.
If the output device is the screen: Once selected, all the reports selected for issuing
will appear on the screen. It is possible to freeze the screen by pressing
<Ctrl>+<S> or <Pause> and restart the screen dump by pressing any key.
By pressing <Esc> the display of the report will be interrupted, and the next one
can be displayed just by pressing a key.
In both cases, once the selected reports have been displayed/printed, by pressing
any key, we can return to the file choice screen. If you wish to generate a new
series of reports, repeat the procedure which we have described here, otherwise,
press <Esc> to return to the main menu.
pg-31
- floppy disks -
.
The generation of intermediary files to issue reports means that the disk must
have sufficient space to do this. Should this not be the case, this error message
will appear when creating a file: Error: cannot write. To avoid this type of
problem, the space used by the different files must be borne in mind. Below, we
give an approximate idea of the maximum sizes referred to, always to the size
of the source file:
Source listing source size.
Contact diagram 4 * source size.
Cross references 1/4* source size.
Description of generated reports: In this paragraph we are going to indicate some
of the more relevant characteristics of the different reports which can be obtained.
- Source program: This is a listing of the file in the .plc or .lst format,
according to which of these has been chosen.
- Contact diagram: This requires a process of symbolic representation of the
different elements and operations which we can carry out during the
programming of the PLC.
Appendix A of this manual includes detailed guides for converting from
mnemonic programs and to the contact diagram.
Note: In the following paragraphs, the line number always refers to the file on
which the report has been requested, whether .plc or .lst.
- Cross references of inputs, outputs, marks: The input, output, mark appear
on the left-hand column, and afterwards, the different lines of the program
where it is used.
- Cross references of counters: The counter number appears in the left-hand
column, then comes the signal which is being used: pre- selection, status/
value, count up, count down or enable with the line number and value.
- Cross references of timers: The timer number appears in the left-hand
column, and then the element: start up, status/count, enable, reset and the
line number and value which it is being used in.
pg-32
- Cross references of records: The number of the record used appears in the
left-hand column, then the lines of the program in which it is used.
- Cross references of record bits: On the left-hand column of the record
number, followed by the bit number and the line where it is used.
Appendix B of this manual, indicates different types of listings.
pg-33
2.3.6 COMMAND LINES
With this option, it is possible to carry out all the operations with the PLC
working from a terminal. A detailed description of these is indicated in the PLC
manual under the heading: Way to operate the PLC from a terminal.
Before choosing it, you must check that that your computer is physically
connected to the PLC, by means of the series line and that the PLC is working.
F1 -- Help F2 -- Load F3 -- Unload Active Line -- COM1
#LM1.5
110 = M1
111 = M5
133 = M2
143 = M2
149 = M5
#STAT
3862 R 02F3 QA2B 6862 0000000000000000
#C11
* Denied.
#R1
B0000100010010001 02193 02193
#R7
B0000000000000000 00000 00000
#11112
#C2
S=0 C=05560 U=0 D=0 E=1 P=1
#T5
S=1 ET=24915 TO=40185 M=T G=0 E=1 R=1
#
To choose this option from the main menu, place the cursor on it and press
<enter>.
The first thing which appears on the screen for a few seconds is a line initialization
message and connection to the PLC. If the connection is not made, it will return
to the main menu. This is normally caused by two reasons:
pg-34
a.- The computer is not connected to the PLC or the PLC is not on or the cable
is not the correct one.
The error message will indicate that it cannot be connected as the PLC does
not respond to the communication.
b.- Using the F5 function key, you have chosen the second communications
port and the computer does not have this. The message will indicate that
the program cannot open the port. Should there indeed be a second
communications port, there may be a hardware error in the port or the
configuration may be incorrect.
Once the connection has been satisfactorily made, a message line will appear on
the top of the screen, with the function keys which are active and on the top left-
hand side, the connection prompt: #.
By pressing <Esc> we exit this option and return to the main menu.
The operations which can be carried out are as follows:
- Send/receive a program from the computer to the memory of the PLC.
- Edit the program.
- List the program on the screen.
- Erase lines from the program.
- Run or stop the program.
- Know or alter the value of different variables.
- Lock/Unlock the memory.
- Save/Restore the program in/from the EEPROM memory.
- Require information on the status of the PLC.
Send/Receive programs:
By means of <F2> (Load) we can send a program in .PLC or .LST format from
the computer to the PLC memory.
The subdirectory window appears, from which we can choose the program to
be sent. We can also type the program directly into the name field with its
complete path. Once the program has been sent, the # prompt is displayed once
more to execute a new command.
pg-35
By pressing <F3> (Unload) we receive the program from the PLC in the floppy
disk/computer disk. The directory window will appear once more in case we
should wish to save the program under the name of an already-existing file. If
we want to save it under a new name, just type it directly into the name field,
with its extension. If the file is to be saved in a different unit to the one we have
defined in the configuration, the complete path must be indicated. Once
received, the # prompt will appear once more.
In both operations, the program which is being received/transmitted during the
operation will be displayed on the screen.
If, when receiving a program, we give it the name of an already- existing file,
you must remember that the program received will replace the previous one in
the computer.
A program cannot be sent if there is another one being run in the PLC or when
its memory is locked. In these cases, an error message will be displayed. Stop
the program or unlock the memory if you wish to make transmission.
Edition:
It is only possible to line edit when the PLC is not running the program and its
memory is unlocked. Otherwise, the error message Denied will appear in the
edition window. The general edit format is:
No. line Text <enter>
The line number must be between 1 and 9999, or 0, to refer to the last line of
the program.
If the line number is 0 or higher than the last line of the existing program, the
line number which will appear in the edit window will be the one following the
last one in the program.
If the line number already exists in the program, we will be making a line
insertion operation.
.
To exit the edit window, just insert an empty line with <enter>, according to the
following format:
pg-36
#No. line <enter> - we enter the edit window -
Text ( ) <enter>
.................. - we insert
.................. lines without
.................. comments -
<enter> - end of line edition -
# - we return to the PLC command prompt.
Bear in mind that every time you insert a line during editing the PLC introduces
a new line number to continue editing.
Program listing:
By means of this command it is possible to display program lines and make
searches. This command remains active both when running the program or not.
The general format for using the command is:
L Range-line Pattern Range-pattern <enter>
Capitals or small letters can be used.
* Range-line:You must specify the first and last numbers of the lines you wish
to list.
* Pattern:This specifies the type of variable which must appear in the listed lines.
If it is preceded by =, only those lines which have the pattern behind
the = sign will be listed.
The patterns are: I, O, M, T, C, R.
* Range-pattern: This specifies the minimum and maximum number of the
specifying pattern.
The ranges are specified by means of: a first number, a separator (blank or decimal
point) and an end number. If the first number is not specified or is specified with
0, number 1 is assumed. If the end number is not specified or is specified with
0, the maximum possible value is assumed.
pg-37
Examples:
# L<enter> - lists all the lines -
# L10.0<enter> - lists from 10 to the end -
# l.12 <enter> - lists from the beginning to line 12.
# l1.0m10.12<enter>- lists all the instructions where marks 10 to 12
inclusive are used.
# L = m10.12<enter> - lists all the action instructions where marks 10
to 12 inclusive are used.
Program erasure:
Only permitted when the PLC is not running a program and its memory is
unlocked.
The general format is as follows:
D Range-line <enter>
In capitals or small letters. If the range is not specified, the whole program will
be erased.
Examples:
# d <enter> - erases the whole program -
# D3<enter> - erase line 3 -
# d12<enter> - erases from line 12 inclusive -
#D1.3<enter> -erases from line 1 to 3 inclusive.
If we wish to modify a line of the program, we must first erase it using this
command and then insert with the same line number as the one we have erased.
Example:
.
In line number 12 of a program we have the following action:
= 07
pg-38
In order to modify its contents and put 08, the steps to take are as follows:
#d12<enter> - erases line 12 -
#12 = 08<enter> - inserts line 12 with its new contents -
Compilation:
If we have edited the program we must compile it to detect the possible syntax
errors committed. This is not necessary if we have sent the program already
verified to the PLC. The format of the command is as follows:
# COMPILE<enter> - capitals or small letters.
Execution:
Commences cyclical running of the program. The format is as follows:
#RUN<enter> - capitals or small letters -
If we have programmed a CY1 first cycle module we can run the main program
(PRG cyclically without running this by means of the command:
#CONTINUE<enter> - capitals or small letters -
We can, on the other hand, run an initial cycle by means of the command:
#CY1<enter> - capitals or small letters -
or a main program cycle by means of:
#CYCLE<enter> - capitals or small letters -
To stop the running of a program, we will type the command:
#STOP<enter> - capitals or small letters -
This command is only effective if the PLC memory is unlocked.
pg-39
Display and modification of variables:
During the running of a program we can know the status of the different
variables: inputs, outputs, marks, timers, counters and record bits. As a general
rule, we must bear in mind that we can consult the inputs, outputs and marks
per ranges by means of the general format:
#I/O/M I/R Range<enter> - capitals or small letters -
Where the I/R sequence indicates whether we wish image (I) values or real (R)
values. If this is not indicated, real values are assumed.
Examples:
#I2<enter> - real state, by omission, of input 2.
#M15.19<enter> -image status of marks 5 to 19 inclusive -
#0<enter> -real status of all the outputs -
In order to know the status and value of the timers, counters and records, these
must be consulted individually, according to the following formats:
Timers:
.
call: #T(1/255)<enter>
response : S=0/1 ET=() TO=() M=S/T/D G=0/1 E=0/1 R=0/1
where S: timer status
ET : elapsed timing time
TO : timing time still to go
M = S: cancelled
M = T: timing
M = D: unenabled
G : start-up input status (TG)
E : enable input status (TEN)
R : reset input status (TRS)
Counters:
call: #C(1/255)<enter>
response : S=0/1 C=() U=0/1 D=0/1 P=0/1
where S: counter status
C: count value
U: count up input status (CUP)
pg-40
D: count down input status (CDW)
E = enable input status (CEN)
P = preselection input status (CPR)
Records:
We can obtain the value of the different bits of a record.
call: #B(0/15) R(1/255)<enter>
response: 0/1 status of the requested bit.
In order to obtain the value of a record.
call : #R(1/255)<enter>
response :hexadecimal value of the 16 bits of the record, as well as the decimal
value equivalent with or without sign.
As long as the memory is not locked, we can modify the status of the different
variables during the running of a program. Unless stated otherwise, the real value
of the inputs, outputs and marks will be modified. In order to modify image
values we must indicate the I symbol after the letter which defines the variable
to be modified.
Examples:
#M14=1<enter> - assigns the logic status 1 to mark 14 -
#R150=1471<enter> - assigns value 1471 to record 150 -
#TG2 20 R10 = 1<enter>- assigns logic status 1 to timer 20 trigger input, with
a time constant equivalent to the value contained in
record 10 -
#MI14 = 1<enter> - assigns logic status 1 to mark 14 image value -
Whenever we work with inputs, outputs, and marks we can work in ranges.
Example:
#M1.20=1<enter> - assigns logic status 1 to marks 10 to 20 inclusive.
pg-41
We can also work with binary and hexadecimal values, only by indicating these
by means of the B or H symbols, respectively, before entering in the value.
Example:
#R150=B0100010001000101 <enter> - assigns the specified value in
binary to record 150.
#R150 = HA1F2<enter> - assigns the specified hexadecimal value
to record 150.
.
Lock/Unlock:
We can lock the memory of the PLC if it is unlocked. Likewise, we can unlock
the memory only if it has been previous locked. The format is as follows:
#LOCK/UNLOCK(code)<enter>
LOCK can be used to lock and UNLOCK to unlock. The code must be a group
of up to 8 characters (without spaces). Of course, if we use a code for locking,
unlocking must be done with the same code.
When a program has been locked, only listings and variable enquiries are
allowed.
You must bear in mind that when the memory is unlocked, the PLC remembers
the lock code.
Save/Restore programs in EEPROM:
The format is as follows:
#SAVE/RESTORE<enter>
The SAVE command allows the program which resides in the PLC RAM
memory and the configuration parameters to be stored in the EEPROM memory.
On the other hand, RESTORE transfers the program and parameters of the
EEPROM memory to the PLC RAM memory, eliminating the information
which might exist in it at that time.
pg-42
For more information on the combinations of the status of memories and the
requirements concerning this operation, consult the chapter on SAVE/
RESTORE in the PLC manual.
Information on the status of the PLC:
By means of the STATUS command, we can
call: #STATUS<enter>
response: XXXX X XXX XXXX XXXX XXXX XXXX
a) b) c) d) e) f) g)
where:
a: XXXX, four hexadecimal characters, which indicate the CHECKSUM
of the EEPROM system, which allows the version of the software in the
PLC to be identified.
b: X, a character which represents the status of the program of the user in
PLC RAM. The possible characters are as follows:
E, edited, the user program has been edited but not compiled.
C, compiled, the program is compiled and ready for running.
R, running, the program is running.
c: XXX, three decimal characters, indicate an error, 000 indicate that there
is no error.
d: XXXX, four hexadecimal characters, indicate the number of bytes in the
source program.
e: XXXX, four hexadecimal characters, indicate the number of bytes in the
runnable program.
f: XXXX, four hexadecimal characters, indicate the number of RAM
memory bytes free. This value is valid only after compiling the program.
g: XXXX, hexadecimal characters for the exclusive use of the Technical
Service.
Finally, we indicate that it is possible to write any command in capitals or small
letter. Likewise, we can write the command in abbreviated notation using its first
four letters, for example: stat, etc.
pg-43
2.3.7 DISPLAY
As its name indicates, in this option we can display the different variables of our
program, either individually per type of variable or simultaneously.
We choose this option from the main menu, by placing the cursor over the option
and pressing <enter>.
For each type of variable there is a window which is detected by means of the
submenu option. If we wish to display different types, we choose the so-called
global window.
The control on the range to be displayed is made by means of two techniques:
varying the size of the window or moving the ranges, always adjacent, within
a defined window size.
We must bear in mind that as there is always a display sampling time indication,
it is logical that by increasing the range or the window to be displayed, this time
increases, and so we must handle the windows accordingly.
The <F1> help key is active at all levels of the option. Once pressed, it stops
the display until <Esc> is pressed and we return to the corresponding window.
F1 -- Help Active Line -- COM1
Menu
1.- Counters
2.- Inputs
3.- Global
4.- Marks
5.- Records
6.- Outputs
7.- Times
8.- Exit
pg-44
The observations made in the previous section concerning the initialization and
connection between the computer and the PLC are identical in this option.
The first thing we observe, once the connection has been made, is a new menu
in the centre of the screen.
By means of this menu, we choose the type of variable to be displayed or if we
wish to display different types we will choose the global window. By pressing
<Esc> in a given window, we return to this menu. By pressing <Esc> again,
we will exit the option and return to the main menu.
The keys for controlling the ranges and sizes of the different windows are
common, therefore, we now go on to a general description of these, and then
we shall describe their individual characteristics.
- window size control -
<Alt>+<t>: reduces the window size by one line
<Alt>+<g>: increases the window size by one line
- range displayed in window -
We must bear in mind that each element has a permitted range of values, as we
saw in the previous chapter. When displaying these ranges, we consider them
as being circular, i.e., on reaching the end, they continue at the opposite end.
<cursor up> moves the display range backwards as many elements as there
are in one row.
<cursor down> moves the display range forwards as many elements as there
are in one row.
<PageUp> moves the display range backwards as many elements as there
are in a window (elements in one row * the number of existing
rows in the window).
<PageDown> moves the display range forwards as many elements as there
are in a window.
pg-45
<Home> places the beginning of the range at the lower end of its
possible values, and shows as many elements as are permitted in the
size of window.
<End> places the end of the range at the upper end of its possible
values, and shows as many elements as are permitted in the size of
window.
We now go on to describe the different individual windows. There are three
windows configured as double input tables: inputs, outputs and marks. This
means that the locating of a specific variable is given by the value which is
indicated in its row plus the number of its column.
If there is a value of 2 in a row and it is in column 3, the variable will be number
23.
Input window: 10 inputs are represented in each row, the number of rows in
the window can vary from 1 to 8. In the square corresponding to each input the
0/1 logic status is shown.
.
F1 -- Help Active Line -- COM1
INPUTS TABLE
Sample time = 220 milliseconds
0 1 2 3 4 5 6 7 8 9
I 07_ 0 1 1 1 1 1 1 1 1 1
I 08_ 1 1 1 1 1 1 1 1 1 1
I 09_ 1 1 1 1 1 1 1 1 1 1
I10_ 0 0 0 0 0 0 0 0 0 0
I 11_ 1 1 1 1 1 1 1 1 1 1
pg-46
Output window: 10 outputs are represented in each row, the number of rows
in the window can be varied from 1 to 8. In the square corresponding to each
output, the 1/0 logic status of each is shown.
Marks window: 10 marks are represented in each row, the number of rows in
the window can be varied from 1 to 8.
In the square correspondig to each mark, the 1/0 logic status of each is shown.
The record, timer and counter windows represent only one variable per row and
therefore its number will be indicated in the row.
Record window: The size of the window can vary from 1 to 8 rows. In each
row, we will have information on the status of the record bits, and in the last two
columns their respective hexadecimal and decimal values.
Timer window: The size of the window can be varied from 1 to 8 rows. In each
row we will have information on the status of the inputs as well as the time elapsed
and due.
F1 -- Help Active Line -- COM1
REGISTERS TABLE
Sample time = 495 milliseconds
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 HEX. DEC.
R 251 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 2020H 08224
R 252 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 2020H 08224
R 253 1 1 1 1 1 1 1 1 0 0 1 0 0 0 0 0 FF20H -00224
R 254 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0000H 00000
R 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0000H 00000
pg-47
Counter window: The size of the window can be varied from 1 to 8 rows. In
each row we will have information on the status of the inputs as well as the
decimal value of the count.
There is a global display window which presents the following characteristics.
It consists of two ranges of windows placed in the follwing order: inputs,
outputs, counters in the first ranges, and marks, records and timers in the second.
The size of the global window can be varied by means of the combinations
<alt>+<t> and <Alt>+<g> in identical fashion to what we have seen for
individual windows, but their variation affects all the windows which make it
up simultaneously.
By means of these keys we can choose a global window consisting of windows
from 1 to 5 rows each.
Keys for varying the range within each of the windows are the same as those we
have seen for individual windows, i.e., <cursor up>,<cursor down>,
<Home>, <End>, >PageUp> and <PageDown>.
F1-- Help Active Line -- COM1
Sample time = 1650 milliseconds
INPUTS OUTPUTS COUNTERS
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 E U D P S C
I08_ 1 1 1 1 1 1 1 1 1 1 000_ 1 1 0 0 1 1 1 0 1 C001 1 1 0 1 0 -01778
I09_ 1 1 1 1 1 1 1 1 1 1 001_ 0 1 0 1 0 1 1 1 0 1 C002 1 0 0 1 0 -01778
I10_ 0 0 0 0 0 0 0 0 0 0 002_ 0 1 0 0 0 1 0 1 0 0 C003 1 0 0 1 0 -01778
I11_ 0 1 1 1 1 1 1 1 1 1 003_ 0 1 0 0 0 1 0 1 0 0 C004 1 1 0 1 0 -01777
MARKS REGISTERS TIMERS
0 1 2 3 4 5 6 7 8 9 0 1 E R G S M TO
M000_ 0 0 0 0 0 0 0 1 0 R001 02193 00000 T001 1 1 0 1 T 21653
M001_ 0 0 0 0 1 0 0 0 1 0 R003 00000 00000 T002 1 1 0 1 T 21645
M002_ 0 0 0 1 0 0 0 0 1 0 R005 00000 00000 T003 1 1 0 1 T 21637
M003_ 0 0 0 0 1 0 0 0 0 0 R007 00000 00000 T004 1 1 0 1 T 21629
pg-48
To move within one window or another, we use the keys.
<cursor right>: moves to the next window on the right.
<cursor left> : moves to the next window on the left.
The indicator of the variable of the first row of the window in which we are
situated is in reverse video.
When we have gone through the first range of windows, we then move through
the second range.
If we have reached the last window of the second range, by pressing <cursor
right> we will be placed in the first window of the first range. With the cursor
in the first window of the first range, by pressing <cursor left> we will be placed
in the last window of the second range. The ranges of the variables have the same
format as individual windows, except for the record window. In this window,
the records are organised in two columns, the first of these being the one which
appears under column 0, i.e., if we are displaying the record indicated in the row
as R003, we will have the decimal value of record 3 in the first column of that
row and in the second, the decimal value of record 4. In the following row, we
will have the R005 index, therefore the first column will indicate the decimal
value of record 5 and the second column of that row will indicate the decimal
value of record 6, and so on.
The information which appears in the windows which make up the global
window are as follows:
- input window: logic status of inputs.
- output window :logic status of outputs.
- counter window: logic status of inputs and decimal value of the count.
- mark window: logic status of marks.
- record window: decimal value of records.
- timer window: logic status of the inputs and decimal value of time due for
timing.
Note: As you will note, following the sampling values, as we increase the range
of the display windows, this increases between values of under about 50
msec for windows of variables which are consulted by ranges: inputs,
outputs, marks up to values of nearly 1.9 sec. in displays by means of
global window. The operation of the computer requires that great attention
be paid to displays in detriment of the commands which we give to the
pg-49
program via the keyboard, therefore we must bear in mind that for long
display times the response to the key we press will be delayed a time
equivalent to the sampling. By bearing this in mind, we avoid having to
keep pressing the key for a long time, as its effects will take as much time
to take effect as that of sampling due to the number of characters it might
have sent while being pressed. This will avoid unwanted movement
within the windows.
Lastly, we recommend that resident programs such as Sidekick should not be
used in the display options as the results may be unpredictable.
.
If during the display process a communications break should occur, the program
detects this sending a communications error message and exiting to the menu.
One of the most frequent causes which can cause this error is a physical
disconnection between the series outlet and the PLC input. Check that the
connectors are correctly fitted and call the program again.
pg-50
2.3.8 GLOBAL - DISPLAY AND COMMAND LINE
The last option for communications with the PLC allows simultaneous
operation of the two previous options of sending commands and establishing
windows for displaying variables.
To choose this option, position the cursor and press the <enter> key. By
pressing <Esc> we return to the main menu.
The first thing we must pay attention to is the initialization and connection
process with the PLC described in section 5. Once the connection has been made
satisfactorily we enter the command line and the # prompt is displayed,
indicating that we can send commands following the processes described in the
above-mentioned section.
On the top line of the screen we have the active function keys for this option.
We will see that there is a function key <F4> which calls the display function.
By pressing this, the menu for choosing the display window will appear.
F1 -- Help F2 -- Load F3 -- Unload F4 -- Monit. RS -- COM1 COMANDO
Sample time = 1265 milliseconds
1
#T3
S=1 ET=56452 TO=08648 M=T G=1 E=1 R=1
#C2
S=0 C=01159 U=1 D=0 E=1 P=1
#M1.4
1 1 0 0
#
INPUTS OUTPUTS COUNTERS
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 E U D P S C
I08_ 1 1 1 1 1 1 1 1 1 1 000_ 1 0 0 0 0 0 1 0 0 C001 1 1 1 1 0 -00841
I09_ 1 1 1 1 1 1 1 1 1 1 001_ 0 1 0 0 0 1 0 1 0 0 C002 1 1 1 1 0 -00841
I10_ 0 0 0 0 0 0 0 0 0 0 002_ 0 1 0 0 0 1 0 1 0 0 C003 1 0 1 1 0 -00841
MARKS REGISTERS TIMERS
0 1 2 3 4 5 6 7 8 9 0 1 E R G S M TO
M000_ 1 1 0 0 1 1 1 0 1 R001 02193 00258 T001 1 1 1 1 T 00837
M001_ 0 1 0 1 0 1 1 1 0 1 R003 00000 00000 T002 1 1 1 1 T 00829
M002_ 0 1 0 0 0 1 0 1 0 0 R005 00000 00000 T003 1 1 1 1 T 00821
pg-51
By choosing the desired window, the monitor is divided into two areas. In the
upper part, we have the display window and in the lower, the # prompt for
sending commands. The command line area varies according to
the size of the command window.
The operating principles in both areas are those which have been described in
the previous paragraphs. The only question we must consider is that on the top
right-hand side of the screen we have an indicator in reverse video which
indicates in which area we find ourselves: Display or Command. To go from one
area to another we press the tab key.
Being situated in the command area, if we press <Esc> we go directly to the main
menu.
Being situated in the display area, by pressing <Esc>, we leave the display menu,
where we can choose another window or by pressing <Esc> once again, return
to a single command area.
We have to bear in mind that if we are working with the two options simultaneously
and wish to write a command, the time it takes for this to appear written in the #
command prompt depends on the sampling time of the display area. In fact, a scan
is made of the display window between two command line keys.
F1 -- Help F2 -- Load F3 -- Unload F4 -- Monit. RS -- COM1 COMANDO
Name: test1.PLC__________ Name Size Date Hour
<PARENT> <DIR> 13-07-89 14:10
command.com 26075 18-03-87 12:00
english.msg 55897 16-06-89 08:42
error.msg 114 13-07-89 14:22
fagorplc.bat 25 05-04-89 23:24
install.exe 26829 04-01-80 12:36
patch.exe 13395 02-12-88 12:06
plc64.exe 226779 24-05-89 10:07
plc64.par 39 13-07-89 14:10
test1.lst 58 13-07-89 14:22
test1.plc 77 13-07-89 14:20
test2.lst 4566 13-07-89 14;21
Sample time
#T3
S=1 ET=56452 TO=08648 M=T G=1 E=1
#C2
S=0 C=-01159 U=1 D=0 E=1 P=1
#M1.4
1 1 0 0
#
#
C:\PLC64
0 1 2 3 4 5 6 7 8 9
I08_ 1 1 1 1 1 1 1 1 1 1 000_
I09_ 1 1 1 1 1 1 1 1 1 1 001_
I10_ 0 0 0 0 0 0 0 0 0 0 002_
MARKS
0 1 2 3 4 5 6 7 8 9
M000_ 0 1 0 0 1 1 0 1 1 R001
M001_ 0 0 0 1 1 0 1 0 1 1 R003
M002_ 0 0 0 1 0 0 0 0 1 0 R005
pg-52
pg-53
2.4 CONVERSION OF MNEMONIC
CODE TO CONTACT DIAGRAM
.
DIRECTIVES:
.NOP
.PRG General Form
.AL(1/8) DIRECTIVE
.PE(1/4)(1/65535) Examples:
.OWD PRG
.RER AL2
.CY1 PE 1 1000
.END REA
.REA L45
.IMA
.L(1/255)
ENQUIRY EXPRESSIONS
SINGLE:
I(1/255) General form:
O(1/255) Expression /Expression
M(1/2047) Examples:
15 M100 B11R200
T(1/255)
pg-54
C(1/255) B12 R79
B(0/15)R(1/239)
FLANK DETECTION:
M2009
I(1/255)
DFU /DFU
O(1/255)
DFD M(1/2047) O56
DFD
COMPARISON:
GT
T GE T CPU A EQU B
U C EQ C
NE
CP R R /CPS A EQU B
S LE
# LT #
BINARY ACTIONS
ASSIGNMENT:
I General form:
O
M (Action)
BR (/Action)
TEN
TRS
pg-55
TG(1/7) Examples:
CEN B11 R4 TEN 20
CUP ( / ) ( )
CDW
CPR (TG1 4) (/TG1 12)
.
CONDITIONED:
I 10 B7 R100
SET O (SET) (/RES)
RES M
CPL BR M210 I51
(CPL) (/CPL)
ABORT ACTIONS
JMP L(1/255) (JMP) (/CAL)
CAL L(1/255)
RET
ARITHMETIC ACTIONS
I T1 108 R20
O I 16 (A MOV B)
M O 0 0 12
MOV T M 1 1 8 M100 004 I5
C R 4 (A /MOV B)
R
#
U R17 R34
NG S R(1/239) (NGS) (/NGD)
D
AD 100 R10 R8
SB U R R R (A MDD B=C)
ML S (1/255) (1/239)
DV D 40 4 R3
MD (A /DVU B=C)
pg-56
LOGIC ACTIONS
ROTATION TO THE RIGHT OR LEFT
R 1
R L 2 (/RR2) (RL1)
AND, OR, XOR ACTIONS:
AND R1 R3 R10 HFF 50 R6
OR R R R (A AND B=C) (A /XOR B=C)
XOR # #
SPECIAL ACTIONS:
I 1/255 1/255 I1 255
O 1/255 1/255 (ERA)
M 1/2047 1/2047
ERA T 1/255 1/255 C1 30
C 1/255 1/255 (/ERA)
R 1/239 1/239
65535
WDG(1/65535) (/WDG)
25
E(1/255) ( E )
MSG(1/255) ( MSG)
12 R15
SYS (0/15) R(1/239) ( /SYS)
Note on the intermediate signal SWITCH:
SW is generated automatically to link instructions which cause overflows in
graphics representation, and it is also generated to resolve complex instructions.
pg-57
The graphics representation range, 24 rows and 80 columns, allows up to 6
ANDs and 8 ORs to be represented. When the representation exceeds these
dimensions we say that an overflow has been produced which generates a switch.
Cases of switch generation:
1.- Overflow of ANDs (>6)
2.- Overflow of ORs (>8) in enquiry instruction.
3.- Overflow in the actions of an expression (>8)
4.- XOR function (generates xswitch)
5.- Negation of complex structures.
The maximum number of switches generated per expression is 10.
.
In the case of negations, the maximum is 4 per negation.
pg-58
pg-59
2.5 EXAMPLES OF LISTINGS OF THE
APPLICATION
In the following sheets, a summary of the listings which may be obtained with
the report option is offered. The listings presented here are limited to the first
page, and are as follows:
.
- Listing of an .LST extension source file.
- Listing of a contact diagram.
- Listing of cross references for inputs (the format is identical for outputs,
marks and records.
- Listings of cross references for counters.
- Listings of cross references for timers.
- Listings of cross references for record bits.
As you will see, the information in them varies according to these groups.
Those stages which correspond to the syntax errors in the source file will not be
indicated in the contact diagram listing. The different types of switch will be
generated automatically according to the discussion established in the reports
chapter.
In the input, output, etc. listings, the variable used appears in the left-hand
column and the lines of the program where it is used in the central columns.
The number of the counter or timer appears in the left-hand column of the listings
of counters and timers, their elements in the central column and in the right-hand
column, the lines of the programme in which it is used together with the assigned
value, if any. If any element is not used, this is indicated with: ***Not used***.
Lastly, the record used appears on the left of the record bits, in the middle, bit
(0-15) and on the right, the line of the programme in which it is used, if not, it
is indicated by: ***Not used***.
pg-60
27/7/1.989 APPENDIX B LISTING
.
1 CY1
2 M2047 (1)
3 = NOT TRS 1
4 = TRS 1
5 = NOT TRS 2
6 = TRS 2
7 = NOT TRS 3
8 = TRS 3
9 = NOT TRS 3
10 = TRS 3
11 = M2047 (1)
12 = NOT TRS 4
13 = TRS 4
14 = NOT TRS 5
15 = TRS 5
16 = M2047 (1)
17 = NOT CPR 1 - 1
18 = CPR 1 - 1
19 = RES M105
20 = RES M200
21 = RES M201
22 = M2047 (1)
23 = RES M202
24 = MOV B000000000000000000 01 0016
25 = MOV B000000000000000000 017 0016
26 = MOV B000000000000000000 M100 0016
27 = MOV B000000000000000000 N116 0016
28 = CAL L1
29 = M2047 (1)
30 = MOV R51 R12 0016
31 = MOV R51 R50 0016
32 = MOV 0 R10 0016
33 = MOV 0 R30 0016
34 = NOT M105 (0)
35 = SET 017
36 = NOT M105 (0)
37 OR NOT 120 (1)
38 = RES 024
39 = I12 (0)
40 = NOT 025
41 END
42 PRG
43 REA
44 M2047 (1)
45 = MOV R12 R50 008
46 = MOV R10 R30 108
47 I19 (0)
48 = JMP L11
49 CPU R50 EQ R51 (1)
50 = JMP L11
51 = M116 (0)
52 = JMP L12
53 = M2047 (1)
54 = RES 011
55 = SET 012
56 = SBS R50 R51 R60
57 = NOT TG1 3 500
pg-61
27/7/1.989 APPENDIX B LISTING
CY1
M2047 TRS 1
(/)
TRS 1
( )
TRS 2
(/)
TRS 2
( )
TRS 3
(/)
TRS 3
( )
TRS 3
(/)
SW0
( )
SW0 TRS 3
( )
M2047 TRS 4
(/)
TRS 4
( )
TRS 5
(/)
TRS 5
( )
pg-62
27/7/1.989 INPUT XREF. -I- APPENDIX B LISTING
.
VARIABLE LOCATION - PROGRAM LINES -
I001 0164 0337 357 0364
I002 0326 0338 0370
I003 0080 0085 0103 0118
0136 0330 0339
I004 0074 0077 0113 0340
I005 0342
I008 0348
I009 0175 0178
I010 0176 0187
I011 0182 0191
I012 0040 0172 0181 0190
0323
I013 0292
I014 0108 0115
I015 0225
I016 0247
I017 0303
I018 0289
I019 0048 0106 0142 0157
0180 0189 0223 0245
0279 0324 0356 0359
0363
I020 0038 0217 0224 0239
0238 0246 0261 0265
0263 0308 0316
I021 0144 0159 0220 0283
0333
pg-63
27/7/1.989 COUNTER XREF. -C- APPENDIX B LISTING
COUNTER ELEMENT LINES (Description)
001 CPR (Preselection) 0413--> Preselection value = -1
0414 --> Preselection value = -1
0464 --> Preselection value = R60
0465 --> Preselection value = R60
0757 --> Preselection value = -1
C (Status/Value) 0755,
CUP (Count up) *** Not Used ***
CDW (Count down) 0753,
CEN (Enable) *** Not Used***
pg-64
27/7/1.989 TIMER XREF. -T- APPENDIX B LISTING
.
TIMER ELEMENT LINES (Descripcin)
001 TG (Start) 1040 --> TG2 /Time const. = 130
T (Status/Count) 1042,
TEN (Enable) *** Not Used ***
TRS (Reset) 0775, 0776,
002 TG (Start) 1067 --> TG1 / Time const.= 2000
T (Status/Count) 1069, 1072,
TEN (Enable) *** Not Used ***
TRS (Reset) 0777, 0778,
003 TG (Start) 0829 --> TG1 / Time const.= 500
0812 --> TG1 / Time const.= 500
T (Status/Count) 0853, 0858,
TEN (Enable) *** Not Used***
TRS (Reset) 0779, 0780, 0781, 0782, 0872,
004 TG (Start) 1121 --> TG1 / Const. tiempos= 100
T (Status/Count) 0867, 0899,
TEN (Enable) *** Not Used ***
TRS (Reset) 0784, 0785,
005 TG (Start) *** Not Used ***
T (Status/Count) *** Not Used ***
TEN (Enable) *** Not Used ***
TRS (Reset) 0786, 0787,
pg-65
27/7/1.989 BIT XREF. -BR- APPENDIX B LISTING
Record: 060 Bit Lines (Description)
060/00 *** Not Used ***
060/01 *** Not Used ***
060/02 *** Not Used ***
060/03 *** Not Used ***
060/04 *** Not Used ***
060/05 *** Not Used ***
060/06 *** Not Used ***
060/07 0060,
060/08 *** Not Used ***
060/09 *** Not Used ***
060/10 *** Not Used ***
060/11 *** Not Used ***
060/12 *** Not Used ***
060/13 *** Not Used ***
060/14 *** Not Used ***
060/15 *** Not Used ***
pg-67
2.6 INSTRUCTION EDITOR
2.6.1 INTRODUCTION
The Fagorplc program instruction editor is a line by line editor with commands
which are operated using the function keys -F1 to F7- of your computer. The
programs can also be checked for syntax which permits a rapid identification and
correction of errors. It is an ASCII editor, that is to say that it enables you to read
and export program files from and to other programming editors which accept
this format, e.g. Norton Editor, Microsoft Quick-C, Wordstar, Edit, ...
The editor accepts source programs with the .PLC and/or .LST extension - PLC
format-. Likewise when a source program (.PLC) is edited and saved, the file
is automatically generated in PLC format (.LST) as is an image file (. PL) as a
backup copy of the first, so that you can always return to a program previous
to that in which the last modification was made. To do this you have to rename/
copy the image file .PL to one with a .PLC extension using the ren/copy of the
operating system.
pg-68
2.6.2 SELECTING A PROGRAM
Once you have selected the program editing option in instructions or mnemonic
language, the directory window will appear for selection of the program to be
edited.
The header of this window is the work area (disk and directory) where the
programs are stored by default. In the window all the files stored there appear
with their size, date and time of their last updating. The files with the .<DIR>
extension correspond to the names of the subdirectories which are in the work
directory. The <PARENT>.<DIR> directory allows you to go back from one
directory to the previous one which contains it until you reach the root or main
directory of the disc where the program is installed.
To enter a file just move the cursor to it using the following keys: <cursor up>,
<cursor down>, <Pg Up>, <PgDn>, <Home>, <End> and press <Enter>.
If you select a subdirectory, the directory window is updated with the files
contained in the directory selected.
If you want to start editing a new program, directly key in its name and .PLC
extension. If you want to store it in a different directory from the current one,
with the name key in the complete path or move to the directory using the
window and choosing the right .<DIR> directory with the cursor, using the
aforementioned keys and then press <Enter>.
If you want to store it in another disk you should specify the disk and complete
path with the name of the file. The only restriction that there is for storing
programs is that the directory where you are going to store the program has been
created previously.
Examples: pru.plc - editing in current directory
\prog\pru.plc - editing in prog. directory
a:pru.plc - editing in floppy disk in drive A
d:\prog\pru.plc - editing in prog. directory in drive D.
If the program already exists, just move the cursor to the program name,
provided that it has a .PLC or .LST extension and press <Enter> or key it in
directly as explained in the previous section.
Note: If you are not familiar with the terminology and meaning of the directory
structure in the Operating System we recommend that you work with the
default directory that is provided by the application. To understand in
more detail the organization of the hard disks consult the users manual
for the Operating System of your computer.
Remember that the directory window only works in the disk in which the
installation was carried out.
The cursor movement keys for the directory window are: <cursor up>, <cursor
down>, <PgUp>, <PgDn>, <Home>, <End>.
pg-69
2.6.3 INSIDE THE EDITOR
Note: Users with portable computers or color monitors can choose the
combination of tones or colors with which the display is clearest by means
of the combination of the following keys:
<ALT> + <C>, pressing the space bar to select the various colors offered by your
adaptor.
To retain the configuration of tones/colors press:
<ALT> + <S>.
If you wish to modify them again repeat the process until you have made the
choices you require.
You will see a line at the top of the screen where the name of the program being
edited and a mode indicator appear. By default the overstrike mode is the
operative mode. By pressing the <Insert> key repeatedly you can toggle
between the overstrike and insert modes. The difference between these modes
is explained later.
You will also see an empty window of 15 lines immediately below this line, this
is called the display window. This window is empty as the program you are
going to edit does not contain any lines yet; as you enter lines they will appear
in the window. In the lower half of the screen there is a new window in which
the cursor appears. This is the editors work window where lines are edited/
modified, commands to be run are written, etc ... this is called the editing
window.
The bottom line gives the menu of the editors command or function keys. Each
of the commands or functions corresponds to a function key and these keys must
be pressed to execute the corresponding command or function.
Note that there are two special commands:
<F1> - Interactive help function which allows you to receive information
about the command executed at any moment.
<F7> - Menu movement function, represented by a horizontal arrow : ->.
Using this function you can access the rest of the editors
commands.
The editors menu is circular and is represented by three lines on the screen, so
that using <F7> you can move from one line to the next and when you get to
the last line you will then be returned to the first line of the menu.
The editors command menu is as follows:
1st line: EDIT MODIFY SEARCH REPLACE DELETE
2nd line: MOVE COPY SAVE EDIT FILE VALIDATE
3rd line: PRINT SAVE ROUTINE LOAD ROUTINE RENUMBER EXIT
pg-70
The commands function for a line, e.g. MODIFY, or for a block of lines or
program block: MOVE, PRINT.
The commands can be interrupted with the <ESC> key.
EDIT: Allows new lines to be entered in the program.
MODIFY: Modifies the content of a line which has already been edited.
SEARCH: Locates one/several characters in a program, moving the cursor
directly to the selected line.
REPLACE: Selectively replaces one or more characters in a program.
DELETE: Deletes one or more lines in a program.
MOVE: Moves one or more lines in the program.
COPY: Duplicates one or more lines in the program.
SAVE: Records the program with the edited lines without exiting the editor.
EDIT FILE:Brings the contents of a new program from the memory, allowing
the previous one to be saved.
VALIDATE: Checks the syntax of the program being edited.
PRINT: Print out of one or more lines of the program.
SAVE ROUTINE:Allows part of the program being edited to be saved as a
separate program.
LOAD ROUTINE:Allows another previously saved program to be added to
the program being edited.
RENUMBER: Renumbers the program line numbers according to the values
determined.
EXIT: Ends the editing process saving or without saving the edited program.
If saved, the program is automatically checked for syntax.
As you can see, in some options you must determine the block of lines which
you wish to work with or indicate the characters with which you want to carry
out an operation. In these cases the commands themselves contain the
subsequent commands necessary to do this as suboptions. There follows a more
detailed description.
pg-71
2.6.4 HOW THE COMMANDS OPERATE
EDITING: This command is activated by pressing <F2> in the first line of
the menu. It is concluded by pressing <Esc> instead of entering a
new line.
When you begin the program, the lines are automatically numbered in units of
10, starting with line 10.
If you want to insert new lines at the end of an already edited program, move
the display window cursor to the last line edited and press <F2>, the new line
to be inserted will appear with the number of the last line in the program plus
10.
If you wish to insert a new line between two lines of an already edited program,
just press <F2> and enter a line number which is between the two where you
want to make the insertion. Whilst the display window cursor is at a line other
than the last line, the command does not number the line you want to insert.
The cursor motion keys in the display window are: <cursor up>, <cursor
down>, <Pg Up>, <Pg Dn>, <Home>, <End>.
Within a line being edited you can move the cursor forward or back using the
cursor positioning arrows. You can insert characters from the point where you
position the cursor if you are in insert mode; in overstrike mode the characters
will be written over the previous ones.
By pressing <enter> at the end of the line, this line goes to the display window,
the number of the next line to be edited is generated, except when you are
inserting between lines.
If you press <Esc> without having pressed <Enter> before finishing the line,
the command is deactivated and the line you were inserting is lost.
MODIFY: This command is activated by pressing <F3> in the first line of the
menu. It is terminated by pressing <Enter>, if you press <Esc> the
modification made is lost.
To modify a line move the display window cursor to the line to be modified and
press <F3>. The line selected will appear in the editing window.
pg-72
Make the changes using the normal editing keys, deleting, replacing characters,
... To send the line to the display window press <Enter> and the line is modified.
SEARCH: This command is activated by pressing <F4> in the first line of the
menu.
SUBOPTIONS: <F4> Line No. <Enter> - search for line no.
text <Enter> - search for text.
There are two possibilities, location of a specific line or location of a group of
characters. The first possibility is used as a fast way of moving the cursor to a
program line, the contents of which you may want to see and then modify. The
second possibility is for when you are looking for a mark, variable, instruction,
and you want to know where it is in the program.
To go to a line press <F4> again and then enter the number of the line you require;
press <Enter> to start the search. If it cannot be found a message appears on the
screen. The command is still active, so with <cursor right> you can move the
cursor to the end of the command and change the number of the line being
searched for. By pressing <Enter> the command is executed again. Press <Esc>
to end the command. The text search is carried out by entering the text and
pressing <Enter>.
You can use the mask * to locate occurrences of a partial text. For example:
I17<Enter> - to locate the occurrences where this specific input appears.
I1*<Enter> - to locate the occurrences where the inputs from I10 to I19
appear.
B*<Enter> - all the occurrences which have the character B.
MOV<Enter> - all the occurrences which have this instruction.
The format of the mask is: text*
To go from one occurrence to the next just press <enter>. The search through
the program is cyclical; once the last occurrence in the program being edited has
been located the search continues to find the next occurrence from the start of
the program. Whilst the search is in progress the following message appears on
screen: processing ...
pg-73
To end the search press <Esc>. The command is still active, so the text to be
located can be changed or <Esc> can be pressed again to terminate the command.
.
REPLACE: This command is activated by pressing <F5> in the first line of
the menu, entering the text to be replaced <F5> the text which
replaces it.
SUBOPTIONS: <F3> - to the end
<F5> - replace
<F7> - do not replace
If the text to be replaced is not found the command is terminated. If the text is
found you are presented with the suboptions of replacement to the end, or
selective replacement. If you choose replacement to the end, all the occurrences
are replaced and the command is terminated. If you choose replace, the text is
replaced by the new text and at the next occurrence you are presented with the
same suboptions. If you select do not replace the text remains unchanged and
at the next occurrence you are presented with the three suboptions.
This command works starting from the line at which the cursor is located in the
display window. It remains active until the last occurrence of the text to be
replaced, when the command is terminated. If you press <Esc> when this
command is active it is deactivated and the occurrence at which the cursor is
positioned is not replaced.
DELETE: This command is activated by pressing <F6> in the first line of the
menu. It is terminated by pressing <Esc>.
SUBOPTIONS: <Enter> - delete line.
<F4><F5><Enter> - delete block of lines
Deleting line by line: By pressing <F6><Enter> you delete the line at which
the cursor is located in the display window, the cursor moves to the next line.
As the command remains active if you press <Enter> again you delete this line
and so on. You can also move the cursor to a new line to be deleted and press
<Enter>. The command is terminated when you press <Esc>.
Deleting groups of lines (blocks): Press <F6> and move to the first line of the
block to be deleted, press <F4> and move to the last line in the block and press
<F5>. The block to be deleted appears in reverse video. By pressing <Enter>
the block is deleted and the command terminated. At any moment during this
suboption you can press <Esc> which will terminate the command without
deleting anything.
pg-74
MOVE: This command is activated by pressing <F2> in the second line of the
menu. The command terminates when the text has been moved. Press
<Esc> to abort the command.
SUBOPTION: first line <F4> last line <F5> destination <F6>
This command is for moving blocks of lines from one place in the program to
another.
If the block has the same first line and last line number you are only moving one
line. When the command is executed the editor automatically renumbers all the
lines.
By pressing <F2> the line moving command is activated, move the cursor to
the first line of the block to be moved, press <F4>; move the cursor to the last
line of the block to be moved and press <F5>. The block to be moved appears
in reverse video. Move the cursor to the line from which you wish to place the
block, press <F6> and the block will be moved and the command terminated.
The line where the block is moved to, is displaced by the block and appears after
it.
You should bear in mind that:
- The block is moved in line number order regardless of how the first and
last lines are set.
- A block cannot be moved to a line within the block established.
- If you want to move the block to the end of the program, you must
previously edit a line as the last line in the program and move the block to
this line, and afterwards delete the empty last line.
COPY: This command is activated by pressing <F3> in the second line of the
menu. It is terminated when the copying is completed. Press <Esc> to
abort the command.
SUBOPTION: first line<F4> last line<F5> destination<F6>
This command is for copying blocks of lines from one place in the program to
another. If the block has the same first line and last line number you are only
copying one line. When the command is executed the editor automatically
renumbers all the lines.
pg-75
By pressing <F3> the line copying command is activated, move the cursor to the
first line of the block to be copied, press <F4>; move the cursor to the last line of the
block to be copied and press <F5>. The block to be copied appears in reverse video.
Move the cursor to the line from which you wish to place the block, press <F6> and
the block will be copied and the command terminated. The line where the block is
copied to, is displaced by the block and appears after it.
.
You should bear in mind that:
- The block is copied in line number order regardless of how the first and last
lines are set.
- A block cannot be copied to a line within the block established.
- If you want to copy the block to the end of the program, you must
previously edit a line as the last line in the program and copy the block to
this line, and afterwards delete the empty last line.
SAVING: This command is activated by pressing <F4> in the second line of
the menu. It is terminated when the program has been saved. Press
<Esc> to abort the command.
SUBOPTION: <Enter>
By pressing <F4> a current copy of the program being edited is saved to the disk.
This process should be carried out periodically as a safety measure to guard
against power failures and disconnection of equipment which mean the loss of
the program being edited. No syntax check is carried out.
EDIT FILE: This command is activated by pressing <F5> in the second line
of the menu. It is terminated once the file is edited. Press <Esc>
to abort the command.
SUBOPTIONS: <Enter>
This allows a new program to be edited without quitting the editor.
Press <F5><Enter> to obtain the directory window from which you can choose
the new file. Before editing the file selected you should indicate whether or not
you wish to save the one you are editing by pressing Y or N.
pg-76
VALIDATE FILE: This command is activated by pressing <F6> in the second
line of the menu. It is terminated when the file has been
validated. Press <Esc> to abort the command.
SUBOPTION: <Enter>
This command makes a syntax check of the file being edited. In every line in
which an error is found, a message appears indicating the type of error and the
line appears in the editing window. This allows the error to be corrected. By
pressing <Enter> the checking goes on to the next line with an error, where the
process is repeated.
Bear in mind that:
- If you modify a line with an error during checking, the line modified is not
checked to see if it is correct or not. Therefore you should modify lines and
run the validate command again to ensure that the modifications have
corrected the errors.
- There are errors which may originate in lines prior to that indicated by the
checker, a typical example is an action without a corresponding expression.
- If you see that the line indicated is correct, look for errors of this type.
- Another type of error is that of defined labels for which there is nothing
corresponding, the checker runs through the whole program and gives an
error message and the number of the label it refers to.
PRINT:This command is activated by pressing <F2> in the third line of the
menu. It is terminated when printing is completed. Press <Esc> to abort
the command.
Either part or all of the file being edited can be printed.
SUBOPTION: first line<F4> last line<F5><Enter>
Press <F2> to activate the command, move the cursor to the first line of the block
to be printed, press <F4>; move the cursor to the last line of the block to be
printed and press <F5>. You have now established the block. Press <Enter> to
execute the command.
pg-77
If the printer is not connected an error message will appear.
If you want to cancel the print command press <Esc>. If you connect the printer
and press <Enter> the command is executed.
.
The number of lines per page and the active printer are determined in the general
program configuration.
SAVE ROUTINE:This command is activated by pressing <F3> in the third
line of the menu. It is terminated when the routine has been
saved. Press <Esc> to abort the command.
SUBOPTION: Routine name first line<F4> last line<F5><Enter>
This command allows you to save part or all of the program being edited under a
different name. This command linked to that of LOAD ROUTINE gives the
possibility of reusing parts common to different programs, improving the structure.
When you press <F3> you will be asked for the file name under which you want
to save the program block. Move the cursor to the first line of the block to be
saved and press <F4>; then move the cursor to the last line of the block to be
saved and press <F5>. The block is now established. Press <Enter> to execute
the command.
Bear in mind that:
- By default the program block will be recorded on the disk and in the default
directory which is assumed when the Fagorplc program is installed.
- If you want to save it in another directory and/or disk you should indicate
the complete path where you wish to store this file. For example, after
pressing <F3> you can enter as a name:
a:testl.plc - saved in floppy in drive A
c:\routines\testl.plc - in drive C, routines directory
d:\routines\test\testl.plc - in drive D, routines directory, test
subdirectory
- If a file with the same name is found in the place chosen to save it, the
following message appears: File already exists. Press <Enter> to replace
the old file with the new one. Press <Esc> to abort the command and repeat
with a new name.
pg-78
LOAD ROUTINE:This command is activated by pressing <F4> in the third
line of the menu. When the routine has been loaded the
command is terminated. Press <Esc> to abort the
command.
SUBOPTION: <Enter>
This allows you to insert one program into another. The command works in a
similar way to COPY, bearing in mind that you are copying a file previously
saved on the disk.
Press <F4> to activate the command. Move the cursor to the line where you wish
insert the file and press <F6><Enter>. The directory window will appear,
indicate the file name either using the cursor or keying it in, then press <Enter>.
The line where the cursor is located is displaced by the file inserted and appears
after it. The program being edited is automatically renumbered at the end of the
insertion process.
Bear in mind that:
- If you want to insert a file at the end of a program, you should previously
edit a line as the last line of the program and insert the file at this line.
Afterwards delete the empty last line.
RENUMBER:This command is activated by pressing <F5> in the third line
of the menu. It is terminated when the renumbering is
completed. Press <Esc> to abort the command.
SUBOPTIONS: <Enter> -renumber with first number 10 and intervals of 10
<F5>first number<F5>interval<Enter>
- renumber with first number and interval set by
user (1 to 10)
By default, the correlative numbering assumed by the editor is in intervals of 10.
This numbering is used automatically in different commands: EDIT, COPY,
MOVE, LOAD ROUTINE. This can be modified, if required, by specifying a
first number and a different interval, always between 1 and 10. Bear in mind that
after renumbering in one of the commands mentioned, the line numbers, by
default, return to intervals of 10.
pg-79
EXIT: This command is activated by pressing <F6> in the third line of the menu.
Press <Esc> to abort the command.
SUBOPTIONS: <F3> - do not save the program being edited
<F5> - save the program being edited
Note: If you end the editing session without saving - <F3> - all the work done
in the session will be lost.
.
When you end the session by pressing <F5>, saving the work done, an
automatic syntax check is carried out, with the number of errors appearing on
the screen. Obviously if you have not finished your program you may ignore
this information.
pg-80
2.6.5 ADVANCED OPERATION: EDITING COMMANDS
You already know that by pressing <Esc> you can cancel any command and
return to the menu line. This is the normal procedure if you have chosen the
wrong command and wish to abort before carrying it out. However, the
commands, except EDIT and MODIFY, and their various suboptions appear in
the editing window. This allows you to work on the commands line as if it were
a line of text, to vary the suboptions or even directly delete them whilst editing
them, using the keys: <cursor left>, <cursor right>, <backspace>.
For example: Suppose you want to find the mark 2047 first of all and then the
input 12. You could carry out the following sequence:
- Press <F4> in the first line of the menu.
- Key in M2047<Enter> which will start the search process.
- Press <Esc> which will terminate the command.
- Key in <F4> to reactivate the SEARCH command.
- Key in 12<Enter> to start the search process.
- Press <Esc> to terminate the command.
Or taking advantage of command editing:
- Press <F4> in the first line of the menu.
- Key in M2047<Enter>
- <cursor left> to move to M2047, when you want to end the search for this
function.
- Key in 12 and delete the rest of the characters
- Press <Enter> and the search process begins.
- Press <Esc> to terminate the command.
As you remain in the search operation you can directly vary the element to be
found, and by means of <Enter> execute the search. You thus save one step.
Another useful example is changing a block if you have made a mistake in
establishing it.
Just use <cursor left> and move to the first and/or last line, using <cursor up>,
<cursor down>, ... move to the new line required and press <F4> and/or <F5>
to redefine the block without having to key in the whole command again.
pg-81
Moreover, if in a suboption you press the <backspace> key you will move
backwards through the options chosen, that is to say that you can go back to the
command point from which you want to continue. If you eliminate all the
command, you return to the menu, just as if you had pressed <Esc>.
.
Take this example: You want to renumber with a certain first number and a certain
interval and you make a mistake and want to change the interval once you have
entered it.
- Press <F5>, in the third line of the menu.
- Press <F5>, and a first number.
- Press <F5> and an interval, you realize it is the wrong one.
- Press <backspace><backspace>
- Press <F5> and a new interval
- Press <Enter> and the renumbering will take place.
Obviously you could have used <cursor left> to have moved to the interval and
replaced it directly.
Commands can then be modified and repeated more quickly than by following
the whole input sequence.
pg-83
2.7 CONTACTS EDITOR
2.7.1 INTRODUCTION
* Aims of the application
The contact editor of the Fagorplc program allows you to program the FAGOR-
64 PLC by means of contacts. The editing and execution of the commands is
carried out with the function keys (F1 to F10), which facilitates and improves
the handling of the application.
This program allows you to:
- Create and modify PLC programs in contacts.
- Create and insert routines of generic use.
- Validate the syntax of the edited file.
- Execute commands which affect blocks (group of ranges defined by the user),
such as Copy, Move, Erase ...
- Document each of the ranges of the program.
- Print all or part of the file.
The editor only admits contact source programs with the .LDS extension. When a
program is edited and saved, an . LD image file is automatically generated as a backup
copy, so that you can always return to a program previous to that in which the last
modification was made. To do this you should rename/copy the . LD image file to
one with a .LDS extension using the operating systems ren/copy commands.
Note: Range > With this term you define all the instructions which form a
complete statement.
* Program selection
Once you have selected the program editing option in contact language, the
directory window will appear for selection of the program to be edited.
pg-84
The header of this window is the work area (disk and directory) where the
programs are stored by default. In the window all the files stored there appear
with their size, date and time of their last updating. The files with the .<DIR>
extension correspond to the names of the subdirectories which are in the work
directory. The <PARENT>.<DIR> directory allows you to go back from one
directory to the previous one which contains it until you reach the root or main
directory of the disk where the program is installed.
To enter a file just move the cursor to it using the following keys: <cursor up>,
<cursor down>, <Pg Up>, <Pg Dn>, <Home>, <End> and press <Enter>.
If you select a subdirectory, the directory window is updated with the files
contained in the directory selected.
If you want to start editing a new program, directly key in its name and .LDS
extension. If you want to store it in a different directory from the current one,
with the name, key in the complete path or move to the directory using the
window and choosing the right .<DIR> directory with the cursor, using the
aforementioned keys and then press <Enter>.
If you want to store it in another disk you should specify the disk and complete
path with the name of the file. The only restriction that there is for storing
programs is that the directory where you are going to store the program has been
created previously.
Examples: pru.lds - editing in current directory
\prog\pru.lds - editing in prog. directory
a:pru.lds - editing in floppy disk in drive A
d:\prog\pru.lds - editing in prog. directory in drive D.
If the program already exists, just move the cursor to the program name,
provided that it has a .LDS extension and press <Enter> o key it in directly as
explained in the previous section.
Note: If you are not familiar with the terminology and meaning of the directory
structure in the Operating System we recommend that you work with the
default directory that is provided by the application. To understand in
more detail the organization of the hard disks consult the users manual
for the Operating System of your computer.
pg-85
Remember that the directory window only works in the disk in which the
installation was carried out.
The cursor movement keys for the directory window are: <cursor up>, <cursor
down>, <Pg Up>, <Pg Dn>, <Home>, <End>.
* Description of the screen
Once the program to be edited has been selected, the initial screen appears with
the following:
.
Lines 1 - 18 --> Program display and editing window. With the cursor move-
ment keys, you can move through the program.
Line 19 > Message line. Appears in reverse video, after the display
window.
Line 20 > Used to request and enter data.
Lines 21 - 22 --> Used to present status and messages referring to the actions
which can be carried out.
Lines 23 - 25 --> Editor command or function key menu. The key which has
to be pressed to execute each of these commands or functions
is indicated.
* Range format
The range of a contact diagram consists of a series of enquiry expressions or
instructions assigned to one or more actions. The contact range appears between
two vertical lines, located in columns 0 and 80 in the display window. So the
maximum length of the range (characters in a line) is 80.
Both the number of actions and the number of ORs (parallel jump lines)
permitted are limitless.
However, the physical limitation supposed by a line length of 80 characters
(screen size) means that the maximum number of enquiry expressions or
instructions is limited to 6 per line.
pg-86
To solve this problem, the SW function was established, which in the case of
horizontal overflow, enables the user to establish intermediate stages which he
himself selects. These stages are assigned to an action (Mark or SW) which acts
as a bridge between the stage generated and the initial range.
The SW function is explained in more detail in another chapter of this manual.
Meanwhile we can say that there is a solution for contacts whose length exceeds
the horizontal size of the screen.
* General use keys
There are a series of keys whose function is the same in all levels of the
application:
<ESC> - Cancels a process or returns you to previous menu levels.
<RETURN> - Executes commands or data input.
<F1> - Interactive Help key.
<Home> - Moves the cursor to the start.
<End> - Moves the cursor to the end.
<cursor up> - Moves the cursor to the previous line.
<cursor down> - Moves the cursor to the next line.
<PgUp> - Displays the next page.
<PgDn> - Displays the previous page.
pg-87
2.7.2 GENERAL DESCRIPTION OF THE EDITOR MENUS AND COMMANDS
In this section an overall description of the different menus in the application is
given.
* Initial Menu
This is the menu which appears at the start of the application. It contains a series
of general commands.
Using the cursor movement keys <cursor up>, <cursor down>, <Pg Up>,
<Pg Dn>, <Home>, <End> you can move around and monitor the contents
of file in the display window.
INITIAL MENU
<HELP>
<LOAD> <FILE>
<ROUTINE> - <WHERE>
<SAVE> <FILE>
<ROUTINE> - <START BLOCK> - <END BLOCK>
<PRINT> - <START BLOCK> - <END BLOCK>
<EDITING> ................................................. (LEVEL 2).
<VALIDATE>
<EXIT> <WITHOUT SAVING>
<SAVING>
pg-88
* Level 2 Menu
This menu appears when the EDITING [F5] command is selected in the initial
menu. It allows you to carry out operations which affect ranges as a whole.
The cursor movement keys operate in the same way as described for the initial
menu.
LEVEL 2 (EDITING) > (Actions on ranges.-
<INSERT RANGE> ............................. (LEVEL 3)
<MODIFY RANGE> ............................. (LEVEL 3)
<ERASE RANGE> - <START BLOCK> - <END BLOCK>
<DOCUMENT RANGE>
<COPY RANGES> - <START BLO.> - <END BLO.> - <DESTIN.>
<MOVE RANGES> - <START BLO.> - <END BLO.> - <DESTIN.>
<SEARCH> <RANGE>
<TEXT>
* Level 3 Menu
This menu appears when the command INSERT RANGE [F1] or MODIFY
RANGE [F2] is selected in the level 2 menu.
It allows you to carry out true editing operations, which affect a specific range:
- MODIFY RANGE: this will affect the range where the cursor is positioned
- INSERT RANGE:this will affect a new range which is created below the
range where the cursor is located.
pg-89
The cursor movement keys <Home>, <End>, <Cursor up>, <Cursor
down>, <Cursor right>, <Cursor left> only allow you to move in the active
range.
.
LEVEL 3 (INSERTING AND MODIFYING RANGES)
<HELP>
<OR> <INSERT OR>
<ERASE OR>
<XOR>
<INSERT INSTRUCTIONS> .................... (LEVEL 4)
<MODIFY INSTRUCTIONS>
<ERASE INSTRUCTION>
<VALIDATE RANGE>
*Level 4 Menu
This menu appears when the command INSERT INSTRUCTIONS [F4] is
selected in the level 3 menu.
It enables you to insert any of the PLC programming instructions in the range,
in a contact format.
The cursor movement keys function in the same way as described in the level
3 menu. That is to say they enable you to move within the active range.
pg-90
LEVEL 4 (INSERTING INSTRUCTIONS)
<HELP>
.
<DIRECTIVES> <DIRECTIVES>
<ALARM MOD.>
<PERIODIC MOD.>
<LABEL>
<FLAG NOT>
<SINGLE EXP.> <SING. EXP.>
<FLAG NOT>
<FLANK DET. EXP.> <DFU>
<DFD>
<FLAG NOT>
<COMPARISON EXP.> <CPU>
<CPS>
<FLAG NOT>
<ASSIGNMENT ACT.> <SINGLE>
<TG>
<CPR>
<FLAG NOT>
pg-91
<CONDITIONED ACT.> <SET>
<RES>
<CPL>
<FLAG NOT>
.
<RUPTURE ACT.> <JMP>
<CAL>
<RET>
<FLAG NOT>
<MOV. ACT.> <MOV>
<FLAG NOT>
<NEGATION ACT.> <UNSIGNED>
<SIGNED>
<DOUBLE>
<FLAG NOT>
<ARITHMETIC ACT.> <AD>
<SB>
<ML>
<DV>
<MD>
<FLAG NOT>
.
pg-92
<ROTATION ACT.> <RIGHT>
<LEFT>
<FLAG NOT>
<LOGIC ACT.> <AND>
<OR>
<XOR>
<FLAG NOT>
<SPECIAL ACT.> <ERA>
<WGD>
<ERR>
<MSG>
<SYS>
<FLAG NOT>
Note: You can return from any menu level to previous levels by pressing the
[ESC] key. Except from level 3 to level 2, which is done by means of
pressing [F7] VALIDATE RANGE.
pg-93
2.7.3 DESCRIPTION OF THE EDITOR FUNCTIONS
In this section a detailed description is given of each of the functions and
commands of the contact editor.
2.7.3.1 INITIAL MENU
This menu enables you to carry out the following functions:
[F1] - HELP. Brings up an interactive help menu.
[F2] - LOAD. Edit a new program or add previously saved routines to the
current one.
[F3] - SAVE. Save the program without exiting the editor or store part of
the actual program as routines.
[F4] - PRINT. Print out all or part of the program.
[F5] - EDIT. Enter level 2 menu (Actions on ranges).
[F6] - VALIDATE. Check the syntax of the program being edited.
[F7] - EXIT. End the editing process saving or not saving the program.
* [F2] - LOAD
By pressing [F2] you enter the LOAD option which offers you the following:
[F1] - HELP. Interactive help window.
[F2] - FILE. Load a new program in the memory, allowing the previous
one to be saved.
[F5] - ROUTINE. Insert a previously saved program in the program currently
being edited.
pg-94
** [F3] - LOAD FILE
This option allows a new file to be edited without the need to exit the
application.
By pressing [F3] the directory window appears, in which the new file to
be edited can be selected.
Once this file has been selected you can indicate if you wish to save the file
you have been editing or not.
** [F5] - LOAD ROUTINE
This option allows you to insert the contents of a program in the program
you are currently editing.
This command is activated by pressing [F5]. You should then move the
cursor to the program range before which you wish to make the insertion
and press [F6] - WHERE, to mark this range as the insertion destination.
The directory window will appear immediately allowing you to select the
name of the file to be inserted.
Bear in mind that if you wish to insert a file at the end of a program, you
should previously edit a new range as the last range in the program, and
mark this as the destination.
* [F3] - SAVE
By pressing [F3] you enter the SAVE option which offers you the following:
[F1] - HELP. Interactive help window.
[F2] - FILE. Save a copy of the program currently being edited, without
exiting the application.
[F5] - ROUTINE. Save a part, defined by the user, of the program currently
being edited.
pg-95
** [F3] - SAVE FILE
This option saves a copy to disk of the program currently being edited,
without having to exit the application.
Press [F3] and [RETURN] to execute the command.
This procedure should be carried out periodically as a safety measure for
the work done with respect to power cuts or the equipment being
switched off, which would mean the loss of the program being edited. No
syntax check is carried out.
** [F5] - SAVE ROUTINE
.
This option saves part or all of the program being edited under a different
name. This command linked to the LOAD ROUTINE command offers
you the possibility of reusing parts common to different programs thus
improving the structure. Press [F5] to activate the command. Next move
the cursor to the first range of the block to be saved, and press [F4] - START
BLOCK; now move the cursor to the last range in the block to be saved,
and press [F5] - END BLOCK. Finally you are asked for the file name
under which you want to save the program block. Press [ENTER] to
execute the command. You should bear in mind that:
- By default the program block will be recorded on the disk and in the
directory that was assumed by default when the Fagorplc program was
installed.
- If you wish to store it in a another directory and/or disk you should
indicate the complete path to where you want to store the file. For
example, you could key in the following:
a:test1.lds - it will be saved in a floppy in drive A.
c:\routines\test1.lds - in drive C, routines directory.
d:\routines\test\test1.lds - in drive D, routines directory, test
subdirectory.
- If a file with the same name is found in the place selected to save the file
a message appears: File already exists. Press [ENTER] to replace the old
file with the new one. Press [ESC] to abort the command and repeat with
a new name.
pg-96
* [F4] - PRINT
This option allows you to print all, part of the program being edited, as well as
the symbols table.
Press [F4] to activate the program. You can print all the file by pressing [ENTER]
or you can mark the block to be printed or you can print the symbol table by
pressing [F2].
Move the cursor to the first range of the block to be printed, press [F4] - START
BLOCK; move the cursor to the last range in the block to be printed, press [F5]
to establish the block. Press [ENTER] to execute the command.
If the printer is not connected an error message will appear. Press [ESC] to cancel
the print command. If you connect the printer and press [ENTER] the command
is executed.
The number of lines per page and the active printer are determined in the general
program configuration.
* [F5] - EDIT
When this option [F5] is selected you enter the level 2 menu, which contains
actions which affect the ranges as a whole. These functions are described later.
* [F6] - VALIDATE
This option carries out the syntax check of the program being edited. Bear in
mind that contact editing generates syntactically correct ranges. The possible
errors are:
- Duplicated directives.
- Jumps to non existent labels.
- Ranges with an incorrect SW number.
A window appears with the error messages, giving the number of the range in
which the errors occur.
pg-97
* [F7] - EXIT
Press [F7] to enter the EXIT option which will offer you:
[F1] - HELP. An interactive help screen.
[F3] - DO NOT SAVE. Exit the application without saving.
.
[F5] - SAVE. Exit the application and save.
** [F3] - EXIT WITHOUT SAVING
Press [F3] and [ENTER] to activate the command and exit the application
without saving, which means the work done during the session is lost.
** [F5] - EXIT AND SAVE
Press [F5] and [ENTER] to activate the command and save the program
on disk.
A syntax check is automatically carried out on the program, with the
number of errors appearing on the screen. Obviously if you have not
finished your program, this information can be ignored.
The program compilation is also carried out automatically, generating two
new programs with the same name and the .PLC and .LST extensions. As
can be deduced from the extension, these files contain the contact program
translated to equations, in user format (.PLC) and PLC format (.LST).
pg-98
2.7.3.2 LEVEL 2 MENU
This menu corresponds to option [F5] - EDITING, of the initial menu. It enables
you to carry out the following functions:
[F1] - INSERT RANGE. Insert a new range after the one which is active. Pass
to level 3 menu.
[F2] - MODIFY RANGE. Modify the active range. Pass to level 3 menu.
[F3] - ERASE RANGE. Erase one or several ranges.
[F4] - DOCUM.RANGE. Document the active range.
[F5] - COPY RANGES. Copy one or several ranges to another part of the
program.
[F6] - MOVE RANGES. Move one or several ranges to another part of the
program.
[F7] - SEARCH. Search for a range number or a text.
The cursor is used in this level to move through the program.
Note: The active range is that where the cursor is positioned.
* [F1] - INSERT RANGE
When this option is selected a range is inserted after the active range. This new
range is represented by a dotted line.
You pass to the level 3 menu, which contains all the options necessary for true
editing.
* [F2] - MODIFY RANGE
This option enables you to modify the active range.
You pass to the level 3 menu (as in the INSERT RANGE option), which contains
all the options necessary for true editing.
pg-99
* [F3] - ERASE RANGE
This option allows you to erase one or several ranges.
Press [F4] to activate the command. You can then press [ENTER] to erase the
active range or proceed to select a block to erase.
Move the cursor to the start of the block to be erased, press [F4] - START
BLOCK; move the cursor to the final range of the block to be erased, press [F5]
to establish the block. Press [ENTER] to execute the command.
Working with blocks, the first and last ranges form part of the block. Once the
blocks have been removed the cursor is positioned at the previous range.
* [F4] - DOCUM. RANGE
.
This option allows you to document the active range. Press [F4] to activate the
command. A window appears at the bottom of the screen with 4 lines with 64
characters in each, which is used to document the range. If the range already has
a comment this information will appear in the documentation window.
The maximum number of characters for a range commentary is 255.
Press [Enter] to end and save the commentary, or [ESC] to end without saving.
* [F5] - COPY RANGES
This option allows you to copy blocks of ranges from one part of the program
to another. Press [F5] to activate the command. Next, using the cursor movement
keys, move the cursor to the first range in the block to be copied, press [F4] -
START BLOCK; move the cursor to the last range in the block to be copied,
press [F5] - END BLOCK.
The range block selected appears in reverse video. Move the cursor to the range
before the one where you want to copy the block, press [F6] - DESTINATION
and [ENTER], and the command will be executed.
pg-100
Bear in mind that:
- The block is copied in logical order, regardless of the selection sequence
of START BLOCK and END BLOCK.
- A block cannot be copied to a position within itself.
- If you wish to copy a block to the end of the program, you should
previously edit a new range as the last one in the program, and mark this
as the block destination.
* [F6] - MOVE RANGES
This option allows you to move blocks of ranges from one part of the program
to another.
Press [F6] to activate the command. Next, using the cursor movement keys,
move the cursor to the first range in the block to be moved, press [F4] - START
BLOCK; move the cursor to the last range in the block to be moved, press [F5]
- END BLOCK.
The range block selected appears in reverse video. Move the cursor to the range
before the one where you want to move the block to, press [F6] -
DESTINATION and [ENTER], and the command will be executed.
Bear in mind that:
- The block is moved in logical order, regardless of the selection sequence
of START BLOCK and END BLOCK.
- A block cannot be moved to a position within itself.
- If you wish to move a block to the end of the program, you should
previously edit a new range as the last one in the program, and mark this
as the block destination.
* [F7] - SEARCH
Press [F7] to enter the SEARCH option which offers:
[F1] - HELP. An interactive help window.
[F3] - RANGE. Search for and display of a specific range, indicating its
number.
[F5] - TEXT. Search for a text in the file.
pg-101
** [F3] - SEARCH FOR RANGE
Press [F3] and you will be asked for a range number to search for and
display. Press [ENTER] to execute the command. If the range is found it
appears on screen as the active range. If it is not found a message appears
to this effect. An application for this command could be searching for ranges
in which the validation process says there is an error.
** [F5] - SEARCH FOR TEXT
.
Press [F5] and you will be asked for the text to search for, which could be
a variable or an operation. Press [ENTER] to execute the command.
If it cannot be found a message to this effect appears and the command is
terminated.
If it is found the first occurrence of the text is presented in reverse video.
By pressing [Enter] successively the successive occurrences of the text will
appear. If the end of the file is reached the search continues from the
beginning in a cyclical way. To cancel the process press [ESC].
You can use the mask * to locate occurrences in a partial text, following the
conventions established by DOS. For example:
Il7<Enter> - you locate the occurrences in which this specific entry
appears
Il*<Enter> - you locate the occurrences in which the entries from I10
to I19 appear.
B*<Enter> - all the occurrences which have the letter B.
MOV<Enter> - all the occurrences which have this instruction-.
The mask format is: text*
pg-102
2.7.3.3 LEVEL 3 MENU
This menu corresponds to the [F1] option - INSERTING RANGES and the [F2]
option - MODIFYING RANGES of the level 2 menu. It enables you to carry
out the following functions:
[F1] - HELP. Interactive help window.
[F2] - OR. Generation and erasing of ORs in the range.
[F3] - XOR. Generation of XORs in the range, at the cursor
position.
[F4] - INSERT INSTR. Insert instructions in the range, at the cursor position.
Pass to level 4 menu.
[F5] - MODIFY INSTR. Modify the instruction on which the cursor is
positioned.
[F6] - ERASE INSTR. Erase the instruction on which the cursor is
positioned.
[F7] - VALIDATE RANGE. Control whether the range is correctly program-
med and return to previous memory.
The cursor movements in this level affect the contents of the active range.
* [F2] - OR
Press [F2] to enter the Generation and Erasing of ORs option:
[F1] - HELP. Interactive help window
[F2] - INSERT OR. Generate an OR (contact jump).
[F3] - ERASE OR. Eliminate a contact OR.
** [F2] - INSERT OR
This option enables you to generate an OR in the active range, from the
cursor position to the left, that is, towards the start of the range.
pg-103
By pressing [F2] the possible OR destinations will appear in the range,
indicated by means of the letters A to F. Remember that the start of the OR
is the current cursor position.
To select the OR destination, each of the possible letters (A-F) is assigned
to a function key. Press the function key you require, the OR is generated
in which you can then insert the instructions you require.
During the OR destination selection process you can move vertically
through the range using the cursor movement keys. So if the range cannot
be seen completely in the display window you can move through the range
to see the possible OR destinations.
** [F3] - ERASE OR
This option enables you to erase OR from the active range. Use the cursor
motion keys to move to any of the corresponding OR positions you wish
to erase and press [F3]. This puts the OR selected in reverse video and a
confirmation is requested.
If the OR selected is not empty, if it has instructions, you will be so informed
and a confirmation will be requested. Press [ENTER] to execute the
command or [ESC] to cancel it.
* [F3] - XOR
.
This option allows you to insert two enquiry options linked by means of the
XOR logic operator at the cursor position.
Press [F3] to activate the command. [ESC] allows you to cancel it.
First of all you should select which two types of instructions you want to link
in the XOR operator. Any combination of enquiry instructions is valid (Single
Exp, DFU, DFD, CPU, and CPS).
Once the selection has been made, the contact corresponding to the XOR
operator is displayed, in order next to request the variable(s) for each of the two
instructions.
When the data entry is complete the XOR operation is inserted.
pg-104
Example:
I1 I2
I1 XOR I2
I1 I2
Bear in mind that:
- If during data entry corresponding to the variables for each of the
instructions, the process is cancelled ([ESC] key) the XOR contact is
displayed, but without instructions.
- To eliminate a XOR the process is identical to that for any type of range
instruction. You can eliminate the XOR and OR instructions.
- The insertion of this type of operations can cause an overflow in the length
of the range (80 characters). In this case this gives rise to an SW function.
This function is dealt with in a subsequent chapter, given its importance.
* [F4] - INSERT INSTR.
This option passes you to the level 4 menu, which allows you to insert any type
of instruction in the active range.
The insertion is made at the cursor position. So using the cursor movement keys
the cursor should be positioned in the place where the instruction is to be
included.
Enquiry expressions or instructions can be inserted between columns 0 and 60.
To insert an action you should be in column 80.
In the length of the range (80 characters) is surpassed the SW function is
activated. This function will be dealt with in detail in a subsequent chapter.
* [F5] - MODIFY INSTR.
This option allows you to modify any instruction, whether it is an enquiry or
an action expression.
pg-105
Before pressing [F5] - MODIFY INSTR., you should select the instruction to
be modified by moving the cursor:
- To modify an enquiry instruction or expression, move the cursor to the left
of the instruction or expression.
- To modify an action you should move the cursor to column 80, to the right
of the action you wish to modify.
When the cursor is in the correct position press [F5]. If there is no instruction
at the cursor position an error message will appear and the process is cancelled.
If there is an instruction at the cursor position the instruction to be modified
appears in reverse video, and the menu of instructions to be inserted is displayed,
corresponding to the one for the type of instruction.
You should select the new instruction to be displayed and enter the data just as
if it were an insertion.
.
Bear in mind that:
- The modification of an instruction means replacing it with a contact of the
same type.
Example: If the instruction to be modified is:
. A comparison expression, it can be replaced with CPU or CPS.
. An arithmetic action, it can be replaced by any arithmetic action.
- So modifying allows you to:
. Replace the instruction with another of the same type.
. Modify the instruction variables.
. Change the NOT (negation) component of the instruction.
- If you wish to replace an instruction with another of a different type, you
should erase it and insert the new one.
pg-106
* [F6] - ERASE INSTR.
This option allows you to erase any instruction, whether it is an enquiry or an
action expression.
Before pressing [F6] - ERASE INSTR., you should select the instruction to be
erased by moving the cursor:
- To erase an enquiry instruction or expression, move the cursor to the left
of the instruction or expression.
- To erase an action you should move the cursor to column 80, to the right
of the action you wish to erase.
When the cursor is in the correct position press [F6]. If there is no instruction
at the cursor position an error message will appear and the process is cancelled.
If there is an instruction at the cursor position the instruction to be erased appears
in reverse video, a message requesting confirmation appears. Press [ENTER] to
execute the command or [ESC] to cancel it.
* [F7] - VALIDATE RANGE
Returning to previous menus as already mentioned is done using the [ESC] key.
However this menu level is the exception as you have to press [F7] to return to
the previous menu level.
In addition a verification of the edited range is carried out, which is described
below:
- If the range has no instructions it is erased and you return to the previous
menu.
- All ranges must have at least one action to be correct. So if a range does not
have one, a message to this effect appears and you are unable to return to
the previous menu until it is correct.
pg-107
2.7.3.4 LEVEL 4 MENU
This menu corresponds to the [F4] option - INSERT INSTR. of level 3. It
enables you to carry out the following functions:
[F1] - HELP. Interactive help window.
[F2] - INS DIR. Inserting directives.
[F3] - SING EXP. Inserting single expressions.
[F4] - DF EXP. Inserting flank detection expressions.
[F5] - COMP EXP. Inserting comparison expressions.
[F6] - ASSIG ACT. Inserting assignment actions.
[F7] - COND ACT. Inserting conditional actions.
[F8] - RUPT ACT. Inserting rupture actions.
[F9] - MOV ACT. Inserting MOV actions.
[F10] - You obtain the following options:
[F1] - HELP. Interactive help window.
[F2] - NEG ACT. Inserting record negation actions.
[F3] - ARIT ACT. Inserting arithmetic actions.
[F4] - ROT ACT. Inserting record rotation actions.
[F5] - LOG ACT. Inserting logic actions.
[F6] - SPEC ACT. Inserting special actions.
[F10] - Return to previous insertion options.
pg-108
General notes:
- During the insertion of instructions, when the user has to enter data, a small
help feature appears in the status line indicating the type of data to enter or
the actions to execute.
- In the data entry process, a check is made of the values keyed in, an error
message is given in the case of error.
- The instruction is inserted at the cursor position.
- In the case of horizontal overflow the SW function is executed, which will
be dealt with in detail later.
* [F2] - INS. DIR.
This option selects the insertion of a directive in the range. It should be the only
element in the range. Press [F2] to activate the command and see the following
options:
[F1] - HELP. Interactive help window.
[F2] - DIR. Single Directives.
[F3] - AL. Alarm module directive.
[F4] - PE. Periodic module directive.
[F5] - LABEL. Labels.
** [F2] - DIR.
This option enables you to insert the following directives: PRG, CY1,
REA, IMA, END, NOP, OWD and RER.
Press [F2] to activate the command. Enter the name of the directive to
program and press [ENTER] to display it or [ESC] to cancel the process.
Contact:
PRG
pg-109
** [F3] - AL.
This option enables you to insert the alarm module directive. Press [F3] to
activate the command. Enter the number of the alarm module to be
programmed and press [ENTER] to display it or [ESC] to cancel
the process.
Contact:
AL1
.
** [F4] - PE.
This option enables you to insert the periodic module directive. Press [F3]
to activate the command.
Enter the number of the periodic module to be programmed and press
[ENTER] to continue or [ESC] to cancel the process.
Then enter the module frequency and press [ENTER] to display the
directive or [ESC] to cancel the process.
Contact:
PE2 12000
** [F5] - LABELS
This enables you to insert labels.
Press [F5] to activate the command. Enter the number of the label to be
programmed and press [ENTER] to display it or [ESC] to cancel the
process.
Contact:
L15
pg-110
* [F3] - SING. EXP.
This option selects the insertion of a single expression in the range. Press [F3]
to activate the command and see the following options:
[F1] - HELP. Interactive help window.
[F2] - SING. EXP. Display of single expressions.
[F10] - FLAG NOT. Switch the NOT component of the instruction
** [F2] - SING. EXP.
This option enables you to insert a single expression at the cursor position.
Press [F2] to activate the command. Enter the variable corresponding to the
contact to be programmed and press [ENTER] to display it or [ESC] to
cancel the process.
Contact:
variable variable
/
** [F10] - FLAG NOT
This key is active for all types of instructions to be inserted.
Each instruction can be displayed as a normally open or a normally closed
contact. The latter corresponds to negated instructions.
Therefore, when in the [F10] key - FLAG NOT, the following appear:
- OFF> the contact is displayed as open.
- ON > the contact is displayed as closed or negated.
Press this key to switch the instruction NOT component flag, which will
enable you to select the type of contact (open or closed).
By default when you enter to insert any type of instruction, it is OFF (open).
pg-111
* [F4] - DF EXP.
This option selects the insertion of a flank detection expression in the range.
Press [F4] to activate the command and see the following options:
[F1] - HELP. Interactive help window.
[F2] - DFU. Display of up flank detection expressions.
[F3] - DFD. Display of down flank detection expressions.
[F10] - FLAG NOT. Switch the instruction NOT component.
.
** [F2] - DFU / [F3] -DFD
This option enables you to insert a flank detection expression at the cursor
position.
Press the function key assigned to the instruction to be displayed to activate
the command.
Enter the variable corresponding to the contact to be programmed and press
[ENTER] to display it or [ESC] to cancel the process.
Contact:
variable variable
DFU /DFD
pg-112
* [F5] - CP EXP.
This option selects the insertion of a comparison expression in the range.
Press [F5] to activate the range and see the following options:
[F1] - HELP. Interactive help window.
[F2] - CPU. Display of comparison expressions without sign.
[F3] - CPS. Display of comparison expressions with sign.
[F10] - FLAG NOT. Switch the instruction NOT component.
** [F2] - CPU / [F3] - CPS
This option allows you to insert a comparison expression at the cursor
position.
Press the function key assigned to the instruction to be displayed to activate
the command.
Enter the variable corresponding to the first operand of the comparison
operation and press [ENTER] to continue or [ESC] to cancel the process.
Next the possible instruction operators are presented in the function keys.
Press the function key corresponding to the operator you wish to program.
Finally enter the variable corresponding to the second operand of the
comparison operation and press [ENTER] to display the contact or [ESC]
to cancel the process.
Contact:
op.1 op.2
CPU A EQ B
op.1 op.2
/CPS A EQ B
pg-113
* [F6] - ASSIG. ACT.
This option selects the insertion of an assignment action in the range. Press [F6]
to activate the command and see the following options:
[F1] - HELP. Interactive help window.
[F2] - SING. ACT. Display of single actions.
[F3] - TG. Display of timer start actions.
[F4] - CPR. Display of counter selection actions.
.
[F10] - FLAG NOT. Switch the instruction NOT component.
** [F2] - SING. ACT.
This option enables you to insert a single action at the cursor position.
Press [F2] to activate the command. Enter the variable corresponding to the
contact to be programmed and press [ENTER] to display it or [ESC]
to cancel the process.
Contact:
variable variable
( ) (/)
** [F3] - TG
This option enables you to insert a timer start action at the cursor position.
Press [F3] to activate the command.
The possible timer start entries are presented in the function keys. Press the
function key corresponding to the entry you wish to program.
Next enter the number of the timer to be started and press [ENTER] to
continue or [ESC] to cancel the process. Finally enter the variable
corresponding to the timer time constants and press [ENTER] to display
the contact or [ESC] to cancel the process.
Contact:
c.time. c.time
(TG1 14) (/TG1 124 )
pg-114
**[F4] - CPR
This option enables you to insert a counter selection action at the cursor
position.
Press [F4] to activate the command.
Enter the number of the counter to be started and press [ENTER] to
continue or [ESC] to cancel the process.
Finally enter the variable corresponding to the counter preselection value
and press [ENTER] to display the contact or [ESC] to cancel the process.
Contact:
presel. presel.
(CPR 14) (/CPR 124)
* [F7] - COND. ACT.
This option selects the insertion of a conditioned action in the range. Press [F7]
to activate the command and see the following options:
[F1] - HELP. Interactive help window.
[F2] - SET. Display of SET actions.
[F3] - RES. Display of RES actions.
[F4] - CPL. Display of CPL actions.
[F10] - FLAG NOT. Switch the instruction NOT component.
** [F2] - SET / [F3] - RES / [F4] -CPL
This option enables you to insert conditioned actions at the cursor position.
Press the function key assigned to the action to be displayed to activate the
command.
Enter the variable corresponding to the contact to be programmed and press
[ENTER] to display the contact or [ESC] to cancel the process.
pg-115
Contact:
variable variable
(SET) (/CPL)
* [F8] - RUPT. ACT.
This option selects the insertion of a rupture action in the range. Press [F8] to
activate the command and see the following options:
.
[F1] - HELP. Interactive help window.
[F2] - JMP. Display of jump to label actions.
[F3] - CAL. Display of subroutine call actions.
[F4] - RET. Display of return from subroutine actions.
[F10] - FLAG NOT. Switch the instruction NOT component.
** [F2] -JMP
This option allows you to insert jump to label actions, at the cursor position.
Press [F2] to activate the command. Enter the number of the label you wish
to jump to and press [ENTER] to display the contact or [ESC] to cancel
the process.
Contact.
label label
(JMP) (/JMP)
** [F3] - CAL
This option allows you to insert subroutine call actions, at the cursor
position.
Press [F3] to activate the command. Enter the number of the label you wish
to jump to and press [ENTER] to display the contact or [ESC] to cancel
the process.
pg-116
Contact.
label label
(CAL) (/CAL)
** [F4] - RET
This option enables you to insert return from subroutine actions, at the
cursor position.
Press [F4] to activate the command and display the action.
Contact:
(RET) (/RET)
* [F9] - MOV. ACT.
This option selects the insertion of a movement action in the range. Press [F9]
to activate the command and see the following options:
[F1] - HELP. Interactive help window.
[F2] - MOV. Display of movement actions.
[F10] - FLAG NOT. Switch the instruction NOT component.
** [F2] - MOV
This option allows you to insert a movement action, at the cursor position.
Press [F2] to activate the command.
Enter the source variable of the movement operation and press [ENTER]
to continue or [ESC] to cancel the process. Next enter the destination
variable of the movement operation and press [ENTER] to continue or
[ESC] to cancel the process.
Finally using the function keys select the operation format, indicating the
source and destination variable codes and the number of bits to move.
pg-117
Contact.
source form. dest. source form. dest.
( A MOV B ) ( A /MOV B )
* [F10] - ->
Press [F10] to obtain the rest of the possible instructions to insert and which are
described below.
* [F2] - NEG. ACT.
.
This option selects the insertion of a record negation action in the range.
Press [F2] to activate the command and see the following options:
[F1] - HELP. Interactive help window.
[F2] - NGU. Display of record negation actions without sign.
[F3] - NGS. Display of record negation actions with sign.
[F4] - NGD. Display of double record negation actions
[F10] - FLAG NOT. Switch the instruction NOT component.
** [F2] - NGU / [F3] - NGS / [F4] - NGD
This option enables you to insert record negation actions at the cursor
position.
Press the function key assigned to the action to be displayed to activate the
command.
Enter the number of the record to be negated and press [ENTER] to display
the contact or [ESC] to cancel the process.
Contact:
rgto rgto
(NGU) (/NGU)
pg-118
* [F3] - ARIT. ACT.
This option selects the insertion of an arithmetic action in the range. Press [F3]
to activate the command and see the following options:
[F1] - HELP. Interactive help window.
[F2] - AD. Display the sum arithmetic action.
[F3] - SB. Display the subtraction arithmetic action.
[F4] - ML. Display the multiplication arithmetic action.
[F5] - DV. Display the division arithmetic action.
[F6] - MD. Dislplay the modulus arithmetic action.
[F10] - FLAG NOT. Switch the instruction NOT component.
** [F2] - AD / [F3] - SB / [F4] - ML / [F5] - DV / [F6] - MD
This option allows you to insert an arithmetic action at the cursor position.
Press the function key assigned to the instruction to be displayed to activate
the command.
Using the function keys select the type of operation you wish to carry out:
without sign, with sign or double.
Next enter the variable corresponding to the first operand of the operation
and press [ENTER] to continue or [ESC] to cancel the process.
Then enter the variable corresponding to the second operand of the
operation and press [ENTER] to display the contact or [ESC] to cancel the
process.
Finally enter the variable corresponding to the result of the operation and
press [ENTER] to display the contact or [ESC] to cancel the process.
pg-119
Contact:
op.1 op.2 res. op.1 op.2 res.
(A ADU B = C ) ( A /MLD B = C )
* [F4] - ROT. ACT.
This option selects the insertion of a record rotation action in the range.
.
Press [F4] to activate the command and see the following options:
[F1] - HELP. Interactive help window.
[F2] - RIGHT. Display rotation action to right.
[F3] - LEFT. Display rotation action to left.
[F10] - FLAG NOT. Switch the instruction NOT component.
** [F2] - RIGHT / [F3] - LEFT
This option allows you to insert a record rotation action at the cursor
position.
Press the function key assigned to the instruction to be displayed to activate
the command.
Using the function keys select the type of rotation: 1 or 2.
Next enter the record to rotate and press [ENTER] to continue or [ESC] to
cancel the process.
Finally enter the number of rotations to be carried out in the selected record
and press [ENTER] to display the contact or [ESC] to cancel t h e
process.
Contact:
rot rec rot rec
(RR1) (/RL2)
pg-120
* [F5] - LOG. ACT.
This option selects the insertion of a logic action in the range.
Press [F5] to activate the command and see the following options:
[F1] - HELP. Interactive help window.
[F2] - AND. Display logical action AND.
[F3] - OR. Display logical action OR.
[F4] - XOR. Display logical action XOR.
[F10] - FLAG NOT. Switch the instruction NOT component.
** [F2] - AND / [F4] - OR / [F5] - XOR
This option allows you to insert a logic operation as an action at the cursor
position. Press the function key assigned to the instruction to be displayed
to activate the command.
Enter the variable corresponding to the first operand of the operation and
press [ENTER] to continue or [ESC] to cancel the process.
Then enter the variable corresponding to the second operand of the
operation and press [ENTER] to continue or [ESC] to cancel the process.
Finally enter the variable corresponding to the result of the operation and
press [ENTER] to display the contact or [ESC] to cancel the process.
Contact:
op.1 op.2 res.
(A AND B = C )
op.1 op.2 res.
(A /XOR B = C )
pg-121
* [F6] - SPEC. ACT.
This option selects the insertion of a special action in the range.
Press [F6] to activate the command and see the following options:
[F1] - HELP. Interactive help window.
[F2] - ERA. Display special action ERA.
[F3] - WDG. Display special action WDG.
[F4] - ERR. Display special action ERR.
.
[F5] - MSG. Display special action MSG.
[F6] - SYS. Display special action SYS.
[F10] - FLAG NOT. Switch the instruction NOT component.
** [F2] - ERA
This option enables you to insert the special action ERA (erase block) at
the cursor position.
Press [F2] to activate the command.
Enter the block of variables to be erased according to the following format:
[Variable][First No.][Final No.] and press [ENTER] to display the contact
or [ESC] to cancel the process.
Contact:
I10.30 M1000.1100
(ERA) (/ERA)
** [F3] - WDG
This option enables you to insert the special action WDG (setting Watch
Dog time), at the cursor position. Press [F3] to activate the command. Enter
the time value to assign as Watch Dog and press [ENTER] to display the
contact or [ESC] to cancel the process.
pg-122
Contact:
time time
(WDG) (/WDG)
** [F4] - ERR
This option enables you to insert the special action E (error generation) at
the cursor position.
Press [F4] to activate the command.
Enter the error number to be generated and press [ENTER] to display the
contact or [ESC] to cancel the process.
Contact:
err. no. err. no.
( E ) (/ E )
** [F5] - MSG
This option enables you to insert the special action MSG (message
generation) at the cursor position.
Press [F5] to activate the command.
Enter the message number to be generated and press [ENTER] to display
the contact or [ESC] to cancel the process.
Contact:
mess. no. mess. no.
(MSG) (/MSG)
** [F6] - SYS
This option enables you to insert the special action SYS (call system) at the
cursor position.
Press [F6] to activate the command.
Enter the system call number press [ENTER] to continue or [ESC] to cancel
the process.
pg-123
Then enter the auxiliary record number and press [ENTER] to display the
contact or [ESC] to cancel the process.
.
Contact.
rec. no. rec. no.
(SYS) (/SYS)
pg-124
2.7.3.5 SPECIAL FUNCTION KEYS
In order to speed up the editing processes there are a series of special keys to which
specific editing functions have been assigned.
The basic idea behind these keys is that when you are editing (inserting
instructions) and you need to carry out a series of generic functions which are
in previous menus, you can carry out these functions without having to return
through the menus.
* [ALT] + [C] > COLOR SELECTION.
In equipment with color monitors, the user can select the color attributes to be
used in the application, from a preset series of palettes.
This key is active during the whole application.
Once [ALT] + [C] has been pressed, each time the spacebar is pressed the different
preset color palettes appear.
You can exit the option with:
- [ESC] Sets the last palette displayed for the session. In subsequent sessions
the standard palette will appear.
- [ALT]+[S] Sets the last palette displayed as the standard palette. That is
tosay that this palette is definitive, until it is changed using the
same procedure.
* [ALT] + [O] > GENERATE OR.
This option enables you to generate ORs. It has the same effect as OR generating
function in the level 3 menu of the application.
This key is active in the level 3 and 4 menus of the application. So there is no
need to exit the level 4 menu (Inserting instructions) to generate an OR.
* [ALT] + [B] > ERASE OR.
This option enables you to erase ORs. It has the same effect as OR erasing
function in the level 3 menu of the application.
pg-125
This key is active in the level 3 and 4 menus of the application. So there is no
need to exit the level 4 menu (Inserting instructions) to erase an OR.
* [ALT] + [M] > MODIFY INSTRUCTION
This option enables you to modify an instruction. It has the same effect as
instruction modifying function in the level 3 menu of the application.
This key is active in the level 3 and 4 menus of the application. So there is no
need to exit the level 4 menu (Inserting instructions) to modify an instruction.
.
* [ALT] + [D] > ERASE INSTRUCTION.
This option enables you to erase an instruction. It has the same effect as the
instruction erasing function in the level 3 menu of the application.
This key is active in the level 3 and 4 menus of the application. So there is no
need to exit the level 4 menu (Inserting instructions) to erase an instruction.
* [ALT] + [X] > GENERATE AN XOR.
This option enables you to generate an XOR. It has the same effect as the XOR
generating function in the level 3 menu of the application.
This key is active in the level 3 and 4 menus of the application. So there is no
need to exit the level 4 menu (Inserting instructions) to generate an XOR.
* [ALT] + [V] > DOCUMENT RANGE.
This option enables you to display and modify the comment on a range. It has
the same effect as the documenting function in the level 2 menu of the
application.
This key is active in the whole application. So there is no need to exit the level
2 menu to display or modify a range comment.
pg-126
* [ALT] + [T] > SYMBOL TABLE.
This option enables the maintenance of symbol table. This key is active in the
whole application. Options:
[F1] - HELP. Interactive help window.
[F2] - EDIT SYMB. Insert elements in the table.
[F3] - MODIFY SYMB. Modify the element at the cursor position.
[F4] - ERASE SYMB. Eliminate the element at the cursorposition.
[F5] - END. Terminate.
pg-127
2.7.4 SW FUNCTION
* Range overflow analysis
As has already been mentioned the length of a range is limited to 80 characters
(screen size).
Therefore, in instruction or XOR insertion processes, it could occur that the
insertion of the mentioned element causes an overflow of the range. In other
words there is not enough physical space in the range to write a new instruction.
Let us look at an example of an equation which produces an overflow and the
manual solution that can be used:
I1 AND I2 AND I3 AND I4 AND I5 AND I6 AND I7 AND I8 AND I9 = SET
012
given that this equation in contacts produces an overflow, it is suggested that it
be broken down into two ranges or stages,
1st STAGE I1 AND I2 AND I3 AND I4 AND I5 AND I6 = M1000
2nd STAGE M1000 AND I7 AND I8 AND I9 = SET 012
- Part of the range is taken to a previous stage and an intermediate mark is
used as a link or bridge between both ranges.
So what has been done in the contact editor is to automate the previous
procedure, with the possibility of using physical variables (MARKS) or
fictitious variables (SW) as links between the stages.
* Treatment in the application
When on trying to insert an element in a range there is an overflow, the user is
requested to establish the part of the active range that he wishes to take to a
previous stage and the type of variable he wants to use in the link (MARK or
SW). The previous stage is automatically generated and both stages are linked
by means of the selected variable.
pg-128
The procedure is as follows:
1.- A message appears informing you that the operation requested causes
an overflow. You have to select the block of instructions to take to a
previous stage. To do this you must move the cursor to the far right
of the block (start) to be taken to a previous stage (using the cursor
movement keys). Press [ENTER] to continue or [ESC] to cancel the
process.
2.- Then in the range the possible block ends are presented, indicated by
means of the letters A to F. To select the end of the block, each of the
letters (A-F) is assigned to a function key. Press the function key which
you require and the block will appear in reverse video.
Bear in mind that one stage must contain all the OR levels in which
the instructions it contains are; if the stage you select is incorrect the
correct block is automatically calculated and presented in reverse
video.
3.- Next you are requested to select the variable you wish to use as the link
between the established stage and the current range. The possibilities
are SW or MARK.
If you select MARK you should indicate the number.
Press [ESC] to cancel the process.
4.- Once the range selection has been made it is automatically split into
two stages, linked by means of the variable selected:
- The block established passes to a previous stage with the selected
link variable as an action.
- In the current range the established block is replaced by the selected
link variable.
In this way the active range has space for new insertions. Successive
overflows in the range are resolved in the same way.
pg-129
Notes on the stages linked with MARKS:
- The MARKS as link variables can be modified or erased.
- There is no limit as to the number of overflows in one range, when
MARKS are used as linkage variables.
.
Notes on stages linked with SW:
- The SW are numbered automatically and in order from 0.
- The overflow limit in one range, using SWs as linkage variables,
is 10. So the last SW allowed is SW9.
- The SW linkage variables can be modified or erased. But bear in
mind that as they are fictitious marks, if the number of SW
programmed does not correspond, an error will be produced
during the verification process.
Therefore when an SW is modified or erased in one stage, it must be
deletedin the following stage.

Вам также может понравиться