• wire E2 code help please
    3 replies, posted
Hi i am haveing trouble with this E2 stargate power monitor for RD2 this is the code ------------------------------------------------------------------------------------------------------------------------------------ @name Stargate Power Monitor @inputs Screen:wirelink Powervalue @outputs Alarm @persist @trigger If Powervalue >= 1000 Then Screen:writeString("System Power Online",1,1,255,0,1) Screen:writeString("Power O.K",1,2,255,0,0) Else Screen:writeString("WARNING STARGATE SHUTDOWN IMINENT",1,1,255,0,1) Screen:writeString("ERROR: Main Power Supply Low",1,1,255,0,1) ------------------------------------------------------------------------------------------------------------------------------------ i am trying to say if the power ("powervalue") goes below 1000 then the screen says "WARNING STARGATE SHUTDOWN IMINENT" "ERROR: Main Power Supply Low" then a alarm goes off (i have no clue how to do this so could you add this aswell) and if the power is above 1000 it says "System Power Online" "Power O.K" if you can help me you would be a life saver
[code] @name Stargate Power Monitor @inputs Screen:wirelink Powervalue @outputs Alarm @persist if (Powervalue >= 1000) { # Screen:writeString("System Power Online ",1,1,255,0,1) Screen:writeString("Power O.K ",1,2,255,0,0) } else {# Screen:writeString("WARNING STARGATE SHUTDOWN IMINENT",1,1,255,0,1) Screen:writeString("ERROR: Main Power Supply Low",1,2,255,0,1) #You put this message on wrong line }# [/code]
[QUOTE=whosdr;26449286][code] @name Stargate Power Monitor @inputs Screen:wirelink Powervalue @outputs Alarm @persist if (Powervalue >= 1000) { # Screen:writeString("System Power Online",1,1,255,0,1) Screen:writeString("Power O.K",1,2,255,0,0) } else {# Screen:writeString("WARNING STARGATE SHUTDOWN IMINENT",1,1,255,0,1) Screen:writeString("ERROR: Main Power Supply Low",1,2,255,0,1) #You put this message on wrong line }# [/code][/QUOTE] thx so much man i owe u one but it seems to overlap or something it dosent get rid of the text if it goes below 1000 or if its over 1000 if you could help me with that
-Updated-
Sorry, you need to Log In to post a reply to this thread.