NewB PLC Question: WEBSET When Status Changes

ccthbsh01

Member
Hi all,
 
I am pretty new here so please excuse me if this has been discussed before. I did search thru the forum & read a lot of threads but could not find a simple answer.
 
What I am trying to do is simple. I want the CAI board to update a variable on my ISY-994 whenever there is a change in an input status, output status, and temperature. I know how to set it all up. What I don’t know is how to write the PLC code to do the WEBSET whenever there is a change in the status of one of the above.
 
Thanks in advance.
 
Hi, to do these things are simple, simply set 3 URLs, each one corresponding to one or the REST rules in the ISY-994.
 
Then in PLC code, whenever input status changed, do
WEBSET URL1
 
when output changed, do
WEBSET URL2
 
and temperature changed dol
WEBSET URL3
etc  You can set 8 different URLs.  If you have web server that has CGI code taking GET call, WC WEBSET can also send information to your web server CGI code.
 
Thanks for your response.

I am not sure I understand or perhaps I have not made myself clear enough. What I am trying to do is to have PLC code which should automatically do the WEBSET when & only when the status of lets say IP1 changes. If I just do WEBSET URL1 IP1, wouldn't it keep sending updates 100 times a minute non-stop even if the status didn't change?

I have seen code examples of limiting it by time, for example only once a minute. But I did not find an example of code to do anything based on a change in status.

Thank u very much.
 
You can use PLC logic to set, for example, any IPx change will send the all IP state to ISY,
in your PLC code,  you will do this
 
TSTNE  ALLINS    RAM10
CALLSUB IN_diff
TSTNE ALLOUTS RAM11
CALLSUB OU_diff
.....
 
IN_diff:
SET RAM10 ALLINS
WEBSET URL1 RAM10
RET
 
OUT_diff:
SET RAM11 ALLOUTS
WEBSET URL2 RAM11
RET
...
 
So when the program starts, it will send the input states and output states to ISY, later on, only change will cause it send  the states.
 
Back
Top