Activate output when alarm is initiated

Hi,
My problem is like that:
I have a sensor to measure the temperature and have a fan to be the output. If the temperature is higher than certain value, alarm will be initiated and the output will be activated.
I am using viewON to control the tags.
For the case above, how to activate the output tag if alarm is initiated?
Is it just using the “almstate” in the attribute filter in sending action?

Hi Jun,

You should be able to do this in the BASIC IDE with either an onchange or an onalarm

RG-006-0-EN-(Programming Reference Guide).pdf (865.6 KB)

Hi,
My problem is like that:
I have an sensor to measure for temperature and acts as an input tag and equipped with alarm function and a fan as a output tag. When the temperature reaches certain value, the alarm will be initiated and the output will be activated.
I am using viewON to configure my tags.
How can i activate my fan when alarm is initiated?
Is it just using “almstate” in the attribute filter in action command?

Hi Tim,
Could i just used “send action in almstate to the output tag to trigger the output” in viewON?

Hi Tim,
How could i write the BASIC Script in viewON?

I want to change the event to “alarm tiggered” but it only show “click+button”? How can i change this?

Hi Tim,
If i am going to use BASIC IDE to control the tag, for example the tag name for alarm is waterlevel and the output tag is LED.
Could i write like this only to control my tag?

I am totally new to this, could you show me a simple complete program to activate output using alarm?
Thank you

Hi Jun,

Sorry for the delay, I’m going to look into this one now and try and write up some code for you

This one was done outside of ViewON but I think that the code inside the device is a little easier to manipulate than code inside of ViewON

basic temperature alarm.txt (450 Bytes)

Hi Tim,
Appreciate it and thank you very much.
I will write my code based on this:blush:

Topic closed due to inactivity.