PLCEdit Help

version
author
copyright
: 223r122
: M. Rehfeldt
: (c) 2005-2015



Content


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




About PLCEdit


PLCEdit is a powerful notepad to edit PLC source code. According to the IEC 61131-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.




Quick Guide

POU handling: new, open, save, edit

PLCEdit 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 sub menu New which provides different kinds of POUs, according to the IE C61131-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 sub menu 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 sub menu programming language in the main menu Tools. The source code will not translated into the new language.

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 lists of POU paths

The session manager is a simple function to create a file with a paths list of the opened POUs. 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 paths list of the current files in PLCEdit use the sub menu 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 paths 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.







The Main Window


The main window comes with a main 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. The file list on the left main window side assists the user to find a file and bring to it to the front. The tabs are movable. This feature can be used to arrange the tabs according to user requirements.

Main window on Win32

Menu File

New

Program, Functionblock, Function files and global variable lists will be created with the sub menu items of the menu New. The POU will be created as a new tab. A click on Function opens a dialog for the function type selection.
The declarations window and the instructions 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 sub menu 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.

Recent files

The menu Recent files opens a sub menu, which contains a number of closed POUs. Even if a POU will be closed, a link to the file will be prepend to the sub menu. If the application is terminated, the links of opened files and the list of recent files will be stored to the preferences file. The recent file list is a ring buffer with a miximum size of 100 files.

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 which suggests a POU extension and a file name regarding the default POU extension and the page name.
The selected 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. The batch converter only insterts or take tags to make the files compliant. Funtion block calls or other platform or programming language specific code lines will be left untouched.

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.

Show File list

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

Minimize

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

Zoom

Zoom will maximize the application window.

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

The programming language can be change from IL to ST for the current file by using the sub menu items. Already opened files will be left untouched. New files will come with the selected programming language at the preferences dialog.

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

Help

The menu item opens the PLCEdit help browser.

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.

Check for updates

A search for program updates will be performed.

About

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





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


Preferences page interface on Win32

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


Preferences page editor on Win32

Programming language

The IEC 61131-3 programming language can be selected with this option and will be used for the current an all new created pages.

Use prog. language detection for .txt and .exp

The checkbox activates the programming language detection for plain POUs and CoDeSys sources. Moeller POU sources have its own programming language tag in its header and the language detection of Siemens and KW-Software sources depends on the file extension.

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.

Highlight current line

Sometimes it could be useful to highlight the current cursor position. PLCEdit comes with such a function, which can be switched with a checkbox and set by a color picker. Using to lighten or to dark colors will switch off the current line highlighting function.


Page Sessions


Preferences page sessions on Win32

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.

Sessions path

This option can be used to cahnge the path were session files will be stored. Be carefully with this option to prevent loosing data. To reset the path to its default value clear the path input or use the button Default at the preferences dialog or.

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


Preferences page save on Win32

Notification for unsaved files

Shows a notification for unsaved files if one or all pages gets closed.

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.

Interval

The interval for the autosave timer can be selected between 1 minute and 999 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.

Default POU extension

The rollbox can be used to set the default extension for new POUs. This preset allows to switch ON some POU specific options by creating a new POU and is used for the save file dialog. It is also helpful if function block call models should be created and transfered by the clipboard.

Conversion of function block call model

This rollbox contains options accroding to the conversion of function block calls. This options are used by the file save routines. The batch converter has a similar rollbox but is not affected by this settings.


Page Print


Preferences page print on Win32

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.

Print area indicator

The print area indicator ca be used to show the printable width of a paper. The pixel width is set to 8 pixels per char. The standard setting 80 corresponds to a A4 paper in portrait mode. A value of 0 will hide the indicator.


Page Advanced


Preferences page advanced on Win32

Sort function block call model list

The checkbox enables sorting of the entries in 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.

Sucosoft compatibility

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

Recent files history

The spinbox can be used to set the size of the rinbuffer for the recent files history. The maximum size is limted to 256 files. The pushbutton Clear can be used to clear the history of recent files at the File menu, the list and in the preferences file. The clear routine will also be called, if the default setting are activated.

Check for updates during program start

The checkbox forces an update search during the program start.





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 path in the session file is broken. The list shows the name and the expected location.
Sessions contains paths 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).

Session manager on Win32






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. The replace all option works from the current cursor position up to the end of the current input window.
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 and waits for another hit on the buttons.

Find and Replace dialog on Win32






The POU Info Dialog

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

POU info dialog on Mac OS 10.5

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 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.

File View dialog on Win32






The Batch converter

The batch converter is a simple file copy function which left the instructions and declarations untouched. The converter adds or removes IDE (Sucosoft, STEP 7, CoDeSys, MULTIPROG, MELSOFT, etc.) specific parts to make the files compatible.
The converter also supports the conversion of function block calls. Therefore it is needed that the input and output section can be detected reliably.
The dialog shows a rollbox to select the file extension/compatibility and an inputfield for the storage path. The path can be seleced by the '...' button. A progressbar shows the batch processing.

Batch converter on Mac OS 10.5






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 data types and existing comments for the input and outputs can be included in addition to the call model.
The preferences page Advanced contains some additional parameters for the function block dialog (eg. It is possible to enforce a simple IEC call model).

Batch converter on Ubuntu






Compatibility

POU source compatibility

PLCEdit is compatible to export files of several integrated PLC development environments. The compatibility is basic and in some cases maybe not fully complete, but most files are read correctly.
A special attention is needed regarding the conversion of POU content. PLCEdit comes with a batch converter to export POU files into an IDE compatible format, but without translating the code accroding to a language change. Next a special converter tries to incease the compatibiliy during the file save procedure by transforming function block calls into te selected compatibility (batch converter and setup at prefernces dialog).
The following table gives an overview about the depth of compatibility.

supported IDE source files open / save FB call conversion details
plain POU
(eg. kirchner SOFT logi.CAD; infoteam OpenPCS)
*.txt yes / yes yes* OpenPCS .POE and .ST files are handled as plain POUs with extension .txt
CoDeSys v2.3 (3S) *.EXP yes / yes yes VISU stored; TYPE can be opened
MELSOFT (Mitsubishi) *.asc yes / yes yes* configuration data stored
MULTIPROG (KW-Software) *.IL, *.ST yes / yes no worksheet data stored
STEP 7 (Siemens) *.awl, *.scl yes / yes yes* DB data stored
Sucosoft S40 (Moeller) *.poe   yes / yes** yes POU info dialog for header data

(*) A function block call can converted if it consists of a standard call model within which the input and output section can be reliably detected.
(**) Sucosoft POE files contains a wrong checksum section in the file header. In this case the Sucosoft S40 Navigator marked the files as defective but they can be still handled by the Sucosoft.





Conversion of function block calls

A special converter tries to transform function block calls into the selected compatibility (can be selected in batch converter and at the prefernces dialog).
In some cases it is not possible to convert function block calls because some call models contains no delimiter for the input and output section or doesn't know any difference between the assigment of inputs and outputs. In this case a special platform independent delimiter can be used to work around this. Insert '(*outputs*)' in an own row between the input and output section of a function block call. PLCEdit can use this delimiter during the transformation of such function block calls.
Splitted function block calls or rudimentary IEC calls are very problematic. Notice: PLCEdit is not able to convert all function block calls and some transformation outputs can corrupt a lot of code lines - so please check the output!





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+Alt+T Create new TYPE definition
Ctrl+O Open a POU
Ctrl+I Open the POU info dialog
Ctrl+F11 Open the session manager
Ctrl+Alt+F11 Save current file paths as 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