Hello there!
As I always like to say, with programming anything is possible!
What you are trying to do will in fact require a BASIC script however the script itself is not
a very complex or difficult one.
We will need a two part script to accomplish this.
- To monitor the alarm status of the tag and drop into our subroutine.
- To get the tag value and update the alarm message and send the email.
For the sake of this example, the tag we are monitoring will be called: Tag
INIT Section:
ONALARM "Tag", "GOTO MyRoutine"
We then need to add a new script section with the subroutine of MyRoutine/
MyRoutine:
e$ = "Email To"
c$ = "CC"
s$ = "Subject message"
b$ = "This is a body placeholder";
IF(Tag@ < 100) THEN
b$ = "Tag is currently at: " + STR$ Tag@ + " It is not an immediate alert."
ENDIF
IF(Tag@ > 100) THEN
b$ = "Tag is currently at: " + STR$ Tag@ + " It is getting borderline critical."
ENDIF
IF(Tag@ > 150) THEN
b$ = "Tag is currently at: " + STR$ Tag@ + " It is seriously critical at this point."
ENDIF
SENDMAIL e$, c$, s$, b$ REM - Actually sending the email
I hope this helps!