Technical FAQs

Ask a Question

Configuring Alarm Server to send page or email to staff based on site

Goals and Symptoms

Using DOS batch files it is possible to send a page or email to a specified list of people that depends on which site initiated the alarm. 
For example, you may have two ION meters at two different stations; StationA and StationB.  If an alarm happens at StationA you want to notify PersonA. Similarly for StationB you wish to notify PersonB.  Each person has an email address ( and pager address (

Causes and Fixes

Commissioning Procedure

  1. Construct the pager and email DOS batch files (Details below)
  2. Construct the alarmsrv.cmd file (Details below)
  3. Start AlarmServer with the alarmsrv.cmd file
  4. Test your alarms
Operating Procedure

Add the alarmsrv.cmd file into the Windows startup folder for the user who operates the ION Enterprise system. Alternatively, set up a Windows scheduled task to launch the alarmsrv.cmd file when the machine boots.

Please read the help for configuring Alarm Server before proceeding.

Contents of alarmsrv.cmd

The purpose of this DOS command file is to launch AlarmSrv with all of the necessary parameters. This includes the modem type, the serial communications port, the baud rate, followed by a list of programs to run when an alarm is received. Each program in this list needs to be enclosed in double quotes. Also note that the command is using DOS variables (e.g. %g, %M etc) and these need to be "escaped" so that they are correctly passed onto the command.  This is why there are two % signs.

The four programs that AlarmSrv will run when it receives and alarm from a meter are as follows:

  1. "D:\IONEnterprise\pager.bat %%g %%M %%n"
    This sends the email and page. We are passing in the site name, message from the meter, and the meter name.
  2. "conman -p900 %%g"
    This instructs ION Enterprise to connect with the meter to download logs, events and waveforms.
  3. "net send IONServer %%t %%M Please check the meter: %%n"
    This sends a network message, using NET SEND. The message is sent to a machine named “IONServer”.  Substitute a machine name that suits. The message includes the local time, the message from the meter, and the meter name.

All of the following text is placed into a file called alarmsrv.cmd.  All of the following is placed on one line.
  • D:\IONEnterprise\system\bin\alarmsrv.exe -m"USRobotics Faxmodem V.90 56k" -cCOM2 -b9600 -D "D:\IONEnterprise\emailpage.bat %%g %%M %%n" "conman -p900 %%g" "net send PQMETER %%t %%M Please check the meter: %%n"

Contents of emailpage.bat

The purpose of this DOS command file is to send the an email and a page to the appropriate person.  It expects three command line arguments; the site name, the meter’s message and the meter name.

  • echooff
    rem  Change to the drive where ION Enterprise is installed.
    rem  Must do this in case DOS environment opens in another drive.

    rem  Change to the directory where ION Enterprise is installed

    rem ****************************************************************

    rem Routine to create message text file
    rem ***************************************************************
    rem  Create the message in the file call body.txt
    rem  The echo command is followed by some text, a single > and then
    rem  the file name.  The single > directs the text output of the

    rem  echo command into the file. It also creates this file.
    Alert Incident date and time: > body.txt
    rem  Push the date and time into the file. Use >> to append to file.

    /t >> body.txt
    /t >> body.txt
    rem  Add an empty line into the file

    . >> body.txt
    rem  Add the three command line arguments to the message.
    rem  WARNING. This sample does not contain any error detection.
    rem  Production system should check for existence of these parameters. 

    Site:              %1 >> body.txt
    Condition:         %2 >> body.txt
    Node:              %3 >> body.txt
    . >> body.txt

    rem **************************************************************
    rem  Send out messages to specific pager based on a site name
    rem ****************************************************************

    rem   Blat available from
    rem   The following assumes you have installed blat.

    %1==StationA goto sendStationA

    blat body.txt -to, -subject "Meter Alert!" -f

    %1==StationB goto sendStationB
    blat body.txt -to, -subject "Meter Alert!" -f

Original article#9554
Last Revised: October 24, 2007
All content © 1992-2007 Schneider Electric
Was this helpful?
What can we do to improve the information ?