TNCBACK.EXE Version 1.4
=======================

Backup and Restore Program for TNC 426/430 Files 
Through the Serial Port

Contents
--------
1) General Information
2) Control Unit Replacement
3) Starting a Data Backup
4) Data Backup of Selected Files
5) Restore the Files
6) Extracting Files from an Existing Backup File
7) Adding Files to an Existing Backup File
8) Generating a New Backup File
9) Call quick information on parameters
10) Examples of program calls
11) Changes from Version 1.3
12) Update TNC REMOTE V2.0 and V2.4



1) General Information
----------------------
The hard disk of the TNC 426 is divided into three partitions. The "TNC:\"
partition can store up to 170 MB, the "PLC:\" and "SYS:\" partitions can
each store up to 20 MB (TNC 430: 900MB/32MB/64MB).
   The TNC:\ partition is for NC programs, tool tables, datum tables, and
pallet tables: such data is referred to as "user-specific data."
   The PLC:\ partition is for PLC programs, machine parameters, files for
OEM cycles, compensation-value tables, operating times, and PLC error
messages: these are manufacturer-specific data. The PLC:\ partition and its
data are not visible for the machine operator.
   The SYS:\ partition holds the file for HEIDENHAIN cycles, the dialog texts
in the various local languages, system files such as NCPATH.SYS, NCDATA.SYS
and TIMES.SYS as well as temporary files that are generated by the control's
operating system: the so-called system-specific files.
The SYS:\ partition and its data are not visible for the machine operator.

It's preferable to transfer the backup files to the hard disk of your PC.
The backup process generates 2 files:
- One binary file (extension .BCK) with the backed up files
- One text file (extension .LST) showing the successfully backed up files
  on separate lines and providing information on any errors that may have
  occured.
Before transfer, make sure that your hard disk has enough space to hold the
amount of data to be backed up. TNCBACK.EXE automatically checks whether 
the space is available. If there is not enough space, an error message 
appears indicating the approximate amount of space required.
   It is also possible to make a backup onto several floppy disks. BACKUP.EXE 
prompts you to change disks as soon as each disk is full. The list of saved 
files (.LST file) is stored on the last disk. This last disk must be the
first to be inserted when you want to restore.

Note:

A backup of all files is very time-consuming. HEIDENHAIN therefore recom-
mends that immediately after the machine is commissioned (including touch
probe, swivel head, etc.), all files in the PLC:\ partition and the
NCPATH.SYS and NCDATA.SYS files of the SYS:\ partition be backed up. As an
alternative, you may ask your machine tool builder whether he can provide
you with a backup disk with these files.
   In addition, HEIDENHAIN recommends regular backup up the files in the
TNC:\ partition (NC programs, datum tables, etc.), if they have not been
archived in some other way.



2) Control Unit Replacement
---------------------------
Should it become necessary to replace the control unit on your machine,
TNCBACK.EXE enables you to make a backup copy of the TNC:\, PLC:\ and
several files from the SYS:\ directory. You can then download the full backup
copy to the new control unit, using the parameter F.  Several files of the 
SYS:\ partition (dialog files, cycle files, etc.) are not copied by 
TNCBACK.EXE since they are already pre-installed in the new control.

For TNCBACK.EXE to work, the TNC 426 control must be running the software
version 280 460 06 or later. If you also wish to backup binary files (many
OEM cycles are binary), you will need the new software version 280 462 01,
which will be available from the middle of 1995. This version also
compresses the backup files.

All software versions of the TNC 430 can transfer and binary files and
compress files.



3) Starting a Data Backup
-------------------------
Next to the DOS prompt, enter TNCBACK, followed by the desired para-
meters, each separated by a space.

A complete command line for backup contains the following parameters:

	TNCBACK <backup file> [<directory> | F] [PCOMx] [Bxxxx] [D] [N]

The special characters have the following meanings:

<....>          Replace with the indicated information
[....]          Optional entry
|               Alternative entry


The parameters have the following meanings:

<backup file>  The files are saved under this name in the PC. The file
	       is automatically given the file name extension ".BCK".
	       An .LST file is generated containing a list of the backed
	       files.  If no path is given, the *.BCK and *.LST files will
	       be saved in the PC directory from which TNCBACK.EXE 
	       was started.

	       Note:
	       If a backup file with the same name already exists on the
	       PC, it will be overwritten. The program will not ask for
	       confirmation.

<Directory>    This is the partition or directory of the hard disk whose
	       contents and subdirectory contents (except SYS:\) are to be 
	       saved. They can be, for example, TNC:\, PLC:\ or SYS:\. 
	       If no directory is entered, BACKUP will save all files and
	       subdirectories in the TNC:\ partition.

F              Full backup. Eliminates the need to enter the name of a
	       directory. Starts a complete backup of all partitions.

Bxxxx          Baud rate for transfer. If no entry is made, the baud rate is
	       automatically set to that of the control unit. If a baud rate
               is entered, it must match the baud rate of the control as it
               is entered under LSV-2 in the interface setup.

PCOMx          Serial port used for data transfer. If no entry is made; the
	       COM1 port will be used.

D              Directory only. Indicates that no subdirectories should be
	       saved.

N              No compression. The files are backed up but not compressed.


4) Data Backup of Selected Files
--------------------------------
If you wish to backup only certain files of a directory, the following
three steps are necessary:

I) Scan the contents
--------------------
Use the parameter S in the command line to produce an *.LST scan file.

Such a command should look like this:

	TNCBACK SCANLIST PLC:\MODULE S pCOM2

All of the files from the directory MODULE in the PLC:\ partition are now
listed line by line in this new scan file (in the example: SCANLIST.LST).

II) Select files
----------------
You can then use an editor (e.g. EDIT.COM) on this file to erase entries
or to deactivate them by inserting a semicolon (;) in front of them.


III) Backup of selected files
-----------------------------
This edited file will now be used as the list for the actual backup.
Enter the parameter E with the scan file name in the command line.

Example:

	TNCBACK 426BACK eSCANLIST pCOM2

TNCBACK.EXE will now only backup those files that are still active
in the SCANLIST.LST file, i.e. those that are not proceeded by a semicolon.


Note:
You can use the same name for the scan file as for the backup file. Then you
needn't enter a name in parameter "E". However, this brings with it the
disadvantage that the edited scan file will be overwritten by the .LST
file that logs the backup process.

Example:

         TNCBACK 426BACK PLC:\MODULE S pCOM2

	 ... now edit 426BACK.LST ...

	 TNCBACK 426BACK E pCOM2


5) Restoring the Files
----------------------
A complete command line for restoring the backed files contains the
following parameters:

	TNCBACK <backup file> R [PCOMx] [Bxxxx] [L<error file>] [Q]

<backup file> Indicates the List File that was generated during backup.
	      The file is automatically given the file name extension
	      ".LST".

R             Restores the backup files to the TNC.

Bxxxx         Baud rate for transfer. If no entry is made, the baud rate is
              automatically set to that of the control unit. If a baud rate
              is entered, it must match the baud rate of the control as it
              is entered under LSV-2 in the interface setup.

PCOMx         Serial port used for data transfer. If no entry is made; the
	      COM1 port will be used.

L<error file> With this parameter you enter name of the file in which the 
              restore process is logged. If you do not enter this optional
              parameter, TNCBACK will generate a file with the name of the
              backup file and the extension .ERR. 

Q             This parameter suppresses the logging of the restore process in
              an error file.

Note:
System files (files from the SYS:\ partition, OEM.SYS or machine parameter
files) are always restored first. This is followed by a control system reset.
The reset activates the new parameter blocks before any axis-error
compensation files and NC programs are restored.

Example:

	 TNCBACK 426BACK R pCOM2 lC:\BACKUP\PROT\ERRORS.TXT



6) Extracting a File from an Existing Backup File
-------------------------------------------------
TNCBACK.EXE enables you to copy individual files from an existing backup
file (*.BCK).

Enter the name of the backup file, followed by the parameter X (for
"extract") with the complete path and name of the desired file. The
extracted file is then saved in the current directory.

An *.ERR file is generated containing a protocol of the extraction process.
If any errors occur, they are recorded here.

If for example you wish to extract the file MPFILE.MP, which was placed in
the PLC:\ partition of the control, from the backup file 426BACK.BCK,
you must enter:

	TNCBACK 426BACK xPLC:\MPFILE.MP

The file MPFILE.MP is now in the current directory.



7) Adding Files to an Existing Backup File
-------------------------------------------
To add one or more new files to an existing backup file, enter the name of
the backup file followed by the parameter A with the complete path and
name of a file containing a list of the files to be inserted.

If, for example, you want to insert several files in an existing backup file
named 426BACK, you might enter:

	TNCBACK 426BACK aC:\TNC\BACKLIST.ADD

On drive C:, in the directory TNC, you have already created the file
BACKLIST.ADD with the following entries:

C:\PLC\STANDARD\MOD\*.PLC           PLC:\PROG\*.PLC        ;All PLC modules
C:\PLC\STANDARD\MP\STANDARD.MP      PLC:\MP\STANDARD.MP
C:\PLC\STANDARD\PET\STANDARD.PET    PLC:\PET\STANDARD.PET

The left column contains the names of the files on the PC that you wish to
add to the backup file 426BACK.BCK (source).

The right column is the full file name (including the path) in the control
unit in which the files will be stored when they are restored (target).
The entries of the two columns must be separated by at least one space or
tab character.

You may add comments by beginning them with a semicolon. The adding process
is recorded in an *.ERR error protocol file.



8) Generating a New Backup File
-------------------------------
To generate a new backup file on the PC, use the same procedure as for adding
new files in an existing backup file (see item 7 above). A new backup file
will be generated if the entered backup-file name does not yet exist.

The command example in item 7) will generate a new backup file named
426BACK.BCK if it does not already exist.



9) Calling Quick Information on Parameters
------------------------------------------
For information on the most important input possibilities, start the program
with the parameter "?":

	TNCBACK ?

This information also includes the version number of your copy of 
TNCBACK.EXE.


For information on additional, less frequently used parameters, use the 
Parameter "H":

	TNCBACK H




10) Examples of Program Calls
-----------------------------
Transferring the complete directory TNC:\, including all subdirectories,
through the COM2 port at 19,200 baud:

	TNCBACK BACKUP1 TNC: pCOM2 b19200


Transferring the complete directories TNC:\ and PLC:\, including all
subdirectories and the system files, through the COM1 port at the baud
rate that is entered in the TNC interface setup under LSV-2:

	TNCBACK F BACKUP2


Restoring the files from a previous backup through the COM2 port at
19,200 baud:

	TNCBACK BACKUP2 R PCOM2 B19200



11) Changes from Version 1.3
----------------------------
* Bugfix: The warning message before restore of system files was
          errorneous (only english language version)


12) Update TNC REMOTE V2.0 and V2.4
-----------------------------------
The backup/restore functions were also included in the TNC Remote software.
If you want to update these functions to correct the bugs, you need only
copy the file TNCBACK.EXE into the directory in which TNCREMO.EXE is located.
