The File Menu


The File menu provides commands for the opening/saving of TRiLOGI files either on the local harddisk or on the TLServer's storage space.

1.    New    <Ctrl+N>

Activate this command when you want to create a new ladder logic program. All current ladder circuits and custom functions will be cleared from the screen and the default filename is "Untitled.pc6".

2.     Save   <Ctrl+S>

This command saves the whole ladder logic program, all I/O tables and all the custom functions to the disk. The current file will be saved to the same source from which it was opened from, i.e. If a file has been previously opened from the TLServer via the network, this command will save the file back to the TLServer. Likewise,  a file opened from the local harddisk will be saved automatically to the local harddisk.

3.     Open (TLServer 3) - <Ctrl+O>

This command is for loading a TRiLOGI program file "xxx.PC6" from the TLServer version 3.x or later. Due to the need to use Unicode in the network stream to handle Unicode-based ".PC6" file, this function on TL6 can only work with TLServer 3.x and above.  Since TLServer 2.x does not support Unicode network stream this function will not work with TLServer 2.x. (If you attempts to execute "Open (TLServer 3)" and put in the IP address of a running TLServer 2.x or earlier, TL6 will complain that the TLServer is not running or unsuccessful connection to TLServer.)

When selected, you will be prompted to enter the Username and the Password to gain access to the TLServer. (the same Username and Password must have already been defined in TLServer for this to work).  If you are running TRiLOGI as a local application instead of as an applet,  you may be required to enter the "IP Address: port" of TLServer in order to connect to TLServer. (Note that last entry of IP Address: port is saved to the TL6 configuration file and will be loaded when the TL6 application re-starts).

Each user has his own exclusive directory for storing his TRiLOGI files. Once authenticated, a network file dialog will be opened for you to select a file, delete a file or create a subdirectory, as shown below:

ladderref1.gif (9854 bytes)   ladderref2.gif (7988 bytes)

Simply double-click on the desired file or select the file you wish to open and click the "Open" button to open the TRiLOGI file.

Sub-directory:  The MKDir button allows you to create a sub-directory on the server to organize your files. Subdirectory names always end with a "/" character. If you open a subdirectory its contents  will be displayed in the file window. To return to the parent directory from a sub-directory, you simply double-click on the  ladderref3.gif (206 bytes) symbol.

4.     Save As (TLServer 3)

Use this command if you wish to save the currently edited TRiLOGI file to the TLServer 3.x using a different filename. You will be prompted to enter the Username/Password (and the IP address if it is a TL6 application) to gain access to TLServer. Once authenticated, the network file dialog similar to that described in "Open (TLServer 3)" will be opened for you to enter a file name or select a filename to overwrite. The default file extension for file saving is ".PC6" which will save the file in Unicode format to the TLServer user folder. However, you may also save the file with an extension ".PC5", in which case the TLServer 3.x will then save the TRiLOGI file in ASCII format. File saved with ".PC5" extension may be opened by older TL5 applications.

Important Notes:  Any non-ASCII characters used in the program file will be lost when the file is saved in ".PC5" format and it is not recoverable. So if you use non-English I/O labels your program will most likely fail to compile when it is saved as a ".PC5" file, since the I/O labels are converted to ASCII and are partially trancated. Thus, it is important to keep the original copy of your .PC6 program so that you can work on it to resolve the unicode conversion issues.

5.     Open (Local Drive)
         Save As (Local Drive)

For TL6 Application (not Applet) you can open or save a file from/to the local harddisk. You will be presented with the typical file dialog provided by your O/S. This command however is not available to the TL6 Applet since an applet does not have the right to access local hard disk resources.

The default file extension for opening a TRiLOGI file is ".PC6". This signals to the TL6 application that the file is in Unicode format and TL6 will then load it accordingly. However, TL6 is also able to read ".PC5" files created by older TL5 applications. TL6 assumes that all ".PC5" files are stored in ASCII format and will load it accordingly.

The default file extension for saving a TRiLOGI file in TL6 is ".PC6". This signals to the TL6 application to save the data in Unicode format. Unicode is required to store international characters which cannot be properly saved in the ASCII format used by TL5.  However, you may still save the currently opened TRiLOGI file in TL6 to a file with an extension ".PC5", which will then instructs TL6 application to save the file in ASCII format. Files saved with ".PC5" extension may then be opened using older TL5 applications.

Important Notes:  Any non-ASCII characters used in the program file will be lost when the file is saved in ".PC5" format and it is not recoverable. So if you use non-English I/O labels your program will most likely fail to compile when it is saved as a ".PC5" file, since the I/O labels are converted to ASCII and are partially trancated. Thus, it is important to keep the original copy of your .PC6 program so that you can work on it to resolve the unicode conversion issues.

6.     Protect / Un-Protect

This feature allows you to prevent others from viewing a pre-defined range of ladder logic and custom functions. When you select "Protect" command, you will be asked to enter an unlocking password, a range of ladder logic starting from circuit #1, as well as a range of custom functions whose content you wish to prevent others from viewing, as follow:

viewprotect.gif (7682 bytes)

The moment you click on the "Protect" button, you can no longer view or print the protected range of ladder circuits and custom functions. When you save the protected program, it will be saved in an encrypted format and it cannot be opened using older version of TRiLOGI software. However, you will still be able to add new ladder circuits and custom functions to this program as well as modify those unprotected ladder circuits and custom functions. Of course, you will still be able to compile, simulate and transfer the protected program to the PLC as usual.

A protected file can be unprotected by selecting the "Un-protect" command from the "File" menu and supplying the unlocking password. Note that this unlocking password is strictly for un-locking the viewing restriction and it has nothing to do with other username and/or password required for interacting with the PLC.

This View Protection command is extremely useful for OEMs who wish to allow end users of their equipment to modify or append to the PLC's program for ease of interfacing to other equipment, but without revealing the core content of the PLC program to the end user.  Besides being able to protect the OEM's intellectual property, it will also help to prevent the end users from mistakenly modifying the core program which can lead to disastrous result.

7.     Write Compiled Code to Disk

This new feature is added since TRiLOGI version 5.32. You can now write the compiled program code to a disk file  so that you can send the compiled code (with a ".CO5" extension) to your end customer to upload to the M-series PLC using a standalone "TL5 Uploader" program. This allows you to protect your source program file content, while giving the end users of your equipment the ability to upgrade the PLC program. The end users DO NOT need to install the TRiLOGI or the Java JRE in order to use the TL5 Uploader program. so that makes it more flexible for you to distribute self-upgrade for the end users.

The TL5 Uploader program can be installed by first unzipping the "Install TL5 Uploader.zip" file found in your TRiLOGI Version 6.x  CD-ROM or obtain by emailing to "sales@tri-plc.com" and then run the "Setup.exe" program. Please note that the "TL5 Uploader" is a copyrighted program and Triangle Research International is the copyright owner of this program. However, Triangle Research International authorize the licensed users of the Internet TRiLOGI version 5.xx software to freely distribute the "Install TL5 Uploader.zip" program to their end users at no charge.

Note: Although TRiLOGI version 6.x supports Unicode for its user-interface, the compiled code produced by TL6 is identical to that of TL5 and  therefore the compiled file is still saved in ASCII format. To maintain backward compatibility the "Write Compiled Code to Disk" function still produces ".CO5" file that can be uploaded using the TL5 Uploader" program.

8.     Print

For TL6 Application (not Applet), you may use all the printing resources supported by your O/S to print a selectable range of the ladder diagram, the I/O Tables or the custom functions. When executed the following "Print Control Panel" will appear:

filemenu1.gif (6589 bytes)

To print, first select the item from the choice box and define the range you wish to print and then click on the "Print" button. For "Ladder Circuits", the range indicates the circuit numbers. For "I/O Tables", the range indicates the I/O number (up to 256) and for "Custom Functions", the range is the function number.

You can use the "Print preview" button to check the pagination of the printing on screen. You can select paper size and print orientation. etc. by clicking the "Page setup" button.  Empty custom functions will be automatically skipped to save paper. When you select to print the "Ladder Circuits" a special "Width" textbox appears. This textbox is for you to enter  the maximum number of series element that can be printed on the paper width. Changing this number affects the scaling of the ladder diagram when printed. The smallest number is 5 and largest number is 13. Use a smaller number if you wish to have a larger printout. However, please note that if your ladder program contains circuits with more elements than that indicated by the "Width" parameter the "out-of-page" part of those ladder circuits will not be printed.

Note: The  "Print" function requires the support of Java 2 JVM (which is provided by Java Runtime Environment version 1.4.2 when you installed it) but most browsers to-date do not yet not support Java 2 unless with a special Java plug-in. It is for this reason that the "Print" function is disabled when you run TRiLOGI as an Applet.

9.     Exit

Execute this command to exit orderly from the TRiLOGI program. You will be prompted to save the current file if the contents have been edited and the changes have not yet been saved.