# PLCEdit Help

version : 200.04
author : M. Rehfeldt
copyright: (c) 2005-2009

# Content About PLCEdit Quick Guide The Main Window Menu File Menu Edit Menu View Menu Tools Menu Help The Session manager The Find and Replace Dialog The File View Dialog The Preferences Dialog Interface Editor Sessions Save Print Advanced The POU Info Dialog The Batch Converter The Function block dialog Keyboard Shortcuts |

# About PLCEdit

PLCEdit is a powerful notepad to edit PLC source code. According to the IEC61131-3 standard the available programming languages are IL (Instruction List) and ST (Structured Text). PLCEdit supports the following POU sources: program, function block, function and global variable list.
The program files and the function blocks are named as POU files. Program organisation units (POU) are language elements of a PLC program and contain the program code. PLCEdit supports clean POUs, Moeller SucoSoft files, CoDeSys V2.3 export based files, Siemens Instruction List and Structured Control Language (SCL) sources and KW-Software IL and ST sources.
To compile the source code or sending it to a PLC, the actual development environment of one of the distributors above is still needed. The program is a notepad and could be used for editing POU compatible files and does not contain any hardware components.

# Quick Guide

### POU handling: new, open, save, edit

PLC contains a File menu, a Edit menu, a View menu, a Tools menu and a Help menu.
To create a new POU use the main menu File and its submenu New which provides different kinds of POUs, according to the IEC61131-3 standard. A syntax highlighter colors correct written commands on both input windows.
File opening by drag&drop is also provided. PLCEdit detecs the correct POU type and will collect all data for later usage. The POU type can be changed from the submenu alter POU type.
The menu items save and save as will open a platform specific file save dialog, which allows to select the location and the extension.
The Edit menu has the same functions like in other notepads. Notice: Only the find function works through both input windows. The other menu items can only be used fo the current selected input window.

### Switch the programming language: IL, ST

The programming language can be changed from INSTRUCTION LIST (IL) to STRUCTURED TEXT (ST) by using the submenu programming language in the main menu Tools.

### Batch converter: convert files with manufacturer specific flags

The batch converter can be called by the menu batch converter in the main menu file. It copies all opened files to a selected path with including manufacturer specific headers and other needed flags. The file extension/manufacturer specification can be selected by a rollbox. It is also possible to copy all opened POUs to a shared folder by selection "only copy". The path can be selected from a platform specific path dialog on the button "...".

### Session manager: save link lists of POUs

The session manager is a simple function to create a file with a list links (path of the opened POUs) in one file. This file can be used to restore all included files into PLCEdit. It is useful for folder based file version management or project handling.
To get a link list of the current files in PLCEdit use the submenu save session from the menu Sessions or press Ctrl+Alt+F11.
To restore a session open the session manager from the menus sessions or with Ctrl+F11 and select a file from the list at the dialog. If a POU from the link list cannot be found the session error list will be shown to tell you the expected path as a hint were to find the file.
For more information read this help document or visit the website PCEdit.org and have a look at the FAQ.

# The Main Window

The main window comes with a menu, toolbars and a statusbar on the bottom. The statusbar shows the current page number of all pages, the POU type, the POU programming language and the cursor position at the declaration section and the instruction section.
If a new file was created or opened the tab control element will be shown. All pages will be arranged in tabs. A file list on the left main window side assists the user to find a file and bring to it to the front. Closing files can be done by clicking on the red-white cross on the right side of the tab bar.

## Menu File

### New

Program, Functionblock, Function files and global variable lists will be created with the submenu items of the item New. The file will be opened in a new tab. A click on Function opens a dialog for the function type selection.
The variables window and the code window will contain header comments with information about the program. Words in capitals are used as place holder and can be replaced by own names. The variables window contains the typical declarations frames.

### Open

The menu item Open uses the platform specific dialog for opening POU-compatible files. It supports Moeller Sucosoft POU files, CoDeSys V2.3 export based files, Siemens Instruction List and Structured Control Language (SCL) sources and KW-Soft export files (.IL, .ST). The file will be shown in a new page. PLCEdit offers drag&drop to open files easily. If three or more files will be opened at the same time, a progressbar will be shown. PLCEdit does also support files which contains more than one POU (eg. CoDeSys export files).

### POU Info

With the dialog POU Info it is possible to set specific facts of a POU file like Project, Name, Developer, Date etc. and an insertion of a file comment in the Sucosoft KM header and at the top of the code section. The dialog shows the prototype of the POU, too. Only Moeller Sucosoft files and undefined files (new created and unsaved files) can use the POU Info dialog.

### Alter POU type

The active page can be changed from any to a Program, Functionblock or Function. False Function Types selections can be fixed easily by using this submenu item.

### Sessions

The menu Sessions contains the sub menus Manage Sessions and Save Session. All actual pages can be saved as a Session. It is also possible to load another Session. The Sessionsmanager shows all Sessions in the installation path PLCEdit\Sessions.
A Session file contains only links to the original files. If an original file cannot be found, the opening is not possible and a failure information will appear. Untitled/new created pages can not become a part of a Session file. After saving the new file it can be grabbed from the Session function.

### Save

The menu item Saves will save the actual file. If a new file has been created the platform specific save dialog appears instead.

### Save As

With Save As the file can be stored with a new name. The platform specific save dialog appears.
The file extension implements the compatibility to a PLC system. It supports Moeller Sucosoft POU files, CoDeSys V2.3 export based files, Siemens Instruction List and Structured Control Language (SCL) sources and KW-Soft export files (.IL, .ST).

### Batch converting

The menu opens a special dialog to convert and save all opened files with the supported extensions (text, POE, EXP, AWL, SCL, IL, ST). If the current files in PLCEdit should only be saved to a shared folder use the box item 'only copy'. The shared folder can be selected on the path dialog.

### Print

Print shows the platform specific print dialog for printing the current file. See the preferences dialog to manage the content of the prints.

### Export as PDF

Export as PDF saves the current file as PDF document.

### Close page

Close current file/page.

### Close all pages

Close all files/pages.

### Quit

Quit the program.

## Menu Edit

### Undo

This menu item revokes the last typing.

### Redo

The menu Redo repeats the last undo.

### Cut

The selected chars will be cut out off the text.

### Copy

The selected text will be copied by using the clipboard.

### Past

Text from the clipboard will be inserted in the inputwindow at the actual cursor position.

### Select All

Selects the whole text in the actual inputwindow.

### Find

This menu opens a dialog with an input file for a search item and a replace item. If the replace filed is empty the function will only try to find the search word.

## Menu View

### Window horizontal split mode

The input windows will be splitted horizontal.

### Window vertical split mode

The inputwindows will be positioned vertically.

### Show Declarations

The declarations inputwindow can be shown and hidden.

### Minimize

The minimize command minimizes the window to the Windows® TaskBar or the Mac OS X Dock.

### Zoom

Zoom will maximize the application window.

### Show File list

To get more space for the inputwindows the file liste on the right application side can be switched off.

### Change Input window

The cursor can be moved to the oppsite inputwindow by using this command.

### Show File content

The menu opens a dialog to show the complete file content (same as if the menu save would be used) depending on the selected file extension.

## Menu Tools

### Programming language

Using the submenu items the programming langauge can be change from IL to ST for the current file and all new files. Already opened files will be left untouched.

### Insert Function block

The menu item opens the function block insert dialog, which shows all opened function blocks.

### Preferences

Selecting the menu item Prefrences will open the preferences dialog to setup the application, eg. interface and save handlings.
This menu item is shown on the menu PLCEdit on Mac OS X.

## Menu Help

### About

The about PLCEdit dialog will appear.
This menu item is shown at the applications menu on Mac OS X.

### Send bug report

The standard e-mail program will be opened with a prepared new e-mail to send a bug report to the PLCEdit developers.

# The Session manager

The session manager shows all sessions in the PLCEdit Sessions folder. The buttons load and delete are self explaining. Sessions can be created by using the menu save session at the file menu or by using the button save at the session manager. Only already stored pages will be collected by the session save routine. The auto close checkbox can be used to enforce closing the dialog if the selected session was loaded. The error list will be shown if a link in the session file is broken. The list shows the name and the expected location.
Sessions contains links to POU files on the current PC - regarding this the sessions are not necessarily portable. Some sessions settings can be defined at the preferences dialog (eg. save autosession as project, start with session manager).

# The Find and Replace Dialog

The find and replace dialog can be used to find search items if the replace inputfield is leaved empty. If the replace field is filled all find items will be replaced. The checkboxes 'Case sensitive' and 'Match whole word' can be used to isolate the find item.
The routine can be switched forward and backwards. If the find item cannot be found, a message appears at the dialog to inform the user, that the routine has switched to the opposite input window.

# The File View Dialog

The file view dialog can be used to check the whole file content regarding the selected file type. It is a useful function for developers, who have problems with the compatibility of some files, because it shows the content of a possible outputfile.

# The Preferences Dialog

The preferences dialog can be used to setup the application. The dialog contains three function buttons.
Default will reset the application to the standard settings. Ok will set all inputs and close the dialog. Cancel will close the dialog without any changes. Apply will set all changes without closing the dialog.

## Page Interface

### Main Tools

The main tools option switches the main toolbox in the main window ON and OFF.

### Commands

The commands option switches the programming language commands toolbars ON and OFF.

### File list

The file list on the left main window side can be shown and hidden with the option.

### Split mode

The arragement of the inputwindows can be defined with this option.

### Tab orientation

The orientation of the page tabs can be changed by selection a direction from the rollbox.

### Language

The language rollbox shows all installed languages. The interface language will be cahnged by using the buttons Ok or Apply.

## Page Editor

### Programming language

The IEC61131-3 programming language can be preselected with this option.

### Syntax highlighter

The syntax highlighting function can be switched ON and OFF with the checkbox.

### Font

The rollbox shows the available system fonts, which can be used by PLCEdit.

### Font size

The Fontsize can be defined between 6 and 20.

### Tab width

Some IDEs uses special tab width values to arange the source code. PLCEdit support tab width values from 2 blanks to 99 blanks.

## Page Sessions

### Session autosave

All links to the current pages will be saved in a session file automatically at the end of program.

### Autosave as project

All current pages will be saved in a session folder and with a special session file automatically at the end of program.

### Start with session manager

PLCEdit starts up with the session manager in front.

### Session autoload

PLCEdit loads the automatically created session file at start up.

### Session error list

PLCEdit shows the session manger error list if files from the sessions cannot be found and loaded.

## Page Save

### Save with prototype

The save routine will store a prototype file (.PTT) in addition to the POU.

### Auto save

Selecting the autosave option will activate the save routine for all files enforced by the timer value Autosave interval.

### Auto save interval [min]

The interval for the autosave timer can be selected between 1 minute and 99999 minutes.

### Use the following path a standard

This option enforces the open and save dialogs to use the path in the inputfield. A path can be selected by using the '...' button.

### Sucosoft compatibility

The Sucosoft POU compatibility flag can be set for version 4.x or version 5.x

## Page Print

### Declarations

The checkbox tells the print dialog and PDF export function to print the declarations section.

### Instructions

The checkbox tells the print dialog and PDF export function to print the instructions section.

### Prototype

The checkbox tells the print dialog and PDF export function to print the prototype.

### POU Info

The checkbox tells the print dialog and PDF export function to print the POU info data.

## Page Advanced

### Use prog. language detection for .txt and .exp

The checkbox activates the programming language detection for plain POUs and CoDeSys sources.

### Soft function block call model list

The checkbox enables sorting of the function block insert dialog. Sorting could may create confusion, if two or more blocks have the same name.

### Use simple IEC call model

The checkbox forces the function block insert routine to use the simple IEC call model. If the item is unchecked the call model will depend on the current POU type.

# The POU Info Dialog

The POU info dialog can be used by Sucosoft files to include some specifications about the developer and other informations. The dialog shows also the POU prototype.

## POU Info

The POU info site contains inputfields for some file details.
Next a editfield can be used for longer texts. The check box at the bottom tells PLCEdit to include the editfield text into the instruction section as a comment.

## POU Prototype

The prototype shows all Input, Output and InOut variables.

# The Batch converter

The batch converter is a simple file copy function which left the instructions and declarations untouched. The converter does only add or remove IDE (Sucosoft, S7, CoDeSys, KW-Software etc.) specific parts to make the files compatible. The dialog shows a rollbox to select the file extension/compatibility and a path inputfield. The path can be seleced by the '...' button. A progressbar shows the batch processing.

# The Function block dialog

The function block dialog shows all opened function blocks. The selected function block can be inserted with its call model and the data types of its inputs and outputs. The function blocks will be inserted with a call model format according to the current page. The preferences page Advanced contains some additional parameters for the function block dialog (eg. It is possible to enforce a simple IEC call model).

# Keyboard shortcuts

PLCEdit provides some keyboard shortcuts to makes the user input handling more easier.
The shortcuts are based on well known platform specific shortcuts on Windows, Linux and Mac OS X.

### Shortcut | ### Description
Menu File
Ctrl+Alt+P | Create new PROGRAM POU
Ctrl+Alt+B | Create new FUNCTION_BLOCK POU
Ctrl+Alt+F | Create new FUNCTION POU
Ctrl+Alt+L | Create new GLOBAL_VARIABLE_LIST POU
Ctrl+O | Open a POU
Ctrl+I | Open the POU info dialog
Ctrl+F11 | Open the session manager
Ctrl+Alt+F11 | Save current files-links into a session file
Ctrl+S | Save the current POU
Ctrl+Alt+S | Save the current POU with new name
Ctrl+D | Open the batch converter
Ctrl+P | Print current POU
Ctrl+W | Close current POU
Ctrl+Alt+W | Close all POUs
Ctrl+Q | Quit PLCEdit, On Mac OS X this shortcut is moved to the application menu "PLCEdit"
Menu Edit
Ctrl+Z | Undo last change
Ctrl+Y | restore last undo
Ctrl+X | Cut selected text
Ctrl+C | Copy selected text
Ctrl+V | Insert text from clipboard
Ctrl+A | Select all text at the current inputwindow
Ctrl+F | Find and/or replace the selected text
Menu View
Alt+BACKSPACE | Hide declarations inputwindow
Ctrl+M | Minimize application window
F4 | Show file list on the left application window side
Alt+TAB | change cursorposition to opposite inputwindow
F7 | Open file view dialog
Menu Tools
Ctr+F12 (Windows + Linux) Ctrl+, (Mac OS X) | Show preferences dialog On Mac OS X this shortcut is moved to the application menu "PLCEdit"
Ctrl+B | Open function block dialog
Menu Help
F1 | Show application help