NSTX logo FAQ Web Tools UNIX&VMS MDSplus
Overview Programming Diagnostics Applications
software

Alerts for signal problems

The Requirement:

Stefan Gerhardt requested a facility that would automatically run after a shot and send email when specified signals had problems.

For example, if the efit or rtefit chi-squared becomes too large, we want to know before taking 10 more shots.

The Solution:

Try to read specified signals after a specified MDSplus shot event is recognized, and send email if:

  1. The signal does not exist for the current shot (or previous shot if the event is NSTX_SOP).

  2. (Optional) No part of the signal reaches a minimum required value.

  3. (Optional) Any part of the signal exceeds a maximum allowed value.

Implementation:

Users create a file (or ask ITD staff to) that contains the necessary information, e.g, [must be a tab-delimited file]

Signal      email             checkEvent   nsmooth max     min  idlCall setEvent   setEPICS
\wf::pnb    gzimmer@pppl.gov  NSTX_SOP     5       800    -10     none    none       none
\wf::prf    gzimmer@pppl.gov  NSTX_SOP     3       1e38   -1e38   none    none       none
There should be one header line with some character string (without spaces) for each column. Column order must be maintained, with tabs between them (so they probably won't line up visually).

The MDSplus signal name must have the tree included, as shown. This can be a TDI string (without spaces), such as -1*\wf::ip, ABS(\engineering::ip1-\ip2), etc.

Emails do not need the domain if it is "@pppl.gov" but do otherwise, e.g., "joeshmoe@gmail.com". Update on 6/22/2018: email addresses must include the domain!

The "checkEvent" column is the MDSplus event at which the signal will be read.

The "max" column shows the maximum allowed value, in the signal's engineering units (that returned from mdsvalue(signal)). The "min" column shows the required minimum for the signal. If you do not want checks for the maximum allowed value, you can enter 1e38, or -1e38 if you do want checks for the minimum required value. You may also use "none" (without quotes) in the max and min columns to disable these checks.

If you want an IDL routine (in a directory included in $IDL_PATH) to be executed before checking the min or max, you can specify it in the "idlCall" column with the "data" variable operated on, e.g.,

	data=smooth2d(data,/edge_truncate)
note that there may be no spaces in this IDL statement

If you want an MDSplus event declared when a alarm is raised by sigalert.pro, specify that in the "setEvent" column.

EPICS alarms/settings are implemented as of Aug. 25, 2015.

These files go in the /p/nstxops/bin/mds/SigAlert/Files directory, which is writable by anyone in the nstx group on Linux.

The sigalert.pro routine is invoked by code in the /p/nstxops/bin/mds/SigAlert directory, following the conventions of the NSTX Auto-reload Facility. It runs continuously and responds to the events specified in the files in the /p/nstxops/bin/mds/SigAlert/Files directory. If these input files are modified or added, the program needs to be restarted (this could be changed). E.g.,

	ssh nstxops@nstxops	# (if prompted for a password, ^C and run kinit)
	cd /p/nstxops/bin/mds/SigAlert/
	./callsigalert restart verbose
Email alerts can also be received by running the sigalert.pro routine directly in IDL on the Linux cluster. For instructions, in IDL, type:
	IDL> doc_library, 'sigalert'

If you have questions or comments on this facility, please send email to nstxops.


updated: 22-Jun-2018
by: Gretchen Zimmer