Alarm DB Logger

Материал из archestra.info
Версия от 14:05, 20 декабря 2013; Admin (обсуждение | вклад) (Старт/Стоп alarm bd logger as Service)

Перейти к: навигация, поиск

как сервис: техноты 821, 872, 725.

В приложении TN 725 – в конце ее есть текст bat файла для старта InTouch + Alarm DB Logger при старте Windows. При этом alarm bd logger должен стартовать ПОСЛЕ приложения Window Viewer – VIEW и не как сервис, а как приложение.


Autostart Alarm DB Logger

  • Method 1

Configure as an NT Service. This option is found in Settings within the Alarm DB Logger Manager.

  • Method 2

To start Alarm DB Logger automatically without starting it as a Service, add the executable WWAlmLogger.exe to the Startup folder.

  • Method 3

To start Alarm DB Logger automatically when starting the InTouch application, put the following in the Application OnStartup script:

StartApp "WWAlmLogger.exe";


Скрипт Старт/Стоп alarm bd logger

   :: Tested on Window7 x64 
   :: May work with earlier Operating Systems, but directory paths will be different and must be adjusted
   ::
   :: INSTRUCTIONS:
   :: (1) Configure AutoLogon of well-known user (for this example, we used user DomainX\UserX) in Windows Registry
   ::     (see: Knowldege Base article Q315231 located at  http://support.microsoft.com/kb/315231 )
   ::     (see: Wonderware Tech Note 49 - General Configuring Automatic Log Ons for Windows NT )
   ::
   :: (2) Place this bat file on the node that you want to autostart WW programs, for example C:\bat\WonderwareAutoStart.bat
   ::     Copy C:\bat\WonderwareAutoStart.bat file and paste a shortcut to it in
   ::     C:\Users\UserX\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
   ::     (Note1: replace UserX with your user name)
   ::     (Note2: above path is for Windows7, adjust accordingly for Vista or Windows XP)
   ::     (Note3: I chose to put batfile shortcut in specific user's (e.g. UserX's) startup folder and not in "all users"
   ::      startup folder so on "server" machines (Win2003Svr and Win2008R2) if a 2nd user remote
   ::      desktop's in to the machine as a different user (not UserX) the first session will continue to run fine
   ::      and we won't kick off the bat file a 2nd time.
   ::
   :: (3) use dos> dir /X *. command to find the 8.3 name of your root "program files" directory
   ::     and replace \PROGRA~2\ below with yours if yours is different
   ::
   :: REFERENCES - Wonderware Tech Notes (http://wdn.wonderware.com)
   :: 049 - General Configuring Automatic Log Ons for Windows NT
   :: 348 - InTouch Autostart of the InTouch® Alarm Utilities


   @echo on
   :: VIEW start - Spawns view off ("start" command allows bat file to complete and not just wait on this command)
   start C:\PROGRA~2\Wonderware\InTouch\view.exe
   :: wait 5 seconds for prior command to complete (may not be needed at all, but it's a cool example of how to wait)
   ping -n 5 127.0.0.1 > NUL
   :: ALMPTR start - The "-q" is recognized to autostart the alarm printer
   start C:\PROGRA~2\Wonderware\InTouch\almprt.exe -q C:\Data\AlarmPrinterConfiguration\AlarmPrinterConfig1.alc
   :: WWALMLOGGER start
   start C:\PROGRA~2\Wonderware\InTouch\wwalmlogger.exe
   :: Write execution time of this bat file to log for later examination (if needed)
   echo %date% %time% >> C:\Data\Bat\BatFileLastRunTime.txt
   :: wait 25 seconds, then lock desktop if so desired (uncomment the rundll32 command)
   ping -n 25 127.0.0.1 > NUL
   rundll32.exe user32.dll, LockWorkStation