Wonderware Intouch Time Delay Script - PLCS
Wonderware Intouch Time Delay Script - PLCS
netInteractiveQ&A
ThisboardisforPLCRelatedQ&AONLY.PleaseDON'Tuseitforadvertising,etc.
TryouronlinePLCSimulatorFREE.Clickherenowtotryit.
>>>>>GetFREEPLCProgrammingTips
yourfirstname youremailaddress GetThePLCTipsNow!
NewHere?Pleasereadthisimportantinfo!!!
ThreadTools DisplayModes
April18th,2013,07:18AM #1
WonderwareIntouchtimedelayscript
Sake_no_oni
Member
DearSirs,
ImwritingascriptforIntouch10thatwouldgeneratethealarmincasePLCgoesinto
STOP.Alarmissupposedtosetwhensomevaluestopschangingandstandsstill.For
JoinDate:Jan2013 example,wehaveacquiredameasuredvalueforthefirsttime,thenwewait,thenwe
Location:Dnipropetrovsk measurethisvalueagainandthenwecomparethesetwovalues.TheproblemisthatI
Posts:18
dontunderstandhowtoarrangeatimedelay(sinceImquiteanoobyet ).Could
yougivemesomeadviceplease?
Bestregards
LasteditedbySake_no_oniApril18th,2013at07:21AM.
April18th,2013,08:50AM #2
mike_dr Quote:
Member
OriginallyPostedbySake_no_oni
DearSirs,
ImwritingascriptforIntouch10thatwouldgeneratethealarmincasePLC
goesintoSTOP.Alarmissupposedtosetwhensomevaluestopschangingand
JoinDate:Sep2011
Location:Mla standsstill.Forexample,wehaveacquiredameasuredvalueforthefirsttime,
Posts:143 thenwewait,thenwemeasurethisvalueagainandthenwecomparethese
twovalues.TheproblemisthatIdontunderstandhowtoarrangeatimedelay
http://www.plctalk.net/qanda/showthread.php?t=79060 1/4
11/2/2016 WonderwareIntouchtimedelayscriptPLCS.netInteractiveQ&A
(sinceImquiteanoobyet ).Couldyougivemesomeadviceplease?
Bestregards
Whatplcareyouusing?it'seasiertochangerslogixcodeusingtimer(orplccode)
andjustenergizeabitfortheintouchtouseinvisibilityanimation.
April18th,2013,10:01AM
Youarenotregisteredyet.Pleaseclickheretoregister! #3
Bit_Bucket_07 Quote:
Member
OriginallyPostedbymike_dr
Whatplcareyouusing?it'seasiertochangerslogixcodeusingtimer(orplc
code)andjustenergizeabitfortheintouchtouseinvisibilityanimation.
Thatwouldn'thelpfortestingcomms.
Iusea5SecondOn/5SecondOffsetofflashertimersinthePLCtocreateaPLC
HeartbeatPulse.
JoinDate:Feb2013
Location:SoutheastUS InInTouch,under"ApplicationScripts"inthe"WhileRunning"stateIexecutethis
Posts:872 every500Msec:
{EstablishaStartupDelayforMonitoringCommunicationFaults}
IFStart_Delay<20THEN
Start_Delay=Start_Delay+1
ENDIF
Thisestablishesa10Secondstartupdelaytopreventfalsealarmsuponstarting
theHMIapplication.
{TestforCommunicationFaults}
IFStart_Delay==20ANDNOTPLC1_StatusTHEN
PLC1_COM_FLT_TMR=PLC1_COM_FLT_TMR+1
ELSEPLC1_COM_FLT_TMR=0
ENDIF
IFPLC1_COM_FLT_TMR>=20THEN
PLC1_COM_FLT=1
ENDIF
Thiscreatesa"Timer"fortestingthestatusoftheheartbeatpulseandtripsthe
alarmiftheheartbeatpulsefailstochangestatesfor10Seconds.
{UnconditionallyResetStatusBitsforMonitoringCommunicationFaults}
{PLCStatusBitsareSetbyPLCHeartbeatBitsinDataChangeScripts}
PLC1_Status=0
ThisResetsthestatusbitafteritisexamined,sothatitmustsubsequentlybeSet
bythe"DataChange"script,whichistriggeredbyastatechangeinthePLC
HeartbeatBit.
The"DataChange"script:
TriggerTagname:PLC1_Heartbeat
PLC1_Status=1
PLC1_COM_FLT=0
PLC1_HeartbeatisaDiscreteI/OTagaddressedtothe5SecondFlashTimerbit(5
SecondsOn/5SecondsOff)inthePLC.AllothertagsareMemoryTags.
http://www.plctalk.net/qanda/showthread.php?t=79060 2/4
11/2/2016 WonderwareIntouchtimedelayscriptPLCS.netInteractiveQ&A
SecondsOn/5SecondsOff)inthePLC.AllothertagsareMemoryTags.
Hopethathelps.
__________________
LasteditedbyBit_Bucket_07April18th,2013at10:21AM.
April19th,2013,12:21AM #4
Sake_no_oni DearBitBucket,
Member It'sexactlywhatIneed.Thanksalot!!
JoinDate:Jan2013
Location:Dnipropetrovsk
Posts:18
June4th,2014,05:19PM #5
NetNathan Iwilltrythatonealso..
LifetimeSupporting __________________
Member ****ControlFreak****
NetiswhereIbeandNathanisme.
JoinDate:Nov2011
Location:Corona,CA
Posts:780
October11th,2014,08:44AM #6
sankardinesh Iwantwonderwarescript/logicforthisbelowcondition.
Member logicisforplcfaultmodeaftertimerstart.
I'mhavingtwobitB1&B2.(timerstartandtimeroff)
B1willgoestrue(B1=1),B2willcometrueafter30minute.IfB1goesfalsebefore
B2truefortwo/threeminute.onealarm/onebithastocome..iftimestarted,plc
wentfaultmodebeforetimeroffalarmhastohomefromscada.pleasehelpi'm
JoinDate:Oct2014 newtowondareware
Location:india
Posts:2
JumptoLivePLCQuestionandAnswerForum
Bookmarks
PreviousThread|NextThread
CurrentlyActiveUsersViewingThisThread:1(0membersand1guests)
PostingRules
http://www.plctalk.net/qanda/showthread.php?t=79060 3/4
11/2/2016 WonderwareIntouchtimedelayscriptPLCS.netInteractiveQ&A
PostingRules
Youmaynotpostnewthreads
Youmaynotpostreplies
Youmaynotpostattachments
Youmaynotedityourposts
BBcodeisOn
SmiliesareOn
[IMG]codeisOn ForumJump
HTMLcodeisOff LIVEPLCQuestionsAndAnswers Go
SimilarTopics
Thread ThreadStarter Forum Replies LastPost
November19th,
MelsoftGXTimedelayprogramming BobPaquette LIVEPLCQuestionsAndAnswers 10
201512:26PM
March26th,2013
Intouchactionscript MLR5000 LIVEPLCQuestionsAndAnswers 6
03:26PM
November10th,
SqlScriptinWonderware VigneshGunasekaran LIVEPLCQuestionsAndAnswers 0
200908:42PM
February28th,2008
ENBT1756ConnectionTimeOUT xyzinfo LIVEPLCQuestionsAndAnswers 7
09:46PM
July19th,2006
InTouchApplicationScriptQuery jaichains LIVEPLCQuestionsAndAnswers 7
07:37AM
AlltimesareGMT5.Thetimenowis08:50AM.
ContactUsPLCS.netTextTop
http://www.plctalk.net/qanda/showthread.php?t=79060 4/4