i-TRiLOGI Ladder Logic Editor
i-TRiLOGI's ladder logic editor window lies between the main menu bar along the top of the screen and the help message line along the bottom of the screen. The cursor will appear in the window whenever you are in the logic editor. The ladder logic editor comprises two modes: the browse mode and the circuit editing mode. We shall explain the operation of both modes
You are normally in the browser mode when you start up the program. The browse mode allows you to manipulate the whole ladder logic circuit as a single entity: you can view any circuit, make copies of it, move it to another location or delete it entirely. Each complete ladder logic "circuit" is given a circuit number. You should see a small red color marker showing you the currently selected circuit. The circuit number of the selected circuit is shown on the upper status line as "Circuit # xxx ".
Mouse Actions
Since i-TRiLOGI Version 6 runs under windowing environment, all usual mouse action applies. You can grab the vertical scroll bar to scroll to your desired circuit and click on it to select it. Double click on a circuit enters the Circuit Editing Mode which will be described later.
Keyboard Actions
The functions of various keys in the browse mode are explained below:
<Spacebar> - Allows you to enter circuit editing mode for the currently selected circuit. If the selected circuit is a comment circuit, the comment editor will be opened automatically.
<F1> - Activates the context-sensitive help function to display on-line help.
<F2> - Opens the I/O Table to create the I/O Label Names
<F3> - Turns ON/OFF display of the I/O type and the physical I/O number for ladder logic contacts on the screen (The physical I/O number is now linked to the labelname). All ladder logic contact symbols are normally identified by their label names. However, you can also display an optional small literal to indicate the I/O types and number. e.g. i1=input 1, o12=output 12, r25= relay 25, t1= timer 1 and c5=counter 5.
<F5> - Refreshes the display. If for some reason the screen is garbled by incomplete circuit display, you can just press the <F5> key to redraw the screen.
<F7> - Opens any custom function. If the currently selected circuit contains a custom function, then it will be opened for editing. Otherwise i-TRiLOGI will ask you to select a custom function # from a menu.
<F8> - Compiles the i-TRiLOGI program to show the compilation statistics.
<F9> - Runs the simulator without resetting any I/O.
<Ctrl-F9> - Resets all I/Os and then runs the simulator.
<Ctrl-F8> - Resets all I/Os except inputs and then runs the simulator.
<Up>/<Dn><PgUp> and <PgDn> keys - Use the up/down cursor keys to move the marker to other circuits and the "Circuit #" display at the upper status line will simultaneously reflect the change. If you attempt to venture beyond the screen, the logic editor screen will scroll. The <PgUp> and <PgDn> keys can be used to scroll one page at a time.
Navigating Circuits in Browse Mode
Although most of the time you will probably be navigating the ladder circuit diagram using the scroll bar or cursor keys to find the circuit that you are looking for, there exist several short cuts to enable you to quickly jump to specific circuits in the program. E.g. If you select "Goto" from the "Edit" menu, you will be prompted by a Goto Circuit window to enter the circuit number to jump to immediately. You can also call up the Goto Circuit window by pressing <Ctrl-G> key anytime.
If you have a large ladder program with multiple rungs of circuits, then you will find the Bookmark feature very useful for quickly jumping from one circuit to another. The bookmarks appear as blue button along the top of the i-TRiLOGI editor windows: You can define up to five bookmarks by clicking on , each bookmark corresponds to a specific circuit #. By default all 5 bookmark points to circuit #1. Once you have defined the circuit # for a bookmark, then when you click on the bookmark button the editor instantly jumps to the pre-defined circuit number.
When you click on , the following window will appearYou can select the bookmark No. either from the choice box or by clicking on the blue bookmarks , Then enter or edit the circuit # to associate with the selected bookmark. You can optionally enter/edit a description for the bookmark to help you recall the purpose of that section of ladder circuit which the bookmark is associated with. Then click the button to update the circuit # and description at the corresponding bookmark location.
NEW! In i-Trilogi version 6.2 and later the bookmark you have created will be displayed in the corresponding ladder circuits. New programs created will set all the bookmarks to a default value of 0 so that no bookmarks are displayed until they have been manually created.
NEW! In i-Trilogi version 6.2 and later there is a feature that allows you to immediately go the last circuit that was selected. This is implemented by clicking on the button that is located beside the bookmark buttons, which are described above. Whether you move to a new circuit by using the "Goto Circuit" command or a bookmark or just by clicking on a circuit with the mouse, the "Last" button will remember your last circuit position. This also allows you to easily switch back and forth between two circuits an unlimited number of times because if you don't select a new circuit after pressing the "Last" key, you will go back to the circuit you came from.
Note: The bookmark definitions are saved along with the program body into the .PC6 file, which means that the bookmark that you defined for a particular program can be recalled later when you open its .PC6 file.
II. The Circuit Menu |
Insert Comments
Comments are specific remarks used by a programmer to explain various characteristics of a program segment and are ignored by the compiler. i-TRiLOGI Version 6 allows comments to be freely inserted between circuits. Execute this command and the Comment Editor will be opened. The comment editor allows you to enter any text you like that best describe the working of the circuit. All standard text editing keys, including cut and paste are applicable to the Comment Editor. When you have finished editing the comments, click "OK" to accept the changes and to close the comment window or click abort to cancel the changes and close the comment window. Alternatively, you can press the <ESC> key to accept the changes and close the comment window.
Once a comment has been created, it is assigned a circuit number and is treated like any other circuits. You can edit it by pressing the <spacebar> when you are in Browse mode, alternatively, you can move it around, copy it to another destination or delete it entirely using commands in the "Circuit" menu.
Insert Circuit
This command enables you to insert a new circuit just before the currently selected circuit. The current circuit number will be increased by one while the new circuit will assume the current circuit number. You will be placed in the circuit editing mode for immediate circuit creation.
Move Circuit
You can rearrange the order of the circuits by using this command. Select the circuit you wish to move and execute the "Move Circuit" command, then select a destination circuit location and press <Enter>. The selected circuit will be moved to the new location before the destination circuit.
Note that if you wish to move a block of circuits to a new location, you may find it more productive to use the "Cut Circuit" and "Paste Circuit" commands in the "Edit" menu.
Append Circuit
Execute this to add a new circuit to the ladder logic program. This new addition will be positioned immediately after the last circuit in the entire program.
Delete Circuit
This command allows you to delete the one or more circuits. You will be prompted to enter the range of circuits that you wish to delete. Please note that you can't UNDO a delete circuit operation.
III. The Edit Menu |
Cut Circuit
You can remove a number of circuits from the current ladder program and store them temporarily in the clipboard for pasting into another part of the present ladder program or into another file altogther. In other words, it lets you move a block of circuits from one part of the ladder program to another part or into another file. Please note that you can't UNDO a Cut Circuit operation. However, if you do make a mistake you can always paste it back in its original position.
Copy Circuit (Ctrl-C)
You can copy a block of circuits from the current ladder program and store them into the clipboard for pasting into another part of the present ladder program or into another ladder program file altogther.
Paste Circuit (Ctrl-V)
When you execute this command, the block of ladder circuit which you "Cut" or "Copy" into the clipboard will be pasted just before the currently selected circuit. The current circuit number will be adjusted to reflect the change.
Find (Ctrl-F)
The Find command allows you to quickly locate a ladder logic circuit that contains a particular label name. The Find command can also be used to search for a keyword in a TBASIC program. When this command is executed, you will be further prompted to select the option of searching for a ladder logic label or a text in a Custom Function.
Goto (Ctrl-G)
Use this command to move towards a specific circuit number. The "Goto" command is particularly useful if your program contains many circuits, and it is inconvenient to search for a particular circuit using the mouse or the cursor keys.
i-TRiLOGI comes with a smart editor which allows you to insert or delete a single element within a circuit easily. The editor interprets your circuit immediately upon entry and prevents you from creating illegal circuit connections. The functions of various keys in the circuit editing mode are detailed below. You know that you are in the circuit editing mode when a row of ladder logic icons appears along the upper status line next to the circuit number and a yellow color highlight bar appears and you can move it to select an element in the ladder circuit, as shown below:
Mouse Actions
Left Click - When you click on an element using a the left mouse button, the element is selected and highlighted by the yellow color highlight bar.
Right Click - When you click on an element using the right mouse button, you are allowed to directly edit the label name of the element. This can be a convenient feature if you need to change one or two characters in the name only. However, if the element is a custom function [dCusFn], or [CusFn], then the custom function editor will be opened for you to edit the function directly.
Insert Ladder Element - You create the ladder circuit element simply by moving the mouse pointer to the icon and pressing either the left or the right mouse button to insert a ladder logic element to the currently highted element. The following is a description of the functions of each icon. A yellow color highlight bar will appear which you can move to select an element in the ladder circuit.
<1> - Left click to insert a normally-open series contact.
<2> - Right click to insert a normally-closed series contact.<3> - Left click to insert a N.O. parallel contact to highlighted element
<4> - Right click to insert a N.C. parallel contact to highlighted element<5> - Left click to insert a N.O. parallel contact to enclose one or more elements.
<6> - Right click to insert a N.C. parallel contact to enclose one or more elements.<7> - Insert a normal coil which may be an output, relay, timer or counter. <8> - Insert a parallel output coil (not an entire branch) to the current coil. <9> - Insert a special function coil which includes execution of CusFn <0> - Insert a parallel special function coil to the current coil. </> - Invert the element from N.O. to N.C. or from N.C. to N.O. <^> - Convert the element to a rising-edge triggered contact (one shot) Click to move the highlight bar to the right (same effect as pressing the right arrow key).
This can be used to move the cursor to a junction which cannot be selected by mouse click.Double-click to delete a highlighted element. This acts as a safety against mistake. When you click on an icon, for example, the . The icon will change to bright yellow color to show you the element type that you are creating. At the same time, an I/O table should appear on the screen with a light beige-color background. The I/O table acts like a pop-up menu for you to pick any of the pre-defined label name for this contact. This saves you a lot of typing and at the same time eliminates typo errors that could result in a compilation failure. You should spend a few minutes to follow the "Ladder Logic Programming Tutorial" on the steps needed to create a ladder program.
As mentioned previously, the ladder editor is intelligent and will only accept an action that can result in the creation of a correct ladder element. Otherwise it will simply beep and ignore the command.
UNDO Circuit EditingIf you have wrongly inserted or deleted an element and wish to undo the mistake, you can either select "Undo" from the "Edit" menu or press <Ctrl-Z> key to undo the last step. The undo buffer stores the last 10 editing steps. You can also choose to abort all the operations on the current circuit by selecting "Abort Edit Circuit" to abort all changes made to the current circuit.
Create Ladder Circuit Using The Keyboard
Users of existing TRiLOGI version 3.x or 4.x who are familiar with creating ladder programs using the keyboard will be delighted to know that they can still create their ladder programs using the keyboard. The keyboard actions are described below:
Left/Right/Up/Down cursor keys
The cursor keys are for moving the highlight bar from one element to another in their four respective directions. You can only move in a direction which will end up with an element.
<ESC>
Press <ESC> key to end the circuit editing mode and return to the browse mode of the logic editor.
<Enter>
When you are done with editing the current circuit, hit <Enter> to proceed to the next circuit.
<SHIFT> (or <TAB>)
If you observe the highlight bar carefully, you will notice a dark green color square at the right end of the highlight. This indicates the insertion location where a series contact will be attached. You can change the insertion location to the left or the right of the highlight bar by pressing the <SHIFT> key. (Note: prior to Version 5.32 only the <TAB> key was used for this purpose, but <TAB> key does not work on JRE 1.4.x so we added the <SHIFT> key to achieve this action).
The position of the insertion point has no effect when you connect a parallel contact to the highlighted element. The left terminal of the element will always be connected to the left side of the parallel branch.
<0> to <9> , </> & <E> keys
Pressing the key <0> to <9> and </> is equivalent to clicking on the icon shown in the table. The equivalent keyboard number is shown as a small numeral at the lower right corner of the icon. The </> key is the quickest way of converting a normally-open contact to a normally-closed one (and vice versa).
Pressing the <E> key when a contact or coil is selected allows you to edit the label name directly. Note that it is the user's responsibility to ensure that the label is valid.