Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

NtRtMgr

Expand
titleOverview

The NtRtMgr is the primary manager task of the Tsentry system.  It provides the following services:

  •  Allocate data dictionary global shared memory region

  • Populate memory resident data dictionary with disk resident information

  • Allocate global shared memory regions

  • Initialize and restore contents of global shared memory regions

  • Start and monitor all process tasks

  • Display current status of all process tasks

  • Display recent contents of LogMsg message queue

  • Start/Restart/Suspend/Stop/Configure processes via console window

  • Shutdown system when requested

Expand
titleNtRtMgr Setup

The Tsentry system can be started by executing the NtRtMgr task and passing the name of the system initialization file. 

 

The following configuration files control the operation of the startup task:

  • System initialization file       

  • Process initialization file

  • Data dictionary definition file

  • Data dictionary variable initialization file

  • LogMsg initialization file

Info

“Nt-” as in 'Nt-Example' is an NtRtMgr Setup sub doc

Expand
titleNt-System initialization file

This system initialization file defines:

  • The remaining fully qualified initialization file names to be used by the startup process:

  • Process initialization file

  • Data dictionary definition file

  • Data dictionary variable initialization file

  • LogMsg initialization file

  • System-wide and application parameters

 

An example file follows:

Code Block
# ------------------------------------------------------------------------
#  A Foil Mill Initialization File

[IniFiles]
#define the Data Dictionary Structure definition file
DDStruct=d:\locNtRt\afm\pif\afmStruct.ini

#define the Data Dictionary variables definition file
DDVars=d:\locNtRt\afm\pif\afmVars.ini

#define the process definition file
Procs=d:\locNtRt\afm\pif\afmProcs.ini

[AppParams]
# System Name
SystemName=A Foil Mill

# Shutdown executable
ShutdownExe=d:\locNtRt\tpriNtRt\bin\NtRtStop.exe

# Splash screen picture file
SplashPicture=d:\locNtRt\afm\Pif\afmLogo.bmp

# GUI Options: '&'-delimited list of one of more of the following strings:
#    NoConsole           Do not display the NtRtMgr screen
#    NoStopSystem        Do not allow the interactive user to stop the NtRtMgr
#    NoExecProcess       Do not allow the interactive user to 
#                           start/stop/suspend/resume processes
#    NoEditProcess       Do not allow the user to edit process parameters
#    NoProcessMenu       Do not display any menu via right clicks on the
#                           process list
#    NoConsoleLogMsg     Do not allow the user to insert LogMsgs from the console
#    TrayIcon            Minimize the NtRtMgr screen to a tray icon
GuiOptions=

# Option not to query if system should kill existing processes on startup
#QueryKillExistingProcesses=No

# Directory for NtRtCmd files
NtRtCmdPath=D:\locNtRt\afm\NtRtCmd\

# ------------------------------------------------------------------------
Expand
titleNt-Process initialization file

This configuration file controls which processes will be started as part of the real-time control system.  The fully qualified file name is passed to the startup process as the first command line parameter.  An example process.ini file that contains line format definitions as comments follows:

Code Block
# -------------------------------------------------------------------------------
[Process]
# This is the process.ini file for the Application system.
# This file is read by the startup process at system startup.
# Processes are started in the order they are listed in this file. 
# This file is also read by each process at startup (by method PrIni)
#
# The format of the process.ini file is as follows:
#
# Lines beginning with a "#" are comments
#
#  AppName        - Application name of the process that is to be run.
#
#  BinName        - Fully qualified system executable binary file name of
#                   the process associated with AppName
#
#  Uses NtRt      - Flag indicating if this process uses the tpriNtRt library
#                   for process management
#
#  Priority       - the priority that the task is supposed to run at.
#                   Options for Priority are:
#                       0 - 15   Standard Windows NT dynamic priority (mode=Std)
#                                 0 = lowest
#                                15 = Highest
#                      16 - 31   Standard Windows NT realtime priority (mode=Std)
#                                16 = Lowest
#                                31 = Highest
#                       0 -127   Hard Real-Time (mode=Rt)
#                                 0 = Lowest
#                                127= Highest
#
#  Timer Delay    - Initial Timer delay (milliseconds) before first 
#                   execution.  Zero if no timer specified.
#
#  Timer Interval - RepRate Timer Interval in milliseconds.
#                   Zero if no timer specified.
#
#  Run Mode       - indicates whether a task is to run as "standard" or
#                   "realtime" process.
#
#  Auto-Restart   - "yes" or "no"; specifies if the process is to be
#                   automatically restarted should it is unexpectedly
#                   terminated.
#
#  MemLock        - Lock in memory option
#                   "yes" indicates locked in memory
#                   "no" indicates not locked in memory
#                   All Hard Real-Time processes are always
#                   locked in memory.
#
#  Trap Crash     - Combination of character flags specifying how process 
#                   crashes/exceptions should be handled
#                   N = Default handling (windows displays message box)
#                   T = Terminate process
#                   D = Log description
#                   S = Try to find symbol and source line
#                   W = Walk back along stack and dump info
#                   R = Dump register values
#                   Y = Default 'Yes' = Same as 'TDS'
#
#  Debug Mode     - Debug mode / level. Values are process dependent.
#                   Normally lower values indicate less debug and logging
#                   Higher values indicate more debug and logging
#
#  Startup Delay  - Defines delay time (milliseconds) before starting
#                   this process.  A negative value indicates that this
#                   process should not be automatically started at system
#                   startup.  
#                   Negative Startup Delay's are (usually) used for the
#                   startup process itself and for any demand process
#                   that needs to run periodically, but not when
#                   the system is started.
#
#  Init Wait      - Defines the delay time (milliseconds) to allow for 
#                   this process to initialize itself before proceeding
#                   to the next process in the list.
#
#  Kill Wait      - Defines the delay time (milliseconds) to allow for 
#                   this process to react to a deactivation request and
#                   gracefully exit before it is forced to terminate.
#                   Negative times indicate that the process will never
#                   be terminated without its permission.
#
#  Pulse Timeout  - Defines the timeout (milliseconds) for the process
#                   pulse.  Every time the process calls PrWait it resets
#                   an internal timer to this value.  The NtRtPulse
#                   decrements this timer and kills the process if it
#                   expires.
#
#  CTail            Command tail to be passed to the process
#                   This parameter is optional
#                   If the command tail is supplied, it must
#                   be enclosed in double quotes
#
# ---------------------------------------------------------------------------

# ---------------------------------------------------------------------------
#
# GroupName     Init
#               Active
#
# ---------------------------------------------------------------------------
[AppGroups]
Application     Y


# ---------------------------------------------------------------------------
#
# AppName BinName          Uses Prty Tmr  Rep  Run Re-  Mem Trp Dbg StUp Init Kill Pls CTail
#         (FileName)       NtRt      Dly  Rate Mod strt Lck Crs Lvl Dly  Wait Wait TO
#
[System]
NtRtMgr   D:\xx\NtRtMgr.exe   Y 10   500  500  Std No   Y   N   30  0    0    -1   0
NtRtMtr   D:\xx\NtRtMtr.exe   Y 31   10   10   Std Yes  Y   T   30  0    0    -1   0
RtxTcpip  C:\ww\rtxtcpip.rtss N 120  1000 1000 Rt  No   Y   T   0   -1   0    500  0   "zz.ini"
GsmOpcSvr D:\xx\GsmOpcSvr.exe Y 10   500  500  Std No   Y   T   30  0    0    5000 0
TrendMgr  D:\xx\TrendMgr.exe  Y 10   200  200  Std No   Y   T   30  -1   3000 3000 0   "zz.ini"
TrendGsm  D:\xx\TrendGsm.rtss Y 20   20   20   Rt  Yes  Y   T   30  -1   5000 5000 0   "zz.ini"
TrendSrv  D:\xx\TrendSrv.exe  Y 10   1000 1000 Std Yes  Y   T   30  -1   0    5000 0

[Application]
# Insert each of the application processes here
RTSSTask  D:\yy\RTSSTask.rtss Y 20   100  100  Rt  No   Y   A   30  0    5000 5000 2000
W32Task   D:\yy\Win32Task.exe Y 8    100  100  Std No   Y   A   30  0    0    5000 2000

# ---------------------------------------------------------------------------
Expand
titleNt-Data dictionary structure definition file

This is the first of two files used by the NtRtMgr to initialize the data dictionary.  It is the output of the data dictionary builder process GsmPifBld, which parses the C/C++ global common header files to generate this flat ASCII definition of shared memory.  For most purposes you do not need to examine the contents of this file.  It is further described in the Data Dictionary [LINK] section.

Expand
titleNt-Initialization files

Data dictionary variable

This is the second of two files used by the NtRtMgr to initialize the data dictionary.  This file defines the various global common segments used by the system and any ‘special’ variables contained therein.  It is further described in the Data Dictionary [LINK] section.


LogMsg initialization file

This configuration file initializes the LogMsg subsystem.  It is described in detail in the [LINK] Libraries section.

...

Expand
titleStopping the NtRtMgr

The NtRtMgr task can be stopped by either clicking the Stop System button or the Windows ‘X’, both in the upper right hand corner of the window.

 

Shutting down the NtRtMgr process performs the following tasks:

  1. Request orderly and graceful stop of all processes

  2. Forcibly terminate tasks that do not stop via graceful request

  3. Save contents of global shared memory regions

  4. Deallocate global shared memory regions

  5. Stop operation of Startup task

...

Expand
title...

TrendMgr

The TrendMgr task [LINK] is the manager process for the trending subsystem.


TrendGsm

The TrendGsm task [LINK] is responsible for trending data from global shared memory.


TrendSrv

The TrendSrv task [LINK] is the server process for delivering trended data to trend clients across the network.


TrendTrig

The TrendTrig task [LINK] is the main process for the historical trending subsystem.


GsmExpSvr

The GsmExpSvr task [LINK] is the server portion of the software-based reflective memory subsystem, discussed in the Data Transfer section.


GsmExpRcv

The GsmExpRcv task [LINK] is the client portion of the software-based reflective memory subsystem, discussed in the Data Transfer section.


GsmPifBld

The GsmPifBld process [LINK] is responsible for building the data dictionary program information files before starting the Tsentry system, discussed in detail in the Data Dictionary section.

...

Expand
titleGenerating a New System

Before tasks and screens can be created a new system must be generated. Start up tpriNtRtAdmin and then perform the following actions:

 

  1. Enter SystemID and System Name, e.g. ‘Demo’ and ‘Demo Development System’

  2. Click ‘Generate New System’

  3. A list of steps for creating the demo system is displayed; those items that are checked have been automatically finished, those that are unchecked must be performed manually.

    If this is the first time you are configuring a system on your machine, you need to manually do each of the steps following. If you have already configured a system previously, then only building the data dictionary is necessary

    1. Configure DCOM as required by your system, either Windows 2000 [LINK] or XP/2003 [LINK].

    2. Configure Internet Explorer [LINK] as required by your system.  Note that depending on your system you may not need to perform all items.

    3. Verify wwwroot virtual directories (My Computer | Manage | Services and Applications | Internet Information Services | Default Web Site | Tsentry)

    4. Open the main Tsentry menu (http://127.0.0.1/Tsentry), click on the HMI Setup link, and follow all instructions on this screen.  Once this is complete, you can return to the main menu to try any of the standard Tsentry screens (Probe, TrendX, etc.)

    5. Customize Data Dictionary TsentryHelp | (Data Dictionary) - use the created Visual Studio solution in the D:\locNtRt\sys\Tasks directory and 'Build | Batch Build | Check DemoDataDictionary | Rebuild'.

...

Expand
titleGenerating a New Screen

Screens are used to display and modify values using a wide variety of visual tools. The combination of these tools yields a powerful and fully customizable real-time graphical user interface. To build a new screen, follow these steps:

  1. Run tpriNtRt administrator program D:\locNtRt\tpriNtRt\Apps\tpriNtRtAdmin\tpriNtRtAdmin.exe

  2. Enter Screen Name, e.g. ‘DemoScreenXX’ where ‘XX’ is a unique number (must be unique so your screen doesn’t conflict with anyone else’s screen)

  3. Click ‘Generate New Screen’

  4. A list of steps for creating the demo screen is displayed; those items that are checked have been automatically finished, while those that are unchecked must be performed manually.

For a more detailed explanation of building an HMI screen refer to the Screen Development [LINK] section.

TpriPublisher

Expand
titleOverview

The tpriPublisher application is no longer supported

The tpriPublisher is used to rebuild and publish HMI screens for viewing through Internet Explorer.  It supports VB.NET screens, VB.6 screens, and pure html/asp screens.

...