Hey support team,
Do you know how I can toggle the Email on Alarm Check Box in the tag configuration from a ViewOn Screen?
I would like to be able to toggle this bit on and off….
From a Screen/Object like this…
image|419x258
Hey support team,
Do you know how I can toggle the Email on Alarm Check Box in the tag configuration from a ViewOn Screen?
I would like to be able to toggle this bit on and off….
From a Screen/Object like this…
image|419x258
Do you know how I can toggle the Email on Alarm Check Box in the tag configuration from a ViewOn Screen?
I would like to be able to toggle this bit on and off….
From a Screen/Object like this…
I was able to get this working a couple different ways but I found that creating a mem tag helped make this look cleaner so that we don’t need 2 checkboxes or 2 buttons. I’m sure there are more options here if we use java script as well.
In my example,
1 - Create a boolean mem tag in the eWON device, I called my tag “MyBit”
2 - Add an ONCHANGE listener for this mem tag in the init section
3 - Add a section in the BASIC IDE that checks this bit ONCHANGE and then disables or enables the alarm depending on this bit value.
Init section:
ONCHANGE "MyBit", "goto AlarmEmail"
AlarmEmailSection:
AlarmEmail:
IF (MyBit@ = 1) THEN
SETSYS TAG, "LOAD", "My_Test_Tag"
SETSYS TAG, "DoSetVal", 1
SETSYS TAG, "EEN", "8" // value of 8 enables the email upon alarm
SETSYS TAG, "SAVE"
Print "Email upon alarm enabled"
ELSE
SETSYS TAG, "LOAD", "My_Test_Tag"
SETSYS TAG, "DoSetVal", 1
SETSYS TAG, "EEN", "0" // value of 0 disables email upon alarm
SETSYS TAG, "SAVE"
Print "Email upon alarm disabled"
ENDIF
END
ViewON
4 - Create a checkbox in viewon (drawings / graphical components / checkbox)
5 - Click on your checkbox and go to the actions tab
6 - Right click in the empty field, and click send command
7 - Configure your checkbox to write to your boolean mem tag, and set ’ value when selected to’ to 1 / ‘value when not selected’ to 0
8 - Export your ViewOn page back to your eWON and you should be good to toggle your checkbox
Hi Joe,
I am not clear about use of the code. Can you please explain the use case?
This is used to disable an email upon alarm setting for a tag using a checkbox in ViewON.
I fixed the video in my original post which may help with understanding the concept.