Topic: DMD0239

Project Browser


The Project Browser is a dockable, floatable view that uses a tree control to provide quick navigation to the different areas of a Do-more Designer project and the ability to create and edit Program, Task and System Task code blocks. The tree view has three root groups:
 

  • Control Logic - lists the Programs and Tasks in the project.
     

  • Each Program code-block in the list can be expanded to show each rung and each Stage (if present) within each code block.
     

  • Each Task code-block in the list can be expanded to include each rung in the Task .
     

  • If a rung comment exists for a Stage or rung, the first line from that rung comment will also be displayed.
     

  • Navigation to a specific Program or Task, or to a specific Stage or rung, is accomplished by double-clicking on that item in the list.
     

  • Configuration - lists the Data Blocks, Heap Items, and Devices defined by the current System Configuration.
     

    • The Memory sub-section lists:
      Discrete, Analog, & Specialty I/O modules
      System Status Bits, Status Words & Structure Memory
      PEERLINK, DL & Modbus Memory
      User Bit, Numeric & Structure Memory
      String Memory

 

  • The Forces sub-section lists memory locations and I/O points that are forced.

 

  • The Devices sub-section lists all of the system-created and user-created Devices.
     

  • The Unassigned Nicknames sub-section lists any Nicknames that have not been assigned to a controller memory element

 

  • Tools - contains links to some of the tools that are most commonly used during programming sessions. The list also displays the currently logged-in user account and the permissions of that account.

 

 

When the Status is turned ON, the Control Logic portion of the Project Browser additionally shows the Enabled / Disabled / Suspended status of each of the Task and Program code-blocks. For Programs that include Stage instructions, there is also Enabled / Disabled status for each Stage in that program.

 

With Status turned ON:
 

  • Code-blocks that are  Enabled  (that is, they are part of the current controller scan) will be displayed with a cyan background. Code-blocks that are disabled will be displayed with a normal background.
     

  • Program code-blocks that have Stage instructions will display the Stage instructions that are  Enabled  will be displayed with a cyan background. Stage instructions that are disabled will be displayed with a normal background.
     

  • Code-blocks that are  Suspended  will be displayed with a yellow background. Code-blocks that are not suspended will be displayed with a normal background.
     

  • Code-blocks that were  Enabled  when the controller last made a transition from RUN mode to STOP mode will be displayed with a gray background.
     

  • Code-blocks that are locked will display a lock in the graphic to the left of the code-block's name

 


The six buttons across the top of the Project Browser window and the Right-Click menu contain options that define how the Project Browser will display the root groups, their sub-groups, and the lists of data elements found there.

 

 

 A discussion of each button's functionality follows:


 

 

Control Logic Filters

The first button is Filters, which opens the Control Logic Filters dialog which defines the following module display options:

 

General
 

  • Show Unused System Tasks - enable to display the Unused System Tasks group and any unused System Tasks in that group
     

  • Show Nicknames - enable to display the Nickname instead of the code-block name for code-blocks that have them

 


Ladder Code Blocks
 

Show Rungs - when enabled, a placeholder for each rung in a Program or Task will be displayed in one of the following ways:

 

    • Show All Rungs - Rung Numbers Only
       

    • Show Only rungs that have a rung comment
       

    • Show All Rungs - rung numbers and any rung comments

 


Click OK to save any changes.

 

Click Set As Default to save any changes and make these settings apply to future projects.

 

Click Cancel to exit without saving any changes.

 


Creating New Programs and Tasks

The second button is Create New Program/Task which opens the Create New Program or Task dialog which defines the following options:

 

Create a Program - program are code-blocks that are run by the event-triggered Run Program (RUN) instruction. Programs can be self-terminating or never terminate. Stage programming instructions can only be used inside Program code-blocks.

 

Create a Task - Tasks are code blocks containing ladder logic that is enabled or disabled using the Enable Task (ENTASK) instruction. The Enable Task (ENTASK) instruction allows the Task to execute at intervals, specified at millisecond resolution.

 


Click Create to create the new code-block.

 

Click Cancel to exit without creating the code-block.

 

Code-Block Configuration

Each time that a new Program or Task is created, the Code-Block Configuration dialog is automatically opened to setup the configuration for that code-block. It is also available on the right-click menu for a code-block.

 

Name - displays the name of the code-block

 

Initial .TimeSlice - specifies the initial value for the code-block's .TimeSlice structure member. The .TimeSlice value defines how the code-block will handle any looping instructions that are in the ladder logic in the code block.

 

Looping instructions in ladder logic (FOR / NEXT, WHILE / WEND, REPEAT / UNTIL, GOTO / LABEL) have the potential to cause problems during the controller's scan, ranging from variations in the scan times to infinite loops. Do-more controllers employ a mechanism - called 'yielding' - to manage this problem by allowing individual code-blocks to specify how much processor time per scan to allow looping instructions contained in the code-blocks to execute before they 'yield'. When a code-block yields it will suspend execution of a looping instruction during the current scan, and will begin executing the looping instruction on the next scan, taking up right where it yielded. The amount of time allotted for loop execution in a code-block is called the TimeSlice and the value is stored in the .TimeSlice field of each code-blocks's structure.

 

The code-block's .TimeSlice value will be set to this Initial TimeSlice value on every PROGRAM mode -to- RUN mode change. The code-block's TimeSlice value can be changed at runtime by modifying the .TimeSlice structure member.

 

  • Never Yield (except at YIELD instruction) - selecting this option will cause the code-block to run to completion. This selection will cause each loop to complete each time the code-block is executed. The only exception is if the code-block contains an explicit Yield Program or Task (YIELD) instruction.

    Note:
    This selection will cause the loops to complete in the least amount of time possible, but has the most potential to vary the scan time.

 

Note: Selecting 'Never Yield' results in a .TimeSlice value of 65535
 

  • Always Yield at each "yielding" instruction - selecting this option will cause the code-block to stop execution on each scan at each yielding instruction in the code-block. "Yielding" instructions include Index by Step (NEXT), While End (WEND), Repeat Until Condition is Non-Zero (UNTIL), and Yield Program or Task (YIELD).  This selection will execute exactly one pass through each loop on each scan.

    Note:
    Selecting 'Always Yield' results in a .TimeSlice value of 0
     

  • Yield Every XXX microseconds - selecting this option will cause the code-blocks to execute the looping instructions for the user-specified amount of time, then yield once a yielding instruction is reached. This value can be any integer constant between 1 and 65534.

 

Note: For more information on using the .TimeSlice value to manage the impact that looping instructions have on the controller's scan time, see the help topics on Effectively Using Programs and Effectively Using Tasks.

 


Click OK to save any changes.

 

Click Cancel to exit without saving any of the configuration changes.

 

Code-Block Protection Level

Optionally allows the programmer to secure the contents of user-created code-blocks from being viewed and/or from being edited by means of a password and encrypting the code-block contents. This dialog will show the current state of the protection and allow the programmer to set the protection level that will be enforced once the dialog is closed or the project is closed.

 

Full Access - (the default value) - the contents of the code-block can be viewed and modified without restriction.

 

Unlocked for this Project Session - the code-block is password protected, and once the password is correctly entered it's contents can be viewed and modified. The code-block will be locked automatically after the project session is closed.

 

Locked - the code-block name will be listed in the Control Logic group, and placeholders for each rung will be present, but the contents of the  code-block is password protected and can only be modified on a per-operation basis, e.g. changing the code-block configuration, which requires entering the correct password. The code-block will be locked automatically after the project session is closed.

 

Note: the contents of  code-blocks that are locked will not be accessible to the normal operations of the programming software, for example Search/Replace, Program Check, Compare Programs, etc.. So, for obvious reasons, code-blocks should be unlocked during editing sessions and then locked only when the project session is about to be ended.

 


Click Set Protection Level to save the protection level changes.

 

Click Cancel to exit without saving any protection level changes.

 

Set Password - click this button to invoke the Modify Code-Block Password dialog. Code-block passwords must be at least 4 characters in length, can be any reasonable length, and can contain any combination of letters, numbers, and characters.

 

Current Password - will be disabled if no password currently exists, otherwise enter the current password for this code-block.

 

New Password - enter the new password for this code-block

 

Confirm New Password - re-enter the password to confirm

 


Click Clear Password to clear the existing password.

 

Click Set Password to save the new password. Note: it is imperative that the programmer remember the code-block password. Once a password has been set for a code-block it is encrpyted as part of the code-block, and therefore it will be impossible to retrieve a lost code-block password.

 

Click Cancel to exit without saving the new password.

 


Modifying the Execution Order of Programs and Tasks

The third button is Modify Execution Order which opens the Modify Execution Order dialog that allows the user to specify the order that the code-blocks in the project will be executed.

 

Each code-block in the project whose order can be changed is specified in the list. The execution order of some System Tasks (FirstScan, LastScan, TopOfScan, BottomOfScan) cannot be changed, so they will not show up in the list.

 

Click on a Program or Task in the list to highlight it, then click Move Up to make the highlighted code block execute earlier in the scan, or click Move Down to make the highlighted code-block execute later in the scan.

 


Click OK to save any changes.

 

Click Cancel to exit without changing the execution order.

 


Modifying the Sort Order for Programs and Tasks

The fifth button is Modify Program/Task Sort Order which defines the order in which the Programs and Tasks in the project will be displayed in the Project Browser. Select from the two following options:

 

Sort by Code-Block Type then Name - (the default) - sorts the list by type (Main, System, Unused System, Tasks, Programs), and sorts by Name within each type.

 

 

Sort by Execution Order - sorts the list in the order the Programs and Tasks will be executed during the controller scan.

 


Modifying the Sort Order for Memory Items

The last button is Modify Memory Sort Order which defines the order in which the Memory in the project will be displayed in the Project Browser. Using the various sort types can help the programmer quickly find a specific memory element in the list of memory elements available. Select from the following five options:

 

Sort Memory Items by Data Type - sorts the list of Memory items into three groups: Bit, Numeric, and Structures

 

Sort Memory Items by Data Type Alphabetically - sorts the entire list of Memory items by data type then lists the types alphabetically

 

 

Sort Memory Items by Function - (the default) - sorts the list of Memory items into functional groups

 

 

Sort Memory Items Alphabetically - sorts the list of Memory items alphabetically

 

 

Sort Memory Items Platform (DirectLOGIC vs. Do-more) - sorts the list of Memory items into two groups: one for DirectLOGIC-compatible memory items, the other for Do-more specific memory items

 


Suspending and Unsuspending Programs and Tasks

All System and User Programs and Tasks can be suspended and unsuspended as required. When a Program or Task is suspended the ladder logic in that code-block is no longer processed. If the code-block was running when the suspend operation was executed, the code-block will remember the last instruction that was executed, and when it is unsuspended, execution will resume with the next instruction.

 

To suspend a Program or Task, right-click and select Debug Code-Block -> Suspend Code-Block from the popup menu. With Status turned ON, and the controller in RUN mode, the name of the suspended Program or Task will be displayed with a  yellow  background in the Project Browser, and the word " Suspended " with yellow background will be displayed on the status bar.

 

The Suspend Program or Task (SUSPEND) instruction can also be used to suspend a Program or Task.

 

To Unsuspend a Program or Task that has been suspended, right-click and select Debug Code-Block -> Unsuspend Code-Block.

 

 

If there are one or more Programs or Tasks that are still Suspended when an attempt to close an online session Do-more Designer session - disconnecting from the controller or closing the project - this warning dialog will be displayed with the following options:

 

Take me to the Debug View to Unsuspend the Code-Blocks - invokes the Debug View where the suspended code-blocks can be unsuspended.

 

Close or Disconnect Anyway - close the project or complete the disconnect operation leaving the Programs or Tasks suspended.

 

Cancel - do not close the project or disconnect from the controller


Changing the Update Interval

There are times when the ability to change the default update rate of the various Views in the Do-more Designer programming software is needed. By default, Do-more Designer will generate communication requests at rate that is high enough to present the most current status values for the on-screen elements. But on computers that are CPU-speed-challenged or memory-challenged, maintaining this update rate at the expense of allowing CPU time for other processing can be a problem.

 

To address this need, Do-more Designer uses two entries in the [SETUP] group of DmDesigner.Ini, named ProgViewInterval & DataViewInterval, to govern the rate at which the individual views will update the status for the elements they contain:

 

  • ProgrViewInterval applies to Ladder Views, Debug Views, the Module Browser, Data Views, Device Views, PID Overview, etc.. Its value is the rate (in milliseconds) that status communication requests occur for those views. The default for these views is 25ms. If the entry does not exist, or is commented out (like in the example below), the rate will be the 25ms default. This value can be as small (for a fast update), or as large (for a slow update) as desired. Note: a value 0 means "as fast as possible" not "instantaneous".

 

  • DataViewInterval applies only to Data Views. Its value is the frequency (in milliseconds) that status communication requests occur only for Data Views. The default value is 75ms. If both ProgViewInterval & DataViewInterval exist in DmDesigner.Ini, ProgViewInterval will supersede DataViewInterval ONLY if it is SLOWER (i.e. a higher number). If only the ProgViewInternal exists, any Data View will use the slower of that value or the value or 75 (the default for Data Views).

 

The default condition for both of these entries has them both commented out (as shown below), meaning that all of the views in Do-more Designer will operate at an update rate of 25ms, and on most modern computers with sufficient RAM the default intervals should not cause any issues.

 

[SETUP]

;ProgViewInterval=25

;DataViewInterval=75

 

To enable one of these settings, remove the semicolon from the entry and change the update interval to the millisecond value desired.

 

Note: because Do-more Designer only reads the entries from DmDesigner.Ini when the software is first started, Do-more Designer will need to be closed, then re-opened to put any changes made to DmDesigner.Ini into effect.

 


Copyright © Host Engineering, Inc. ALL RIGHTS RESERVED