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

    I.   The Browse Mode

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 and up 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:

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

  2. <F1> - Activates the context-sensitive help function to display on-line help.

  3. <F2> - Opens the I/O Table to create the I/O Label Names

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

  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.

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

  7. <F8> - Compiles the i-TRiLOGI program to show the compilation statistics.

  8. <F9> - Runs the simulator without resetting any I/O.

  9. <Ctrl-F9> - Resets all I/Os and then runs the simulator.

  10. <Ctrl-F8> - Resets all I/Os except inputs and then runs the simulator.

  11. <F11> - Zoom Out (applies to ladder logic and custom function editors, monitoring and view variables screens)

  12. <F12> - Zoom In (applies to ladder logic and custom function editors, monitoring and view variables screens)

  13. <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: laddereditor7.jpg (2282 bytes) You can define up to five bookmarks by clicking on laddereditor8.jpg (1641 bytes), 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 laddereditor8.jpg (1641 bytes), the following window will appear

laddereditor3.jpg (18743 bytes)

You can select the bookmark No. either from the choice box or by clicking on the blue bookmarks laddereditor4.jpg (713 bytes) , laddereditor5.jpg (18743 bytes)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.

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.

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 laddereditor10.jpg (1599 bytes) 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.

Quick Access Toolbar

Trilogi 6.5/7.1 and up now includes a quick access toolbar that allows for the following single click operations:

1) File Save
2) Find Ladder Element/TBASIC text
3) Online monitoring
4) Program Transfer
5) I/O Table Access
6) Custom Function access options
7) Zoom Out
8) Zoom In


     II.  The Menu Bar

       Circuit Menu

File

Edit

Controller

Simulate

Circuit

Help

 

     III.  The Circuit Editing Mode

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:

New File

Mouse Actions

One-Click Ladder Logic Navigation - Starting from version 6.50/7.10 it is possible to select an element with one click once the circuit is selected. This allows for easier navigation between elements within a circuit.

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 a highlighted element using the right mouse button, you are provided with a list of options including:

1) Rename - Edit the label name of the element.
2) Delete - Remove the element
3) Invert - Toggle NO/NC contact (applicable to contacts only)
4) One-Shot - Toggle between standard and 1-shot contact types (applicable to contacts only)
5) Differential - Toggle Function Type. Switch between {dCusF} and {CusFn} (applicable to custom functions only).
6) Open CusF - 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.
7) End Edit Mode - Revert back to Browse Mode

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.

tutorial1c3.gif (330 bytes)

<1> - Left click to insert a normally-open series contact. 
<2> - Right click to insert a normally-closed series contact.
tutorial1c4.gif (215 bytes) <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
tutorial1c5.gif (209 bytes) <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.
tutorial1c6.gif (197 bytes) <7> - Insert a normal coil which may be an output, relay, timer or counter.
tutorial1c7.gif (209 bytes) <8> - Insert a parallel output coil (not an entire branch) to the current coil.
tutorial1c8.gif (219 bytes) <9> - Insert a special function coil which includes execution of CusFn
tutorial1c9.gif (223 bytes) <0> - Insert a parallel special function coil to the current coil.
tutorial1c10.gif (216 bytes) </> -  Invert the element from N.O. to N.C. or from N.C. to N.O.
contac9.jpg (1489 bytes) <^> -  Convert the element to a rising-edge triggered contact (one shot)
tutorial1c11.gif (145 bytes) 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.
tutorial1c12.gif (153 bytes) Double-click to delete a highlighted element. This acts as a safety against mistake.

When you click on an icon, for example, the tutorial1c3.gif (330 bytes) . 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 Editing

If 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

It is also possible to create 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> 

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 and up, 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.